From 836c34a4e2dd99f1f302a2c3ae93a51cd182368f Mon Sep 17 00:00:00 2001 From: prascle Date: Mon, 13 Mar 2006 12:18:26 +0000 Subject: [PATCH] PR: merge from branch BR_auto_V310 tag mergefrom_OCC_development_for_3_2_0a2_10mar06 --- AUTHORS | 0 COPYING | 340 ++++ ChangeLog | 0 Makefile.in => DEPRECATED/Makefile.in | 40 +- .../configure.in.base | 0 make_config.in => DEPRECATED/make_config.in | 0 Makefile.am | 29 + NEWS | 0 bin/Makefile.am | 60 + bin/appliskel/killCurrentPort | 3 +- bin/appliskel/runRemote.sh | 11 +- bin/appliskel/runSession | 13 +- bin/appliskel/runTests | 13 +- bin/appliskel/searchFreePort.sh | 12 +- bin/createAppli.sh | 4 +- bin/killSalomeWithPort.py | 16 +- bin/launchConfigureParser.py | 11 + bin/{salome => }/runIDLparser.in | 8 +- bin/runNS.sh | 2 +- bin/runSalome.ksh | 77 + bin/runSalome.py | 101 +- build_configure | 270 +-- clean_configure | 23 + configure.ac | 524 ++++++ doc/Makefile.am | 32 + doc/Makefile.in | 40 - doc/SALOME_Application.txt | 41 +- doc/index.txt | 86 + doc/kernel_resources.txt | 491 ++++++ doc/rst.css | 288 ++++ doc/salome/DevelopersGuide/Makefile.am | 33 + doc/salome/DevelopersGuide/Makefile.in | 62 - .../KernelResources/kernel_resources-1.html | 287 ---- .../KernelResources/kernel_resources-2.html | 167 -- .../KernelResources/kernel_resources-3.html | 87 - .../KernelResources/kernel_resources.html | 56 - .../KernelResources/kernel_resources.lyx | 976 ----------- doc/salome/Makefile.am | 20 + doc/salome/Makefile.in | 44 - doc/salome/gui/Makefile.am | 18 + doc/salome/gui/Makefile.in | 33 - doc/salome/kernel_resources.pdf | Bin 127655 -> 0 bytes doc/salome/kernel_resources.ps | 1468 ----------------- doc/salome/tui/Makefile.am | 27 + doc/salome/tui/Makefile.in | 45 - doc/txt2html.sh | 36 + doc/userguide.txt | 125 ++ idl/Makefile.am | 129 ++ idl/Makefile.in | 83 - idl/SALOMEDS.idl | 28 +- idl/SALOMEDS_Attributes.idl | 125 ++ resources/{ => DEPRECATED}/Plugin.in | 0 resources/Makefile.am | 26 + salome_adm/Makefile.am | 1 + salome_adm/Makefile.in | 47 - salome_adm/unix/{ => DEPRECATED}/Doxyfile | 0 .../unix/{ => DEPRECATED}/F77config.h.in | 0 salome_adm/unix/{ => DEPRECATED}/config.h.in | 0 salome_adm/unix/{ => DEPRECATED}/depend.in | 0 salome_adm/unix/DEPRECATED/envScript.in | 26 + .../unix/{ => DEPRECATED}/make_commence.in | 46 +- .../unix/{ => DEPRECATED}/make_conclude.in | 10 +- .../unix/{ => DEPRECATED}/make_module.in | 0 .../unix/{ => DEPRECATED}/make_omniorb.in | 0 salome_adm/unix/{ => DEPRECATED}/sstream.in | 0 salome_adm/unix/Makefile.am | 21 + salome_adm/unix/SALOMEconfig.h.in | 22 + .../{ => DEPRECATED}/ac_cc_warnings.m4 | 0 .../{ => DEPRECATED}/ac_cxx_bool.m4 | 0 .../{ => DEPRECATED}/ac_cxx_mutable.m4 | 0 .../ac_cxx_partial_specialization.m4 | 0 .../{ => DEPRECATED}/ac_cxx_typename.m4 | 0 .../{ => DEPRECATED}/check_Salome.m4 | 6 +- .../{ => DEPRECATED}/check_java.m4 | 0 .../{ => DEPRECATED}/check_mico.m4 | 0 .../{ => DEPRECATED}/check_pthreads.m4 | 8 +- .../{ => DEPRECATED}/config.guess | 0 .../config_files/{ => DEPRECATED}/config.sub | 0 .../config_files/{ => DEPRECATED}/install-sh | 2 +- .../config_files/{ => DEPRECATED}/libtool.m4 | 0 .../config_files/{ => DEPRECATED}/ltconfig | 0 .../config_files/{ => DEPRECATED}/ltmain.sh | 0 .../config_files/{ => DEPRECATED}/missing | 0 .../{ => DEPRECATED}/mkinstalldirs | 0 salome_adm/unix/config_files/Makefile.am | 65 + salome_adm/unix/config_files/ac_cxx_option.m4 | 9 +- salome_adm/unix/config_files/acx_pthread.m4 | 207 +++ salome_adm/unix/config_files/check_boost.m4 | 138 +- salome_adm/unix/config_files/check_cas.m4 | 47 +- salome_adm/unix/config_files/check_cppunit.m4 | 16 +- salome_adm/unix/config_files/check_hdf5.m4 | 2 +- salome_adm/unix/config_files/check_htmlgen.m4 | 13 + salome_adm/unix/config_files/check_lam.m4 | 5 +- salome_adm/unix/config_files/check_local.m4 | 69 + salome_adm/unix/config_files/check_lsf.m4 | 2 +- salome_adm/unix/config_files/check_mpi.m4 | 11 +- salome_adm/unix/config_files/check_mpich.m4 | 5 +- salome_adm/unix/config_files/check_msg2qm.m4 | 57 - salome_adm/unix/config_files/check_omniorb.m4 | 6 + salome_adm/unix/config_files/check_opengl.m4 | 12 +- salome_adm/unix/config_files/check_openpbs.m4 | 2 + salome_adm/unix/config_files/check_pyqt.m4 | 307 ---- salome_adm/unix/config_files/check_qt.m4 | 1 + salome_adm/unix/config_files/check_qwt.m4 | 151 -- salome_adm/unix/config_files/check_sip.m4 | 168 -- salome_adm/unix/config_files/check_swig.m4 | 2 +- salome_adm/unix/config_files/check_vtk.m4 | 148 -- .../unix/config_files/enable_pthreads.m4 | 21 +- salome_adm/unix/config_files/python.m4 | 32 +- salome_adm/unix/envScript.in | 22 - salome_adm/unix/make_common_starter.am | 30 + src/Basics/BasicsGenericDestructor.cxx | 4 +- src/Basics/{Makefile.in => Makefile.am} | 34 +- src/Basics/Test/{Makefile.in => Makefile.am} | 46 +- src/Batch/Batch_BatchManager_Local.cxx | 774 +++++++++ src/Batch/Batch_BatchManager_Local.hxx | 146 ++ src/Batch/Batch_BatchManager_Local_RSH.cxx | 126 ++ src/Batch/Batch_BatchManager_Local_RSH.hxx | 56 + src/Batch/Batch_BatchManager_Local_SH.cxx | 93 ++ src/Batch/Batch_BatchManager_Local_SH.hxx | 56 + src/Batch/Batch_BatchManager_Local_SSH.cxx | 126 ++ src/Batch/Batch_BatchManager_Local_SSH.hxx | 56 + src/Batch/Batch_FactBatchManager_Local.cxx | 39 + src/Batch/Batch_FactBatchManager_Local.hxx | 39 + .../Batch_FactBatchManager_Local_RSH.cxx | 39 + .../Batch_FactBatchManager_Local_RSH.hxx | 39 + src/Batch/Batch_FactBatchManager_Local_SH.cxx | 39 + src/Batch/Batch_FactBatchManager_Local_SH.hxx | 39 + .../Batch_FactBatchManager_Local_SSH.cxx | 39 + .../Batch_FactBatchManager_Local_SSH.hxx | 39 + src/Batch/Batch_IOMutex.cxx | 17 + src/Batch/Batch_IOMutex.hxx | 26 + src/Batch/Batch_Job.cxx | 4 +- src/Batch/Batch_JobInfo.cxx | 1 - src/Batch/Batch_JobInfo.hxx | 16 +- src/Batch/Batch_JobInfo_Local.cxx | 33 + src/Batch/Batch_JobInfo_Local.hxx | 39 + src/Batch/Batch_Job_Local.cxx | 81 + src/Batch/Batch_Job_Local.hxx | 50 + src/Batch/Batch_Parametre.cxx | 84 +- src/Batch/Batch_Parametre.hxx | 95 +- src/Batch/{Makefile.in => Makefile.am} | 132 +- src/Batch_SWIG/Makefile.am | 86 + src/CASCatch/CASCatch.hxx | 55 + src/CASCatch/Makefile.am | 9 + src/CASCatch/Makefile.in | 31 - src/Communication/Makefile.am | 78 + src/Communication/Makefile.in | 36 - src/Communication_SWIG/Makefile.am | 100 ++ src/Communication_SWIG/Makefile.in | 24 - src/Container/Container_i.cxx | 47 +- src/Container/Container_init_python.cxx | 6 +- src/Container/Makefile.am | 142 ++ src/Container/Makefile.in | 72 - src/Container/SALOME_Container.cxx | 16 +- .../SALOME_ContainerManagerServer.cxx | 3 +- src/Container/SALOME_Container_i.hxx | 2 +- src/DataTypeCatalog/Makefile.am | 113 ++ src/DataTypeCatalog/Makefile.in | 59 - .../SALOME_DataTypeCatalog_Server.cxx | 2 - src/GenericObj/Makefile.am | 27 + src/GenericObj/Makefile.in | 46 - src/HDFPersist/HDFdataset.cc | 2 +- src/HDFPersist/{Makefile.in => Makefile.am} | 34 +- .../Makefile.in => KERNEL_PY/Makefile.am} | 50 +- src/KERNEL_PY/Makefile.in | 38 - src/KERNEL_PY/iparameters.py | 199 +++ src/LifeCycleCORBA/Launchers.cxx | 7 +- src/LifeCycleCORBA/Makefile.am | 119 ++ src/LifeCycleCORBA/Makefile.in | 61 - src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx | 7 +- src/LifeCycleCORBA/Test/Makefile.am | 103 ++ src/LifeCycleCORBA/Test/Makefile.in | 71 - src/LifeCycleCORBA/Test_LifeCycleCORBA.cxx | 1 - src/LifeCycleCORBA_SWIG/Makefile.am | 94 ++ src/LifeCycleCORBA_SWIG/Makefile.in | 52 - src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py | 67 +- src/Logger/Makefile.am | 51 + src/Logger/Makefile.in | 40 - src/Logger/SALOME_Logger_Server.cxx | 104 -- src/Logger/SALOME_Logger_Server_main.cxx | 121 ++ src/Logger/Test/{Makefile.in => Makefile.am} | 44 +- src/MPIContainer/MPIContainer_i.cxx | 2 + src/MPIContainer/Makefile.am | 109 ++ src/MPIContainer/Makefile.in | 66 - src/MPIContainer/SALOME_MPIContainer.cxx | 1 - src/Makefile.am | 116 ++ src/Makefile.in | 86 - src/ModuleCatalog/Makefile.am | 116 ++ src/ModuleCatalog/Makefile.in | 72 - .../SALOME_ModuleCatalog_Server.cxx | 1 - .../{Makefile.in => Makefile.am} | 18 +- src/ModuleGenerator/testIDLparser.in | 2 +- src/ModuleGenerator/tests/test1.sh | 2 +- src/ModuleGenerator/tests/test1b.sh | 2 +- src/ModuleGenerator/tests/test2.sh | 2 +- src/ModuleGenerator/tests/test3.sh | 2 +- src/ModuleGenerator/tests/test4.sh | 2 +- src/ModuleGenerator/tests/test5.sh | 2 +- src/NOTIFICATION_SWIG/Makefile.am | 62 + src/NOTIFICATION_SWIG/Makefile.in | 51 - .../{Makefile.in => Makefile.am} | 42 +- src/NamingService/SALOME_NamingService.cxx | 26 +- src/NamingService/Test/Makefile.am | 95 ++ src/NamingService/Test/Makefile.in | 70 - src/Notification/Makefile.am | 72 + src/Notification/Makefile.in | 53 - src/Registry/Makefile.am | 73 + src/Registry/Makefile.in | 60 - src/Registry/SALOME_Registry_Server.cxx | 1 - src/ResourcesManager/Makefile.am | 84 + src/ResourcesManager/Makefile.in | 66 - src/RessourcesCatalog/Makefile.am | 116 ++ src/RessourcesCatalog/Makefile.in | 62 - .../SALOME_RessourcesCatalog_Server.cxx | 2 - src/SALOMEDS/Makefile.am | 335 ++++ src/SALOMEDS/Makefile.in | 141 -- src/SALOMEDS/SALOMEDS.cxx | 62 +- src/SALOMEDS/SALOMEDS_AttributeParameter.cxx | 481 ++++++ src/SALOMEDS/SALOMEDS_AttributeParameter.hxx | 77 + .../SALOMEDS_AttributeParameter_i.cxx | 347 ++++ .../SALOMEDS_AttributeParameter_i.hxx | 89 + src/SALOMEDS/SALOMEDS_Attributes.hxx | 5 +- src/SALOMEDS/SALOMEDS_ClientAttributes.hxx | 8 +- src/SALOMEDS/SALOMEDS_Driver_i.cxx | 107 +- src/SALOMEDS/SALOMEDS_Driver_i.hxx | 34 +- src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_GenericAttribute_i.hxx | 2 +- src/SALOMEDS/SALOMEDS_IParameters.cxx | 279 ++++ src/SALOMEDS/SALOMEDS_IParameters.hxx | 149 ++ src/SALOMEDS/SALOMEDS_SObject_i.cxx | 4 +- src/SALOMEDS/SALOMEDS_SObject_i.hxx | 4 +- src/SALOMEDS/SALOMEDS_Study.cxx | 37 +- src/SALOMEDS/SALOMEDS_Study.hxx | 6 +- src/SALOMEDS/SALOMEDS_StudyManager_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_StudyManager_i.hxx | 2 +- src/SALOMEDS/SALOMEDS_Study_i.cxx | 52 +- src/SALOMEDS/SALOMEDS_Study_i.hxx | 11 +- src/SALOMEDS/SALOMEDS_TMPFile_i.cxx | 96 ++ src/SALOMEDS/SALOMEDS_TMPFile_i.hxx | 70 + src/SALOMEDS/Test/Makefile.am | 110 ++ src/SALOMEDS/Test/SALOMEDSTest.cxx | 190 +++ src/SALOMEDS/Test/SALOMEDSTest.hxx | 48 + src/SALOMEDS/Test/TestSALOMEDS.cxx | 35 + src/SALOMEDS/Test/TestSALOMEDS.py | 29 + .../{Makefile.in => Makefile.am} | 51 +- src/SALOMEDSClient/SALOMEDSClient.hxx | 1 + .../SALOMEDSClient_AttributeParameter.hxx | 71 + .../SALOMEDSClient_ClientFactory.cxx | 112 ++ .../SALOMEDSClient_ClientFactory.hxx | 71 + src/SALOMEDSClient/SALOMEDSClient_Study.hxx | 8 +- src/SALOMEDSImpl/Makefile.am | 201 +++ src/SALOMEDSImpl/Makefile.in | 133 -- .../SALOMEDSImpl_AttributeComment.cxx | 3 +- .../SALOMEDSImpl_AttributeDrawable.cxx | 3 +- .../SALOMEDSImpl_AttributeExpandable.cxx | 3 +- .../SALOMEDSImpl_AttributeIOR.cxx | 7 +- .../SALOMEDSImpl_AttributeInteger.cxx | 3 +- .../SALOMEDSImpl_AttributeParameter.cxx | 765 +++++++++ .../SALOMEDSImpl_AttributeParameter.hxx | 119 ++ src/SALOMEDSImpl/SALOMEDSImpl_Attributes.hxx | 5 +- src/SALOMEDSImpl/SALOMEDSImpl_Driver.hxx | 33 +- src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx | 361 ++++ src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx | 153 ++ src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx | 76 +- src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx | 13 +- .../SALOMEDSImpl_StudyManager.cxx | 45 +- src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.cxx | 40 + src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx | 47 + src/SALOMEDSImpl/Test/Makefile.am | 106 ++ src/SALOMEDSImpl/Test/SALOMEDSImplTest.cxx | 129 ++ src/SALOMEDSImpl/Test/SALOMEDSImplTest.hxx | 39 + src/SALOMEDSImpl/Test/TestSALOMEDSImpl.cxx | 31 + src/SALOMEDSImpl/Test/TestSALOMEDSImpl.py | 29 + src/SALOMEDSImpl/testDS.cxx | 102 +- src/SALOMELocalTrace/BaseTraceCollector.cxx | 6 +- src/SALOMELocalTrace/LocalTraceBufferPool.cxx | 8 +- .../{Makefile.in => Makefile.am} | 46 +- src/SALOMELocalTrace/Test/Makefile.am | 78 + src/SALOMELocalTrace/Test/Makefile.in | 62 - src/SALOMETraceCollector/Makefile.am | 35 + src/SALOMETraceCollector/Makefile.in | 52 - src/SALOMETraceCollector/Test/Makefile.am | 90 + src/SALOMETraceCollector/Test/Makefile.in | 64 - src/TOOLSDS/Makefile.am | 55 + src/TOOLSDS/Makefile.in | 36 - src/TOOLSDS/SALOMEDS_Tool.cxx | 209 +-- src/TOOLSDS/SALOMEDS_Tool.hxx | 4 + src/TestContainer/Makefile.am | 104 ++ src/TestContainer/Makefile.in | 52 - src/TestContainer/TestComponentPy.py | 2 +- src/TestContainer/TestContainer.cxx | 4 +- src/TestContainer/TestLogger.py | 5 + src/TestMPIContainer/Makefile.am | 106 ++ src/TestMPIContainer/Makefile.in | 39 - src/TestMPIContainer/TestMPIContainer.cxx | 1 - src/UnitTests/Makefile.am | 83 + src/UnitTests/Makefile.in | 69 - src/UnitTests/UnitTests.cxx | 4 + src/Utils/{Makefile.in => Makefile.am} | 42 +- src/Utils/Test/Makefile.am | 88 + src/Utils/Test/Makefile.in | 64 - src/Utils/Utils_SignalsHandler.cxx | 123 -- src/Utils/Utils_SignalsHandler.h | 63 - 304 files changed, 13920 insertions(+), 7557 deletions(-) create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 ChangeLog rename Makefile.in => DEPRECATED/Makefile.in (79%) rename configure.in.base => DEPRECATED/configure.in.base (100%) rename make_config.in => DEPRECATED/make_config.in (100%) create mode 100644 Makefile.am create mode 100644 NEWS create mode 100644 bin/Makefile.am rename bin/{salome => }/runIDLparser.in (84%) create mode 100644 bin/runSalome.ksh create mode 100755 clean_configure create mode 100644 configure.ac create mode 100644 doc/Makefile.am delete mode 100644 doc/Makefile.in create mode 100644 doc/index.txt create mode 100644 doc/kernel_resources.txt create mode 100644 doc/rst.css create mode 100644 doc/salome/DevelopersGuide/Makefile.am delete mode 100644 doc/salome/DevelopersGuide/Makefile.in delete mode 100644 doc/salome/KernelResources/kernel_resources-1.html delete mode 100644 doc/salome/KernelResources/kernel_resources-2.html delete mode 100644 doc/salome/KernelResources/kernel_resources-3.html delete mode 100644 doc/salome/KernelResources/kernel_resources.html delete mode 100644 doc/salome/KernelResources/kernel_resources.lyx create mode 100644 doc/salome/Makefile.am delete mode 100644 doc/salome/Makefile.in create mode 100644 doc/salome/gui/Makefile.am delete mode 100644 doc/salome/gui/Makefile.in delete mode 100644 doc/salome/kernel_resources.pdf delete mode 100644 doc/salome/kernel_resources.ps create mode 100644 doc/salome/tui/Makefile.am delete mode 100644 doc/salome/tui/Makefile.in create mode 100755 doc/txt2html.sh create mode 100644 doc/userguide.txt create mode 100644 idl/Makefile.am delete mode 100644 idl/Makefile.in rename resources/{ => DEPRECATED}/Plugin.in (100%) create mode 100644 resources/Makefile.am create mode 100644 salome_adm/Makefile.am delete mode 100644 salome_adm/Makefile.in rename salome_adm/unix/{ => DEPRECATED}/Doxyfile (100%) rename salome_adm/unix/{ => DEPRECATED}/F77config.h.in (100%) rename salome_adm/unix/{ => DEPRECATED}/config.h.in (100%) rename salome_adm/unix/{ => DEPRECATED}/depend.in (100%) create mode 100644 salome_adm/unix/DEPRECATED/envScript.in rename salome_adm/unix/{ => DEPRECATED}/make_commence.in (78%) rename salome_adm/unix/{ => DEPRECATED}/make_conclude.in (98%) rename salome_adm/unix/{ => DEPRECATED}/make_module.in (100%) rename salome_adm/unix/{ => DEPRECATED}/make_omniorb.in (100%) rename salome_adm/unix/{ => DEPRECATED}/sstream.in (100%) create mode 100644 salome_adm/unix/Makefile.am rename salome_adm/unix/config_files/{ => DEPRECATED}/ac_cc_warnings.m4 (100%) rename salome_adm/unix/config_files/{ => DEPRECATED}/ac_cxx_bool.m4 (100%) rename salome_adm/unix/config_files/{ => DEPRECATED}/ac_cxx_mutable.m4 (100%) rename salome_adm/unix/config_files/{ => DEPRECATED}/ac_cxx_partial_specialization.m4 (100%) rename salome_adm/unix/config_files/{ => DEPRECATED}/ac_cxx_typename.m4 (100%) rename salome_adm/unix/config_files/{ => DEPRECATED}/check_Salome.m4 (94%) rename salome_adm/unix/config_files/{ => DEPRECATED}/check_java.m4 (100%) rename salome_adm/unix/config_files/{ => DEPRECATED}/check_mico.m4 (100%) rename salome_adm/unix/config_files/{ => DEPRECATED}/check_pthreads.m4 (92%) rename salome_adm/unix/config_files/{ => DEPRECATED}/config.guess (100%) rename salome_adm/unix/config_files/{ => DEPRECATED}/config.sub (100%) rename salome_adm/unix/config_files/{ => DEPRECATED}/install-sh (96%) rename salome_adm/unix/config_files/{ => DEPRECATED}/libtool.m4 (100%) rename salome_adm/unix/config_files/{ => DEPRECATED}/ltconfig (100%) rename salome_adm/unix/config_files/{ => DEPRECATED}/ltmain.sh (100%) rename salome_adm/unix/config_files/{ => DEPRECATED}/missing (100%) rename salome_adm/unix/config_files/{ => DEPRECATED}/mkinstalldirs (100%) create mode 100644 salome_adm/unix/config_files/Makefile.am create mode 100644 salome_adm/unix/config_files/acx_pthread.m4 create mode 100755 salome_adm/unix/config_files/check_local.m4 delete mode 100755 salome_adm/unix/config_files/check_msg2qm.m4 delete mode 100644 salome_adm/unix/config_files/check_pyqt.m4 delete mode 100644 salome_adm/unix/config_files/check_qwt.m4 delete mode 100644 salome_adm/unix/config_files/check_sip.m4 delete mode 100644 salome_adm/unix/config_files/check_vtk.m4 delete mode 100644 salome_adm/unix/envScript.in create mode 100644 salome_adm/unix/make_common_starter.am rename src/Basics/{Makefile.in => Makefile.am} (71%) rename src/Basics/Test/{Makefile.in => Makefile.am} (68%) create mode 100644 src/Batch/Batch_BatchManager_Local.cxx create mode 100644 src/Batch/Batch_BatchManager_Local.hxx create mode 100644 src/Batch/Batch_BatchManager_Local_RSH.cxx create mode 100644 src/Batch/Batch_BatchManager_Local_RSH.hxx create mode 100644 src/Batch/Batch_BatchManager_Local_SH.cxx create mode 100644 src/Batch/Batch_BatchManager_Local_SH.hxx create mode 100644 src/Batch/Batch_BatchManager_Local_SSH.cxx create mode 100644 src/Batch/Batch_BatchManager_Local_SSH.hxx create mode 100644 src/Batch/Batch_FactBatchManager_Local.cxx create mode 100644 src/Batch/Batch_FactBatchManager_Local.hxx create mode 100644 src/Batch/Batch_FactBatchManager_Local_RSH.cxx create mode 100644 src/Batch/Batch_FactBatchManager_Local_RSH.hxx create mode 100644 src/Batch/Batch_FactBatchManager_Local_SH.cxx create mode 100644 src/Batch/Batch_FactBatchManager_Local_SH.hxx create mode 100644 src/Batch/Batch_FactBatchManager_Local_SSH.cxx create mode 100644 src/Batch/Batch_FactBatchManager_Local_SSH.hxx create mode 100644 src/Batch/Batch_IOMutex.cxx create mode 100644 src/Batch/Batch_IOMutex.hxx create mode 100644 src/Batch/Batch_JobInfo_Local.cxx create mode 100644 src/Batch/Batch_JobInfo_Local.hxx create mode 100644 src/Batch/Batch_Job_Local.cxx create mode 100644 src/Batch/Batch_Job_Local.hxx rename src/Batch/{Makefile.in => Makefile.am} (55%) create mode 100644 src/Batch_SWIG/Makefile.am create mode 100644 src/CASCatch/CASCatch.hxx create mode 100644 src/CASCatch/Makefile.am delete mode 100644 src/CASCatch/Makefile.in create mode 100644 src/Communication/Makefile.am delete mode 100644 src/Communication/Makefile.in create mode 100644 src/Communication_SWIG/Makefile.am delete mode 100644 src/Communication_SWIG/Makefile.in create mode 100644 src/Container/Makefile.am delete mode 100644 src/Container/Makefile.in create mode 100644 src/DataTypeCatalog/Makefile.am delete mode 100644 src/DataTypeCatalog/Makefile.in create mode 100644 src/GenericObj/Makefile.am delete mode 100644 src/GenericObj/Makefile.in rename src/HDFPersist/{Makefile.in => Makefile.am} (76%) rename src/{Batch_SWIG/Makefile.in => KERNEL_PY/Makefile.am} (63%) mode change 100644 => 100755 delete mode 100755 src/KERNEL_PY/Makefile.in create mode 100755 src/KERNEL_PY/iparameters.py create mode 100644 src/LifeCycleCORBA/Makefile.am delete mode 100644 src/LifeCycleCORBA/Makefile.in create mode 100644 src/LifeCycleCORBA/Test/Makefile.am delete mode 100644 src/LifeCycleCORBA/Test/Makefile.in create mode 100644 src/LifeCycleCORBA_SWIG/Makefile.am delete mode 100644 src/LifeCycleCORBA_SWIG/Makefile.in create mode 100644 src/Logger/Makefile.am delete mode 100644 src/Logger/Makefile.in create mode 100644 src/Logger/SALOME_Logger_Server_main.cxx rename src/Logger/Test/{Makefile.in => Makefile.am} (67%) create mode 100644 src/MPIContainer/Makefile.am delete mode 100644 src/MPIContainer/Makefile.in create mode 100644 src/Makefile.am delete mode 100644 src/Makefile.in create mode 100644 src/ModuleCatalog/Makefile.am delete mode 100644 src/ModuleCatalog/Makefile.in rename src/ModuleGenerator/{Makefile.in => Makefile.am} (81%) create mode 100644 src/NOTIFICATION_SWIG/Makefile.am delete mode 100644 src/NOTIFICATION_SWIG/Makefile.in rename src/NamingService/{Makefile.in => Makefile.am} (65%) create mode 100644 src/NamingService/Test/Makefile.am delete mode 100644 src/NamingService/Test/Makefile.in create mode 100644 src/Notification/Makefile.am delete mode 100644 src/Notification/Makefile.in create mode 100644 src/Registry/Makefile.am delete mode 100644 src/Registry/Makefile.in create mode 100755 src/ResourcesManager/Makefile.am delete mode 100755 src/ResourcesManager/Makefile.in create mode 100644 src/RessourcesCatalog/Makefile.am delete mode 100644 src/RessourcesCatalog/Makefile.in create mode 100644 src/SALOMEDS/Makefile.am delete mode 100644 src/SALOMEDS/Makefile.in create mode 100644 src/SALOMEDS/SALOMEDS_AttributeParameter.cxx create mode 100644 src/SALOMEDS/SALOMEDS_AttributeParameter.hxx create mode 100644 src/SALOMEDS/SALOMEDS_AttributeParameter_i.cxx create mode 100644 src/SALOMEDS/SALOMEDS_AttributeParameter_i.hxx create mode 100644 src/SALOMEDS/SALOMEDS_IParameters.cxx create mode 100644 src/SALOMEDS/SALOMEDS_IParameters.hxx create mode 100644 src/SALOMEDS/SALOMEDS_TMPFile_i.cxx create mode 100644 src/SALOMEDS/SALOMEDS_TMPFile_i.hxx create mode 100644 src/SALOMEDS/Test/Makefile.am create mode 100644 src/SALOMEDS/Test/SALOMEDSTest.cxx create mode 100644 src/SALOMEDS/Test/SALOMEDSTest.hxx create mode 100644 src/SALOMEDS/Test/TestSALOMEDS.cxx create mode 100644 src/SALOMEDS/Test/TestSALOMEDS.py rename src/SALOMEDSClient/{Makefile.in => Makefile.am} (62%) create mode 100644 src/SALOMEDSClient/SALOMEDSClient_AttributeParameter.hxx create mode 100644 src/SALOMEDSClient/SALOMEDSClient_ClientFactory.cxx create mode 100644 src/SALOMEDSClient/SALOMEDSClient_ClientFactory.hxx create mode 100644 src/SALOMEDSImpl/Makefile.am delete mode 100644 src/SALOMEDSImpl/Makefile.in create mode 100644 src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx create mode 100644 src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.hxx create mode 100644 src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx create mode 100644 src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx create mode 100644 src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.cxx create mode 100644 src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx create mode 100644 src/SALOMEDSImpl/Test/Makefile.am create mode 100644 src/SALOMEDSImpl/Test/SALOMEDSImplTest.cxx create mode 100644 src/SALOMEDSImpl/Test/SALOMEDSImplTest.hxx create mode 100644 src/SALOMEDSImpl/Test/TestSALOMEDSImpl.cxx create mode 100644 src/SALOMEDSImpl/Test/TestSALOMEDSImpl.py rename src/SALOMELocalTrace/{Makefile.in => Makefile.am} (59%) create mode 100644 src/SALOMELocalTrace/Test/Makefile.am delete mode 100644 src/SALOMELocalTrace/Test/Makefile.in create mode 100644 src/SALOMETraceCollector/Makefile.am delete mode 100644 src/SALOMETraceCollector/Makefile.in create mode 100644 src/SALOMETraceCollector/Test/Makefile.am delete mode 100644 src/SALOMETraceCollector/Test/Makefile.in create mode 100644 src/TOOLSDS/Makefile.am delete mode 100644 src/TOOLSDS/Makefile.in create mode 100644 src/TestContainer/Makefile.am delete mode 100644 src/TestContainer/Makefile.in create mode 100644 src/TestContainer/TestLogger.py create mode 100644 src/TestMPIContainer/Makefile.am delete mode 100644 src/TestMPIContainer/Makefile.in create mode 100644 src/UnitTests/Makefile.am delete mode 100644 src/UnitTests/Makefile.in rename src/Utils/{Makefile.in => Makefile.am} (67%) create mode 100644 src/Utils/Test/Makefile.am delete mode 100644 src/Utils/Test/Makefile.in delete mode 100644 src/Utils/Utils_SignalsHandler.cxx delete mode 100644 src/Utils/Utils_SignalsHandler.h diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 000000000..e69de29bb diff --git a/COPYING b/COPYING new file mode 100644 index 000000000..d60c31a97 --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 000000000..e69de29bb diff --git a/Makefile.in b/DEPRECATED/Makefile.in similarity index 79% rename from Makefile.in rename to DEPRECATED/Makefile.in index 42dedf940..39f1d1672 100644 --- a/Makefile.in +++ b/DEPRECATED/Makefile.in @@ -41,25 +41,11 @@ salome.launch \ envSalome.py \ salomeConsole.py \ showNS.py \ -addToKillList.py \ -NSparam.py +addToKillList.py # copy header files in common directory -OWN_CONFIG_H=@OWN_CONFIG_H@ - -ifeq ($(OWN_CONFIG_H),yes) - ifeq ($(HAVE_SSTREAM),yes) - include_list=include/salome/SALOMEconfig.h include/salome/config.h - else - include_list=include/salome/SALOMEconfig.h include/salome/config.h include/salome/sstream - endif -else - ifeq ($(HAVE_SSTREAM),yes) - include_list=include/salome/SALOMEconfig.h - else - include_list=include/salome/SALOMEconfig.h include/salome/sstream - endif -endif +include_list=\ + include/salome/SALOMEconfig.h inc: idl $(include_list) @@ -76,22 +62,20 @@ salome_adm/unix/SALOMEconfig.ref: salome_adm/unix/SALOMEconfig.h cp -p $< $@; \ fi; \ -include/salome/config.h: salome_adm/unix/config.h - -$(RM) $@ - $(LN_S) ../../$< $@ - -include/salome/sstream: salome_adm/unix/sstream - -$(RM) $@ - $(LN_S) ../../$< $@ - depend: depend_idl depend_idl: (cd idl ; $(MAKE) $@) || exit 1 # doc is already build : if you want to had documents, go manually to doc and run 'make doc' -#doc: -# (cd doc && $(MAKE) $@) || exit 1 + + +DOCFILES=\ + README.FIRST.html + +rstdoc: $(DOCFILES) + (cd doc && $(MAKE) $@) || exit 1 + # Install make_commence make_conclude ... for other modules install-make: @@ -137,7 +121,7 @@ distclean: distclean-other distclean-other: -$(RM) salome_adm/unix/*~ salome_adm/unix/*% salome_adm/unix/*.bak salome_adm/unix/*.new salome_adm/unix/*.old -$(RM) salome_adm/unix/make_* - -$(RM) salome_adm/unix/depend salome_adm/unix/SALOMEconfig.h salome_adm/unix/config.h + -$(RM) salome_adm/unix/depend salome_adm/unix/SALOMEconfig.h -$(RM) config.cache config.log config.status @MODULE@ diff --git a/configure.in.base b/DEPRECATED/configure.in.base similarity index 100% rename from configure.in.base rename to DEPRECATED/configure.in.base diff --git a/make_config.in b/DEPRECATED/make_config.in similarity index 100% rename from make_config.in rename to DEPRECATED/make_config.in diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 000000000..e8f17aa00 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,29 @@ +# -* Makefile *- +# +# Author : Guillaume BOULANT (CSSI) +# Date : 09/11/2005 +# $Header$ +# + +if CORBA_GEN + IDLDIR = idl +endif + +SUBDIRS = $(IDLDIR) src doc salome_adm bin resources + +DIST_SUBDIRS= idl src doc salome_adm bin resources + +DISTCLEANFILES = a.out + +EXTRA_DIST = \ + build_configure \ + clean_configure \ + LICENCE \ + README.FIRST.txt \ + DEPRECATED + +dist-hook: + rm -rf `find $(distdir) -name CVS` + +userdoc: + (cd doc && $(MAKE) $(AM_MAKEFLAGS) userdoc) \ No newline at end of file diff --git a/NEWS b/NEWS new file mode 100644 index 000000000..e69de29bb diff --git a/bin/Makefile.am b/bin/Makefile.am new file mode 100644 index 000000000..eecb208a3 --- /dev/null +++ b/bin/Makefile.am @@ -0,0 +1,60 @@ +# -* Makefile *- +# +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL +# $Header$ +# + + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Files to be installed +# =============================================================== +# + +# These files are data, module or lib files +dist_salomescript_DATA= \ + VERSION \ + orbmodule.py \ + salome.launch \ + salomeConsole.py + +# These files are executable scripts +dist_salomescript_SCRIPTS=\ + envSalome.py \ + runIDLparser \ + runSalome.py \ + killSalome.py \ + killSalomeWithPort.py \ + runSalome \ + runSalome.csh \ + runNS.sh \ + createAppli.sh \ + launchConfigureParser.py \ + showNS.py \ + addToKillList.py \ + NSparam.py + +EXTRA_DIST = appliskel + +dist-hook: + rm -rf `find $(distdir)/appliskel -name CVS` + +DISTCLEANFILES = $(top_builddir)/bin/@PACKAGE@/Makefile.am + +clean-local: + rm -rf $(top_builddir)/bin/@PACKAGE@/appliskel + cd $(top_builddir)/bin/@PACKAGE@; \ + rm -f $(dist_salomescript_DATA) $(dist_salomescript_SCRIPTS) + +# This is an ugly target to avoid exploring the appliskel subdirectory. +install-exec-local: + $(INSTALL) -d $(salomescriptdir) + cp -r $(srcdir)/appliskel $(salomescriptdir) + find $(salomescriptdir) -name CVS | xargs rm -rf + +uninstall-local: + find $(salomescriptdir)/appliskel -exec chmod +w {} \; + rm -rf $(salomescriptdir)/appliskel diff --git a/bin/appliskel/killCurrentPort b/bin/appliskel/killCurrentPort index bca506068..5d0a547cc 100755 --- a/bin/appliskel/killCurrentPort +++ b/bin/appliskel/killCurrentPort @@ -14,7 +14,8 @@ myhost=`hostname` fileOmniConfig=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg if [ -f $fileOmniConfig ]; then - export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg + OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg + export OMNIORB_CONFIG fi currentPort=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port` diff --git a/bin/appliskel/runRemote.sh b/bin/appliskel/runRemote.sh index 594616a07..293ecff6d 100755 --- a/bin/appliskel/runRemote.sh +++ b/bin/appliskel/runRemote.sh @@ -31,9 +31,12 @@ # --- set the OMNIORB_CONFIG file and environment relative to this run of SALOME -export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_$1_$2.cfg -export NSHOST=$1 -export NSPORT=$2 +OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_$1_$2.cfg +export OMNIORB_CONFIG +NSHOST=$1 +export NSHOST +NSPORT=$2 +export NSPORT initref="NameService=corbaname::"$1":$2" echo "ORBInitRef $initref" > $OMNIORB_CONFIG @@ -41,4 +44,4 @@ echo "ORBInitRef $initref" > $OMNIORB_CONFIG shift 2 -${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile $HOME/$APPLI/.bashrc -c "$*" +${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile $HOME/$APPLI/.bashrc -c "$*" diff --git a/bin/appliskel/runSession b/bin/appliskel/runSession index 22d3fdd0f..c0a26ba13 100755 --- a/bin/appliskel/runSession +++ b/bin/appliskel/runSession @@ -19,19 +19,22 @@ myhost=`hostname` fileOmniConfig=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg if [ -f $fileOmniConfig ]; then - export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg + OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg + export OMNIORB_CONFIG # --- set environment variables for port and hostname of NamingService - export NSHOST=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py host` - export NSPORT=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port` + NSHOST=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py host` + export NSHOST + NSPORT=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port` + export NSPORT fi # --- invoque shell with or without args if [ $# -ne 0 ] ; then - ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc -c "$*" + ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc -c "$*" else - ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc + ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc fi diff --git a/bin/appliskel/runTests b/bin/appliskel/runTests index 755825d79..8e360b05d 100755 --- a/bin/appliskel/runTests +++ b/bin/appliskel/runTests @@ -21,13 +21,16 @@ searchFreePort() { if [ -z "$aRes" ]; then echo ${NSPORT} - Ok local myhost=`hostname` - export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg + OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg + export OMNIORB_CONFIG export NSPORT - export NSHOST=${myhost} + NSHOST=${myhost} + export NSHOST local initref="NameService=corbaname::"`hostname`":$NSPORT" #echo "ORBInitRef $initref" > $OMNIORB_CONFIG echo "InitRef = $initref" > $OMNIORB_CONFIG - export LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_test.cfg + LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_test.cfg + export LAST_RUNNING_CONFIG rm ${LAST_RUNNING_CONFIG} ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG} break @@ -55,10 +58,10 @@ fi searchFreePort if [ $# -ne 0 ] ; then - ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc -c "$*" + ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc -c "$*" else - ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc + ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc fi rm ${OMNIORB_CONFIG} diff --git a/bin/appliskel/searchFreePort.sh b/bin/appliskel/searchFreePort.sh index 8108a93dc..3fd3c0dd8 100755 --- a/bin/appliskel/searchFreePort.sh +++ b/bin/appliskel/searchFreePort.sh @@ -4,7 +4,8 @@ searchFreePort() { echo -n "Searching for a free port for naming service: " - export NSPORT=2810 + NSPORT=2810 + export NSPORT local limit=$NSPORT let limit=limit+100 while [ 1 ] @@ -13,13 +14,16 @@ searchFreePort() { if [ -z "$aRes" ]; then echo ${NSPORT} - Ok local myhost=`hostname` - export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg + OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg + export OMNIORB_CONFIG export NSPORT - export NSHOST=${myhost} + NSHOST=${myhost} + export NSHOST local initref="NameService=corbaname::"`hostname`":$NSPORT" #echo "ORBInitRef $initref" > $OMNIORB_CONFIG echo "InitRef = $initref" > $OMNIORB_CONFIG - export LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg + LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg + export LAST_RUNNING_CONFIG rm ${LAST_RUNNING_CONFIG} ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG} break diff --git a/bin/createAppli.sh b/bin/createAppli.sh index 1ff6ed6de..36c6146b4 100755 --- a/bin/createAppli.sh +++ b/bin/createAppli.sh @@ -3,11 +3,11 @@ comName=`which $0` rep=`dirname $comName` -if [ $# -ne 1 ] +if [ $# -ne 1 ]; then echo "--- usage:" echo $0 AppliName echo "--- In which AppliName is a directory to create with SALOME application scripts" -elif [ -d $1] +elif [ -d $1 ]; then echo $1 "directory already exists, nothing done" else mkdir -p $1 diff --git a/bin/killSalomeWithPort.py b/bin/killSalomeWithPort.py index e52a25f88..9f0cd0dd9 100755 --- a/bin/killSalomeWithPort.py +++ b/bin/killSalomeWithPort.py @@ -34,7 +34,21 @@ def killMyPort(port): pass if found: - a = os.system("pid=`ps -eo pid,command | egrep \"[0-9] omniNames -start "+str(port)+"\" | sed -e \"s%[^0-9]*\([0-9]*\) .*%\\1%g\"`; kill -9 $pid >& /dev/null") + cmd = 'pid=`ps -eo pid,command | egrep "[0-9] omniNames -start '+str(port)+'"` ; echo $pid > /tmp/logs/'+os.getenv('USER')+"/_"+port+'_Pid_omniNames.log' + a = os.system(cmd) + try: + fpidomniNames=open('/tmp/logs/'+os.getenv('USER')+"/_"+port+'_Pid_omniNames.log') + prc = fpidomniNames.read() + fpidomniNames.close() + if prc != None : + for field in prc.split(" ") : + if field == "omniNames" : + if pidfield != "egrep" : + print 'stop process '+pidfield+' : omniNames' + os.system('kill -9 '+pidfield) + pidfield = field + except: + pass try: process_ids=pickle.load(fpid) fpid.close() diff --git a/bin/launchConfigureParser.py b/bin/launchConfigureParser.py index a9d0c273c..99540b3f3 100755 --- a/bin/launchConfigureParser.py +++ b/bin/launchConfigureParser.py @@ -161,6 +161,17 @@ class xml_parser: # - command line config_var = appname+'Config' +# set resources variables if not yet set +if os.getenv("GUI_ROOT_DIR"): + if not os.getenv("SUITRoot"): os.environ["SUITRoot"] = os.getenv("GUI_ROOT_DIR") + "/share/salome" + if not os.getenv("SalomeAppConfig"): os.environ["SalomeAppConfig"] = os.getenv("GUI_ROOT_DIR") + "/share/salome/resources" + pass +else : + if not os.getenv("SUITRoot"): + os.environ["SUITRoot"] = "" + if not os.getenv("SalomeAppConfig"): + os.environ["SalomeAppConfig"] = "" + dirs = os.environ[config_var] dirs = re.split('[;|:]', dirs ) dirs.reverse() # reverse order, like in "path" variable - FILO-style processing diff --git a/bin/salome/runIDLparser.in b/bin/runIDLparser.in similarity index 84% rename from bin/salome/runIDLparser.in rename to bin/runIDLparser.in index 9f3afa861..cb41a7488 100644 --- a/bin/salome/runIDLparser.in +++ b/bin/runIDLparser.in @@ -1,4 +1,4 @@ -#! /bin/bash +#! /bin/sh # print the help message ==================================== @@ -32,12 +32,6 @@ if test "$hh" = "1" ; then fi #============================================================ -# environment ============================================== -@ENVSCRIPT@ - -cd $DIR -#============================================================ - # omiidl ==================================================== omniidl -bIDLparser -I ${KERNEL_ROOT_DIR}/idl/salome $@ #============================================================ diff --git a/bin/runNS.sh b/bin/runNS.sh index b5c155a6c..589d2db50 100755 --- a/bin/runNS.sh +++ b/bin/runNS.sh @@ -18,7 +18,7 @@ touch ${BaseDir}/logs/${Username}/dummy echo "Name Service... " aSedCommand="s/.*NameService=corbaname::`hostname`:\([[:digit:]]*\)/\1/" -aPort=`sed -e"$aSedCommand" $OMNIORB_CONFIG` +aPort=`cat $OMNIORB_CONFIG | grep NameService | sed -e"$aSedCommand"` omniNames -start $aPort -logdir ${BaseDir}/logs/${Username} & # In LifeCycleCORBA, FactoryServer is started with rsh on the requested diff --git a/bin/runSalome.ksh b/bin/runSalome.ksh new file mode 100644 index 000000000..970288626 --- /dev/null +++ b/bin/runSalome.ksh @@ -0,0 +1,77 @@ +#!/bin/ksh + +searchFreePort() { + echo -n "Searching for a free port for naming service: " + NSPORT=2810 + export NSPORT + local limit=$NSPORT + let limit=limit+100 + while [ 1 ] + do + aRes=`netstat -ltn | grep -E :${NSPORT}` + if [ -z "$aRes" ]; then + echo ${NSPORT} - Ok + local myhost=`hostname` + OMNIORB_CONFIG=${HOME}/.omniORB_${myhost}_${NSPORT}.cfg + export OMNIORB_CONFIG + local initref="NameService=corbaname::"`hostname`":$NSPORT" + export NSPORT + if [[ `python -c "import CORBA; print CORBA.ORB_ID"` = "omniORB4" ]]; then + echo "InitRef = $initref" > $OMNIORB_CONFIG + else + echo "ORBInitRef $initref" > $OMNIORB_CONFIG + fi + break + fi + echo -n "${NSPORT} " + if [[ $NSPORT -eq $limit ]] ; then + echo + echo "Can't find a free port to launch omniNames" + echo "Try to kill the running servers and then launch SALOME again." + exit + fi + let NSPORT=NSPORT+1 + done +} + +searchFreePort + +if [[ "$*" = "-nothing" ]]; then + echo "port:$NSPORT" +elif [ $# -ne 0 ] ; then + python -i ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py $* +else + python ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py +fi + +# ----------------------------------------------------------------------------- +# examples: +# --------- +# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome +# +# - parameters for launching are taken from $HOME/.salome/salome.launch; +# - 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 +# +# parameters from command line supersede those from $HOME/.salome/salome.launch +# +# Some CORBA servers can be launched in the SALOME_Session_Server's process +# (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 +# +# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome -h +# help +# ----------------------------------------------------------------------------- +# +# l'option -i permet de garder l'interpreteur python ouvert : +# par defaut, les differents serveurs ouvrent des fenĂȘtres xterm +# (cf. runSalome.py) +# le serveur Logger n'est pas obligatoire (commentĂ© dans runSalome.py) +# +# ----------------------------------------------------------------------------- +# 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 diff --git a/bin/runSalome.py b/bin/runSalome.py index 98ff0a19f..8b19f288e 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -56,8 +56,9 @@ def get_config(): modules_list = [] if args.has_key("modules"): modules_list += args["modules"] - # KERNEL must be last in the list to locate it at the first place in PATH - modules_list[:0] = ["GUI"] + # KERNEL must be last in the list to locate it at the first place in PATH + if args["gui"] : + modules_list[:0] = ["GUI"] modules_list[:0] = ["KERNEL"] modules_list.reverse() @@ -103,7 +104,8 @@ def set_env(args, modules_list, modules_root_dir): python_version="python%d.%d" % sys.version_info[0:2] modules_root_dir_list = [] - modules_list = modules_list[:] + ["GUI"] + if args["gui"] : + modules_list = modules_list[:] + ["GUI"] modules_list = modules_list[:] + ["KERNEL"] for module in modules_list : if modules_root_dir.has_key(module): @@ -187,10 +189,10 @@ def set_env(args, modules_list, modules_root_dir): # set environment for SUPERV module os.environ["ENABLE_MACRO_NODE"]="1" # set resources variables if not yet set - if os.getenv("GUI_ROOT_DIR"): - if not os.getenv("SUITRoot"): os.environ["SUITRoot"] = os.getenv("GUI_ROOT_DIR") + "/share/salome" - if not os.getenv("SalomeAppConfig"): os.environ["SalomeAppConfig"] = os.getenv("GUI_ROOT_DIR") + "/share/salome/resources" - pass + # Done now by launchConfigureParser.py + #if os.getenv("GUI_ROOT_DIR"): + #if not os.getenv("SUITRoot"): os.environ["SUITRoot"] = os.getenv("GUI_ROOT_DIR") + "/share/salome" + #if not os.getenv("SalomeAppConfig"): os.environ["SalomeAppConfig"] = os.getenv("GUI_ROOT_DIR") + "/share/salome/resources" # set CSF_PluginDefaults variable only if it is not customized # by the user @@ -324,7 +326,11 @@ class CatalogServer(Server): cata_path=[] list_modules = modules_list[:] list_modules.reverse() - for module in ["KERNEL", "GUI"] + list_modules: + 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" @@ -389,7 +395,10 @@ class LoggerServer(Server): class SessionServer(Server): def __init__(self,args): - self.args=args + self.args = args.copy() + # Bug 11512 (Problems with runSalome --xterm on Mandrake and Debian Sarge) + self.args['xterm']=0 + # self.initArgs() self.SCMD1=['SALOME_Session_Server'] self.SCMD2=[] @@ -417,7 +426,7 @@ class SessionServer(Server): self.SCMD2+=['SUPERV'] if self.args['gui']: self.SCMD2+=['GUI'] - if self.args['splash']: + if self.args['splash'] and self.args['gui']: self.SCMD2+=['SPLASH'] if self.args['noexcepthandler']: self.SCMD2+=['noexcepthandler'] @@ -431,7 +440,11 @@ class SessionServer(Server): cata_path=[] list_modules = modules_list[:] list_modules.reverse() - for module in ["KERNEL", "GUI"] + list_modules: + 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 @@ -439,7 +452,7 @@ class SessionServer(Server): glob.glob(os.path.join(module_root_dir,"share", salome_subdir,"resources", module_cata))) - if 'moduleCatalog' in self.args['embedded']: + if (self.args["gui"]) & ('moduleCatalog' in self.args['embedded']): self.CMD=self.SCMD1 + [string.join(cata_path,':')] + self.SCMD2 else: self.CMD=self.SCMD1 + self.SCMD2 @@ -452,23 +465,26 @@ class ContainerManagerServer(Server): self.initArgs() self.SCMD1=['SALOME_ContainerManagerServer'] self.SCMD2=[] - if 'registry' in self.args['embedded']: - self.SCMD1+=['--with','Registry', - '(','--salome_session','theSession',')'] - if 'moduleCatalog' in self.args['embedded']: - self.SCMD1+=['--with','ModuleCatalog','(','-common'] - self.SCMD2+=['-personal', - '${HOME}/Salome/resources/CatalogModulePersonnel.xml',')'] - if 'study' in self.args['embedded']: - self.SCMD2+=['--with','SALOMEDS','(',')'] - if 'cppContainer' in self.args['embedded']: - self.SCMD2+=['--with','Container','(','FactoryServer',')'] + if args["gui"] : + if 'registry' in self.args['embedded']: + self.SCMD1+=['--with','Registry', + '(','--salome_session','theSession',')'] + if 'moduleCatalog' in self.args['embedded']: + self.SCMD1+=['--with','ModuleCatalog','(','-common'] + self.SCMD2+=['-personal', + '${HOME}/Salome/resources/CatalogModulePersonnel.xml',')'] + if 'study' in self.args['embedded']: + 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() - for module in ["KERNEL", "GUI"] + list_modules: + 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" @@ -479,7 +495,7 @@ class ContainerManagerServer(Server): module_cata))) pass pass - if 'moduleCatalog' in self.args['embedded']: + if (self.args["gui"]) & ('moduleCatalog' in self.args['embedded']): self.CMD=self.SCMD1 + [string.join(cata_path,':')] + self.SCMD2 else: self.CMD=self.SCMD1 + self.SCMD2 @@ -503,7 +519,13 @@ class NotifyServer(Server): def startGUI(): """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() @@ -544,7 +566,7 @@ def startSalome(args, modules_list, modules_root_dir): # attente de la disponibilite du Registry dans le Naming Service # - if 'registry' not in args['embedded']: + if ('registry' not in args['embedded']) | (args["gui"] == 0) : myServer=RegistryServer(args) myServer.run() clt.waitNSPID("/Registry",myServer.PID) @@ -555,7 +577,7 @@ def startSalome(args, modules_list, modules_root_dir): # - if 'moduleCatalog' not in args['embedded']: + if ('moduleCatalog' not in args['embedded']) | (args["gui"] == 0): cataServer=CatalogServer(args) cataServer.setpath(modules_list,modules_root_dir) cataServer.run() @@ -568,7 +590,7 @@ def startSalome(args, modules_list, modules_root_dir): # #print "ARGS = ",args - if 'study' not in args['embedded']: + if ('study' not in args['embedded']) | (args["gui"] == 0): print "RunStudy" myServer=SalomeDSServer(args) myServer.run() @@ -629,17 +651,24 @@ def startSalome(args, modules_list, modules_root_dir): # Lancement Session Server # - mySessionServ = SessionServer(args) - mySessionServ.setpath(modules_list,modules_root_dir) - mySessionServ.run() + if args["gui"]: + mySessionServ = SessionServer(args) + mySessionServ.setpath(modules_list,modules_root_dir) + mySessionServ.run() ##---------------- - # Attente de la disponibilite du Session Server dans le Naming Service - # + # Attente de la disponibilite du Session Server dans le Naming Service + # - import SALOME - import SALOME_Session_idl - session=clt.waitNSPID("/Kernel/Session",mySessionServ.PID,SALOME.Session) + import Engines + import SALOME + import SALOMEDS + import SALOME_ModuleCatalog + reload(Engines) + reload(SALOME) + reload(SALOMEDS) + import SALOME_Session_idl + session=clt.waitNSPID("/Kernel/Session",mySessionServ.PID,SALOME.Session) end_time = os.times() print diff --git a/build_configure b/build_configure index d3294fb59..c682f1fad 100755 --- a/build_configure +++ b/build_configure @@ -1,224 +1,84 @@ -#!/bin/bash - -# -# Tool for updating list of .in file for the SALOME project -# and regenerating configure script -# -# Author : Marc Tajchman - CEA -# Date : 10/10/2002 -# $Header$ -# - -ORIG_DIR=`pwd` -CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` - -######################################################################## -# find_in - utility function -# -# usage : -# find_in directory filename +#!/bin/sh +# ==================================================================== +# This script is just here to illustrate the procedure for preparing +# the configure process. It creates configuration files (ex: +# ltmain.sh) using libtoolize, the aclocal macro, the configure script +# using autoconf and some scripts used in building process (ex: +# install-sh) using automake. Automake is used here to creates the +# files Makefile.in from the files Makefile.am. +# ==================================================================== # -# Finds files following the *.in pattern, recursively in the -# directory (first argument). -# Results are appended into the file (second argument) -# -# Difference from the standard unix find is that files are tested -# before directories -# - -find_in() -{ -#CCRT - #local i - i=0 - #local f=$2 - f=$2 - -# if the first argument is not a directory, returns - - if [ ! -d "$1" ] ; then - return - fi - -# dont look in the CVS directories - - case $1 in - */CVS) return ;; - *) ;; - esac - -# for each regular file contained in the directory -# test if it's a .in file - for i in "$1"/* - do - if [ -f "$i" ] ; then - case $i in - *.in) echo " "$i" \\" >> $f;; - *) ;; - esac - fi - done -# for each subdirectory of the first argument, proceeds recursively +# ____________________________________________________________________ +# aclocal creates the aclocal.m4 file from the standard macro and the +# custom macro embedded in the directory salome_adm/unix/config_files. +# output: +# aclocal.m4 +# autom4te.cache (directory) +echo "====================================================== aclocal" - for i in "$1"/* - do - if [ -d "$i" ] ; then - find_in "$i" "$f" - fi - done -} +aclocal -I salome_adm/unix/config_files || exit 1 -####################################################################### -# Generate list of .in files (Makefile.in, config.h.in, etc) -# appending it in file configure.in +# ____________________________________________________________________ +# libtoolize creates some configuration files (ltmain.sh, +# config.guess and config.sub). It only depends on the libtool +# version. The files are created in the directory specified with the +# AC_CONFIG_AUX_DIR() tag (see configure.ac). +# output: +# salome_adm/unix/config_files/config.guess +# salome_adm/unix/config_files/config.sub +# salome_adm/unix/config_files/ltmain.sh +echo "====================================================== libtoolize" -cd ${CONF_DIR} -ABS_CONF_DIR=`pwd` +libtoolize --force --copy --automake || exit 1 -# -# Common part of the configure.in file -# -chmod u+w configure.in.base -#CCRT -#if ! \cp -f configure.in.base configure.in_tmp1 -if \cp -f configure.in.base configure.in_tmp1 -then - echo -else - echo - echo "error : can't create files in" ${CONF_DIR} - echo "aborting ..." - chmod u-w configure.in.base - exit -fi -chmod u-w configure.in.base -############################################# -echo '' >> configure.in_tmp1 -echo 'export TEMPO=${KERNEL_ROOT_DIR}' >> configure.in_tmp1 -echo 'export KERNEL_ROOT_DIR=${ROOT_SRCDIR}' >> configure.in_tmp1 -############################################# +# ____________________________________________________________________ +# autoconf creates the configure script from the file configure.ac (or +# configure.in if configure.ac doesn't exist) +# output: +# configure +echo "====================================================== autoconf" -echo "" >> configure.in_tmp1 -echo "AC_OUTPUT([ \\" >> configure.in_tmp1 +autoconf -# -# List of .in files in the adm/unix directory -# These files MUST be on top of AC_OUTPUT list so we -# put them "manually" -# +# ____________________________________________________________________ +# autoheader creates config.h.in +# output: +# configure +#echo "====================================================== autoheader" -echo " ./salome_adm/unix/SALOMEconfig.h \\" >> configure.in_tmp1 -echo " ./salome_adm/unix/F77config.h \\" >> configure.in_tmp1 -echo " ./salome_adm/unix/sstream \\" >> configure.in_tmp1 -echo " ./salome_adm/unix/depend \\" >> configure.in_tmp1 -echo " ./salome_adm/unix/make_omniorb \\" >> configure.in_tmp1 -echo " ./salome_adm/unix/envScript \\" >> configure.in_tmp1 -echo " ./salome_adm/unix/make_commence \\" >> configure.in_tmp1 -echo " ./salome_adm/unix/make_conclude \\" >> configure.in_tmp1 -echo " ./salome_adm/unix/make_module \\" >> configure.in_tmp1 -echo " ./salome_adm/Makefile \\" >> configure.in_tmp1 +#autoheader -\rm -f configure.in_tmp2 configure.in_tmp3 -touch configure.in_tmp2 -find_in . configure.in_tmp2 -sed '/^...salome_adm/d' configure.in_tmp2 > configure.in_tmp3 -sed '/configure.in/d;/make_config.in/d' configure.in_tmp3 > configure.in_tmp2 -sed 's/.in / /' configure.in_tmp2 >> configure.in_tmp1 +# ____________________________________________________________________ +# automake creates some scripts used in building process +# (install-sh, missing, ...). It only depends on the automake +# version. The files are created in the directory specified with the +# AC_CONFIG_AUX_DIR() tag (see configure.ac). This step also +# creates the Makefile.in files from the Makefile.am files. +# output: +# salome_adm/unix/config_files/compile +# salome_adm/unix/config_files/depcomp +# salome_adm/unix/config_files/install-sh +# salome_adm/unix/config_files/missing +# salome_adm/unix/config_files/py-compile +# Makefile.in (from Makefile.am) +echo "====================================================== automake" -echo "])" >> configure.in_tmp1 +automake --add-missing --copy --gnu -############################################# -echo 'export KERNEL_ROOT_DIR=${TEMPO}' >> configure.in_tmp1 -############################################# -\mv configure.in_tmp1 configure.in_new -\rm -f configure.in_tmp2 configure.in_tmp3 - - -######################################################################## -# Create new (or replace old) configure.in file -# Print a message if the file is write protected +# ____________________________________________________________________ # - -echo -if test ! -f configure.in -then - echo -n "Creating new file 'configure.in' ... " - if \mv configure.in_new configure.in >& /dev/null - then - echo "done" - else - echo "error, check your file permissions" - fi -else - echo -n "Updating 'configure.in' file ... " -#CCRT -# if ! \cp configure.in configure.in_old >& /dev/null - if \cp configure.in configure.in_old >& /dev/null - then - echo - else - echo - echo - echo "Can't backup previous configure.in" - echo -n "Continue (you will not be able to revert) - (Y/N) ? " - read R - case "x$R" in - xn*) exit;; - xN*) exit;; - esac - echo - echo -n " " - fi - if \cp configure.in_new configure.in >& /dev/null - then - echo "done" - else - echo - echo "error, can't update previous configure.in" - fi -fi - -######################################################################## -# Use autoconf to rebuild the configure script +# Note that automake could be executed at last after autoconf. The +# order doesn't matter. # - -if test -f configure -then - echo -n "Updating 'configure' script ... " -else - echo -n "Creating 'configure' script ... " -fi - -aclocal --acdir=adm_local/unix/config_files -I salome_adm/unix/config_files -if autoconf -then - echo "done" -else - echo "failed (check file permissions and/or user quotas ...)" -fi - -############################################################### -# Creating make_config +# When modifying a Makefile.am file, after a first step of +# configure+make, you just have to : +# - go to the top source directory and run automake, to rebuild the Makefile.in, +# - go to the top build directory and run config.status to rebuild the +# Makefile from the Makefile.in, +# - go to the source directory being modified, and then run make. # -if test -f make_config -then - echo -n "Updating 'make_config' script ... " -else - echo -n "Creating 'make_config' script ... " -fi - -if autoconf -o make_config make_config.in -then - echo "done" -else - echo "failed (check file permissions and/or user quotas ...)" -fi - -cd ${ORIG_DIR} - -echo diff --git a/clean_configure b/clean_configure new file mode 100755 index 000000000..a0073fb98 --- /dev/null +++ b/clean_configure @@ -0,0 +1,23 @@ +#!/bin/sh + +rm -rf autom4te.cache aclocal.m4 configure make_config +find . -name "*~" -print -exec rm {} \; +find . -name "*.pyc" -print -exec rm {} \; +#exit +# ==================== ON SORT AVANT + +here=`pwd` +libdir=salome_adm/unix/config_files +cd $libdir +# Files created by libtoolize +rm -f config.guess config.sub ltmain.sh +# Files created by automake +rm -rf install-sh missing compile depcomp py-compile +cd $here +find bin -name Makefile.in | xargs rm -f +find doc -name Makefile.in | xargs rm -f +find idl -name Makefile.in | xargs rm -f +find resources -name Makefile.in | xargs rm -f +find salome_adm -name Makefile.in | xargs rm -f +find src -name Makefile.in | xargs rm -f +rm -f Makefile.in diff --git a/configure.ac b/configure.ac new file mode 100644 index 000000000..7fe63445c --- /dev/null +++ b/configure.ac @@ -0,0 +1,524 @@ +# +# ================================================================ +# Process this file with autoconf to produce a configure script +# ================================================================ +# +#AC_PREREQ(2.59) +#AC_INIT(src) +AC_INIT([Salome2 Project], [3.1.0], [gboulant@CS], [salome]) + +# 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 +#AC_CONFIG_HEADER([config.h]) + +PACKAGE=salome +AC_SUBST(PACKAGE) + +VERSION=3.1.0 +AC_SUBST(VERSION) + + +echo +echo --------------------------------------------- +echo Initialize source and build root directories +echo --------------------------------------------- +echo + +# +# This function return on stdout the absolute path of the filename in +# argument. Exemple: +# $ filename="../KERNEL_SRC/configure +# $ absfilename=`absolute_path $filename` +function absolute_path { + filename=$1 + here=`pwd` + apath=`dirname $filename` + cd $apath + apath=`pwd` + cd $here + echo $apath +} + +# Build directory, where the configure script is executed. +ROOT_BUILDDIR=`pwd` +# Source directory, where the configure script is located. +ROOT_SRCDIR=`absolute_path $0` + +AC_SUBST(ROOT_SRCDIR) +AC_SUBST(ROOT_BUILDDIR) + +echo +echo Source root directory : $ROOT_SRCDIR +echo Build root directory : $ROOT_BUILDDIR + +# ---------------------------------------------------------------------------- +# --- test options + +AC_ARG_ENABLE(corba_gen, + [AC_HELP_STRING([--enable-corba-gen],[Generate CORBA stuff [default=yes]])], + [case "${enableval}" in + yes) corba_gen=true ;; + no) corba_gen=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-corba-gen) ;; + esac],[corba_gen=true]) +AM_CONDITIONAL(CORBA_GEN, test x$corba_gen = xtrue) + +# ---------------------------------------------------------------------------- + +echo +echo +echo ============================================================ +echo testing general mandatory products - for all configurations +echo ============================================================ +echo + +dnl Modification B. Secher portage sur osf +AC_CHECK_PROG(SHELL,sh) +AC_SUBST(SHELL) + +if test -z "$AR"; then + AC_CHECK_PROGS(AR,ar xar,:,$PATH) +fi +AC_SUBST(AR) + +echo +echo --------------------------------------------- +echo testing make +echo --------------------------------------------- +echo +AC_PROG_MAKE_SET +AC_PROG_INSTALL + +echo +echo --------------------------------------------- +echo Configuring production +echo --------------------------------------------- +echo +# production.m4 +AC_ENABLE_DEBUG(yes) +AC_DISABLE_PRODUCTION + +echo +echo --------------------------------------------- +echo testing libtool +echo --------------------------------------------- +echo + +dnl first, we set static to no! +dnl if we want it, use --enable-static +AC_ENABLE_STATIC(no) +AC_LIBTOOL_DLOPEN +AC_PROG_LIBTOOL + +echo +echo --------------------------------------------- +echo testing C/C++ +echo --------------------------------------------- +echo + +cc_ok=no +AC_PROG_CC +AC_PROG_CXX +AC_CXX_WARNINGS +AC_CXX_TEMPLATE_OPTIONS +AC_DEPEND_FLAG +# AC_CC_WARNINGS([ansi]) +cc_ok=yes + +dnl Library libdl : +AC_CHECK_LIB(dl,dlopen) + +dnl Library librt : for alpha/osf +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 + +# Testing linker +AC_LINKER_OPTIONS + +echo +echo --------------------------------------------- +echo testing threads +echo --------------------------------------------- +echo + +ENABLE_PTHREADS + +echo +echo --------------------------------------------- +echo testing python +echo --------------------------------------------- +echo + +CHECK_PYTHON + +echo +echo --------------------------------------------- +echo testing swig +echo --------------------------------------------- +echo + +dnl _CS_gbo We should use here a variable given from the CHECK_PYTHON +AM_PATH_PYTHON(2.3) +CHECK_SWIG + +echo +echo --------------------------------------------- +echo testing HDF5 +echo --------------------------------------------- +echo + +CHECK_HDF5 + +echo +echo --------------------------------------------- +echo Testing OpenCascade +echo --------------------------------------------- +echo + +CHECK_CAS + +# ---------------------------------------------------------------------------- +# --- test corba + +if test x$corba_gen = xtrue; then + +echo +echo ============================================================ +echo testing mandatory products for CORBA configurations +echo ============================================================ +echo + +dnl +dnl --------------------------------------------- +dnl testing sockets +dnl --------------------------------------------- +dnl + +CHECK_SOCKETS + +echo +echo --------------------------------------------- +echo Configuration of the ORB +echo --------------------------------------------- +echo + +echo Testing OMNIORB ... +CHECK_OMNIORB + +echo Selecting the default ORB +DEFAULT_ORB=omniORB +echo DEFAULT_ORB : $DEFAULT_ORB +CHECK_CORBA + +CORBA=salome_adm/unix/make_$ORB +AC_SUBST_FILE(CORBA) + +# _CS_gbo: +# The CORBA variable defines the file name that +# implements the building rules to be included by Makefile to process +# idl files and CORBA specific dependencies (ex: the file +# salome_adm/unix/make_omniorb is the default for SALOME). The value +# of ORB is defined by CHECK_CORBA. + +# Note that this checking process is no longer relevant for SALOME +# because the possibility of changing the ORB as a plugin is probably +# deprecated. The software configuration is clearly omniorb for CORBA +# communication. This could be simplify in a near futur. + +echo +echo --------------------------------------------- +echo Testing QT +echo --------------------------------------------- +echo +# Qt must be kept because kernel makes use of qxml and some other +# non-graphical stuff. +CHECK_QT + +echo +echo --------------------------------------------- +echo BOOST Library +echo --------------------------------------------- +echo + +CHECK_BOOST + +fi +# --- end test corba +# ---------------------------------------------------------------------------- + +echo +echo ============================================================ +echo testing optionnal products +echo ============================================================ +echo + +echo +echo --------------------------------------------- +echo checking if MPI is requested by user +echo --------------------------------------------- +echo + +CHECK_MPI + +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_SUBST(WITH_BATCH) +AM_CONDITIONAL(WITH_BATCH, [test x"$WITH_BATCH" = xyes]) + +echo +echo ---------------------------------------------- +echo testing CPPUNIT only required for unit testing +echo ---------------------------------------------- +echo +CHECK_CPPUNIT + +echo +echo ============================================================ +echo testing products required only for documentation generation +echo ============================================================ +echo + +echo +echo --------------------------------------------- +echo Testing html generators +echo --------------------------------------------- +echo + +CHECK_HTML_GENERATORS + +echo +echo ============================================================ +echo Summary +echo ============================================================ +echo + +# This function displays the values of each variable given in arguments +function summary { + variables=$* + for var in $variables + do + eval toto=\$$var + if test x$toto != "x"; then + printf " %10s : " `echo \$var | sed -e "s,_ok,,"` + eval echo \$$var + fi + done +} + +# -------------------------------------- + +function check_fatal_error { + variables=$* + for var in $variables + do + eval toto=\$$var + if test x$toto != "xyes"; then + echo "FATAL ERROR: some mandatory products are missing." + echo "Installing the missing products is required before running the configure script". + exit 1 + fi + done +} + +# -------------------------------------- + +basic_mandatory_products="cc_ok threads_ok python_ok swig_ok hdf5_ok occ_ok" +echo --- General mandatory products - Light configuration: +summary $basic_mandatory_products +check_fatal_error $basic_mandatory_products +echo + +corba_mandatory_products="omniORB_ok qt_ok boost_ok" +if test x$corba_gen = xtrue; then + echo --- CORBA mandatory products - default configuration: + summary $corba_mandatory_products + check_fatal_error $corba_mandatory_products +else + echo --- CORBA products not required - option --disable-corba-gen +fi +echo + +if test x$MPIREQUESTED = xyes; then + requested_products="mpi_ok" + echo --- products requested by user + summary $requested_products + check_fatal_error $requested_products + echo +fi + +optional_products="cppunit_ok openpbs_ok lsf_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 + +htmldoc_products="doxygen_ok graphviz_ok rst2html_ok" + +echo --- Html documentation products: only required for doc production +summary $htmldoc_products +echo + +echo +echo "Default ORB : $DEFAULT_ORB" +echo + +dnl generals files which could be included in every makefile + +AC_SUBST_FILE(COMMENCE) COMMENCE=salome_adm/unix/make_commence +AC_SUBST_FILE(CONCLUDE) CONCLUDE=salome_adm/unix/make_conclude +AC_SUBST_FILE(MODULE) MODULE=salome_adm/unix/make_module + +dnl les dependences +AC_SUBST_FILE(DEPEND) DEPEND=salome_adm/unix/depend + +dnl We don t need to say when we re entering directories if we re using +dnl GNU make becuase make does it for us. +if test "X$GMAKE" = "Xyes"; then + AC_SUBST(SETX) SETX=":" +else + AC_SUBST(SETX) SETX="set -x" +fi + +echo +echo --------------------------------------------- +echo copying resource files, shell scripts, and +echo xml files +echo --------------------------------------------- +echo + + +mkdir -p bin/salome +cd bin/salome +for i in `find $ROOT_SRCDIR/bin` +do + local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR/bin,.,"` + case "$local_bin" in + *.in | *~) ;; + . | */CVS | */CVS/* | ./salome) ;; + ./appliskel |./appliskel/env.d) $INSTALL -d $local_bin ; echo $local_bin ;; + *) $INSTALL $i $local_bin; echo $local_bin ;; + esac +done +cd $ROOT_BUILDDIR + +echo +echo --------------------------------------------- +echo generating Makefiles and configure files +echo --------------------------------------------- +echo + +AC_OUTPUT_COMMANDS([ \ + chmod +x ./bin/*; \ + chmod +x ./bin/salome/* \ +]) + +# 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([ \ + ./salome_adm/unix/SALOMEconfig.h \ + ./salome_adm/Makefile \ + ./salome_adm/unix/Makefile \ + ./salome_adm/unix/config_files/Makefile \ + ./Makefile \ + ./bin/Makefile \ + ./bin/runIDLparser \ + ./doc/Makefile \ + ./doc/salome/Makefile \ + ./doc/salome/DevelopersGuide/DevelopersGuide.tex \ + ./doc/salome/DevelopersGuide/Makefile \ + ./doc/salome/gui/Makefile \ + ./doc/salome/tui/Makefile \ + ./idl/Makefile \ + ./resources/Makefile \ + ./src/Makefile \ + ./src/Basics/Makefile \ + ./src/Basics/Test/Makefile \ + ./src/Batch/Makefile \ + ./src/Batch_SWIG/Makefile \ + ./src/CASCatch/Makefile \ + ./src/Communication/Makefile \ + ./src/Communication_SWIG/Makefile \ + ./src/Container/Makefile \ + ./src/DataTypeCatalog/Makefile \ + ./src/GenericObj/Makefile \ + ./src/HDFPersist/Makefile \ + ./src/KERNEL_PY/Makefile \ + ./src/LifeCycleCORBA/Makefile \ + ./src/LifeCycleCORBA/Test/Makefile \ + ./src/LifeCycleCORBA_SWIG/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/RessourcesCatalog/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 \ +]) + diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 000000000..30c621e67 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,32 @@ +# -* Makefile *- +# +# Author : Paul RASCLE (EDF) +# Date : 06/02/2006 +# $Header$ +# + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +SUBDIRS = salome + +doc_DATA = \ + index.html \ + UnitTests.html \ + SALOME_Application.html \ + INSTALL.html \ + kernel_resources.html + +EXTRA_DIST=$(doc_DATA) + + +# Building html from restructured text files +STYLESHEET=rst.css +RST2HTML=@RST2HTML@ +RSTOPTS=--output-encoding=latin1 --stylesheet=$(STYLESHEET) +#RSTOPTS=--output-encoding=latin1 + +%.html: $(srcdir)/%.txt + $(RST2HTML) $(RSTOPTS) $< $@ + +userdoc: + (cd salome && $(MAKE) $(AM_MAKEFLAGS) userdoc) \ No newline at end of file diff --git a/doc/Makefile.in b/doc/Makefile.in deleted file mode 100644 index 7295ede75..000000000 --- a/doc/Makefile.in +++ /dev/null @@ -1,40 +0,0 @@ - -# -* Makefile *- -# -# Author : Patrick GOLDBRONN (CEA) -# Date : 30/11/2001 -# $Header$ -# -# source path -top_srcdir=@top_srcdir@ -top_builddir=.. -srcdir=@srcdir@ -VPATH=.:@srcdir@ - -SUBDIRS= salome - -@COMMENCE@ - -docs: - @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ - done -clean: - @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ - done - -distclean: clean - @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ - done - -install: - @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ - done - -uninstall: - @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ - done diff --git a/doc/SALOME_Application.txt b/doc/SALOME_Application.txt index 590bf2c8f..83e016276 100644 --- a/doc/SALOME_Application.txt +++ b/doc/SALOME_Application.txt @@ -5,7 +5,7 @@ SALOME Application Concept. Configuration for one or more computers *html version of this document is produced with docutils*:: - rest2html < doc.txt > doc.html + rst2html doc.txt > doc.html This document corresponds to SALOME2 3.1. (alpha version) @@ -16,23 +16,12 @@ This document corresponds to SALOME2 3.1. (alpha version) 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. -Summary -------- +.. contents:: +.. sectnum:: -`1. General principles`_ -`2. Application Directory`_ - -`2.1 Proposal for env.d scripts`_ - -`2.2 User run scripts`_ - -`2.3 SALOME internal run script`_ - -`2.4 Other configuration files`_ - -1. General principles ---------------------- +General principles +------------------ A SALOME application is defined by a set of modules (GEOM, SMESH, ASTER...). @@ -63,8 +52,8 @@ account@computer is via rsh or ssh and must be configured for use without password (key exchange for ssh). Account may be different on each computer. -2. Application Directory ------------------------- +Application Directory +--------------------- The script createAppli.sh in ${KERNEL_ROOT_DIR}/bin/salome creates an application directory with the given path in parameter. ${APPLI} is a path @@ -94,8 +83,8 @@ alphanumeric order (after edition, think to remove backup files). the envd script is used by run scripts. -2.1 Proposal for env.d scripts -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +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**. @@ -117,8 +106,8 @@ envSALOME.sh Note that ${APPLI} is already defined by the calling scripts when env.d/envSalome.sh is sourced. -2.2 User run scripts -~~~~~~~~~~~~~~~~~~~~ +User run scripts +~~~~~~~~~~~~~~~~ The SALOME user can use 4 scripts: @@ -143,8 +132,8 @@ runTests and port number), runTests defines a new configuration for naming service (new port number). -2.3 SALOME internal run scripts -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +SALOME internal run scripts +~~~~~~~~~~~~~~~~~~~~~~~~~~~ envd Sets SALOME application environment, envd is sourced by other scripts. @@ -156,8 +145,8 @@ runRemote.sh define the hostname and port userd for naming service, the remaining arguments define the command to execute. -2.4 Other configuration files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Other configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~ SalomeApp.xml This file is similar to the default given diff --git a/doc/index.txt b/doc/index.txt new file mode 100644 index 000000000..aebc24f86 --- /dev/null +++ b/doc/index.txt @@ -0,0 +1,86 @@ + +================================================================= +General information, for developpers and users +================================================================= + +.. contents:: +.. sectnum:: + + +*html version of this document is produced with docutils*:: + + rst2html < doc.txt > doc.html + +This document corresponds to SALOME2 3.1. (alpha version) + ++-------------------------------------------+ +| **WORK in PROGRESS, INCOMPLETE DOCUMENT** | ++-------------------------------------------+ + +Developpers and users, which documentation ? +============================================ + +Following your kind of usage of SALOME, you will find some specific +introductory documentation, listed below. + +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. + + +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. + +End user +-------- + +The end user may have to configure his own SALOME applicatin by selection of a +subset of availables SALOME modules. He also may want to install his +application on several computers. + + +Documentation for developpers and module maintainers +==================================================== + +Source code structuration and Unit Tests +---------------------------------------- + +See UnitTests_ for general information on code directories structure, +unit tests associated to the different kind of classes, and how to run +the unit tests. + +.. _UnitTests: ./UnitTests.html + +Documentation for application integrators and adminstrators +=========================================================== + +How to install SALOME +--------------------- + +See INSTALL_ for general information on required configuration and +prerequisites, compilation procedure, setting environment principles. + +.. _INSTALL: ./INSTALL.html + +How to run SALOME on one or more computers, 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: ./SALOME_Application.html + + +End User documentation +====================== + +link to end user documentation. + + diff --git a/doc/kernel_resources.txt b/doc/kernel_resources.txt new file mode 100644 index 000000000..2c65d2236 --- /dev/null +++ b/doc/kernel_resources.txt @@ -0,0 +1,491 @@ +====================================================================== +SALOME Kernel resources for developer +====================================================================== + +*html version of this document is produced with docutils*:: + + rst2html doc.txt > doc.html + +:Authors: + Antoine Yessayan, + Paul Rascle + +:Version: 0.3 - february 17, 2006 + ++-------------------------------------------+ +| **WORK in PROGRESS, INCOMPLETE DOCUMENT** | ++-------------------------------------------+ + +**Abstract** + +This document describes the development environment for +C++ and Python. Makefiles generation and usage are +introduced in another document: "using the SALOME +configuration and building system environment". +Development environment is intended here as: trace and +debug macros usage; SALOME exceptions usage, in C++ and +Python; user CORBA exceptions usage, in C++ and Python, +with and without Graphical User Interface; some general +purpose services such as singleton, used for CORBA +connection and disconnection. + +.. contents:: +.. sectnum:: + +Trace and debug Utilities +========================= + +During the development process, an execution log is +useful to identify problems. This log contains +messages, variables values, source files names and line +numbers. It is recommended to verify assertions on +variables values and if necessary, to stop the +execution at debug time, in order to validate all parts +of code. + +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 +process. The purpose of the utilities provided in +SALOME is to help the developer to add detailed traces +and check variables values, without writing a lot of code. + +When the code is assumed to be valid, the release mode +optimizes execution, in terms of speed, memory, and +display only user level messages. + +But, some informations must always be displayed in both +modes: especially messages concerning environment or +internal errors, with version identification. When an +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. + +C++ Macros for trace and debug +------------------------------ + +SALOME provides C++ macros for trace and debug. These +macros are in:: + + 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_`` +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 +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 +unchanged in the source. + +All the macros generate trace messages, stored in a +circular buffer pool. A separate thread reads the +messages in the buffer pool, and, depending on options +given at SALOME start, writes the messages on the +standard output, a file, or send them via CORBA, in +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. + +Macros defined in debug and release modes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**INFOS_COMPILATION** + 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_. + + Example:: + + #include "utilities.h" + int main(int argc , char **argv) + { + INFOS_COMPILATION; + ... + } + INFOS(str) + +**INFOS** + 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. + + Example:: + + #include "utilities.h" + int main(int argc , char **argv) + { + ... + INFOS("NORMAL END OF THE PROCESS"); + return 0; + } + + displays:: + + main.cxx [5] : NORMAL END OF THE PROCESS + + +**INTERRUPTION(str)** + 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)** + 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. + +Macros defined only in debug mode +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**MESSAGE(str)** + 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. + + Example:: + + #include "utilities.h" + #include + + using namespace std; + + int main(int argc , char **argv) + { + ... + const char *str = "Salome"; + MESSAGE(str); + ... const string st; + st = "Aster"; + MESSAGE(c_str(st+" and CASTEM")); + return 0; + } + + displays:: + + - Trace main.cxx [8] : Salome + - Trace main.cxx [12] : Aster and CASTEM + +**BEGIN_OF(func_name)** + 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. + + Example:: + + #include "utilities.h" + int main(int argc , char **argv) + { + BEGIN_OF(argv[0]); + return 0; + } + + displays:: + + - Trace main.cxx [3] : Begin of a.out + + +**END_OF(func_name)** + 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. + + Example:: + + #include "utilities.h" + int main(int argc , char **argv) + { + END_OF(argv[0]); + return 0; + } + + displays:: + + - Trace main.cxx [4] : Normal end of a.out + +**SCRUTE(var)** + 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. + + Example:: + + #include "utilities.h" + int main(int argc , char **argv) + { + const int i=999; + if( i > 0 ) SCRUTE(i) ; i=i+1; + return 0; + } + + displays:: + + - Trace main.cxx [5] : i=999 + +**ASSERT(condition)** + 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. + + Example:: + + #include "utilities.h" + ... + const char *ptrS = fonc(); + ASSERT(ptrS!=NULL); + cout << strlen(ptrS); + float table[10]; + int k; + ... + ASSERT(k<10); + cout << table[k]; + +Exceptions +========== + +C++ exceptions: class SALOME_Exception +-------------------------------------- + +definition +~~~~~~~~~~ + +The class SALOME_Exception provides a generic method to +send a message, with optional source file name and line +number. This class is intended to serve as a base class +for all kinds of exceptions SALOME code. All the +exceptions derived from SALOME_Exception could be +handled in a single catch, in which the message +associated to the exception is displayed, or sent to a +log file. + +The class SALOME_Exception inherits its behavior from +the STL class exception. + +usage +~~~~~ + +The header SALOME/src/utils/utils_SALOME_Exception.hxx +must be included in the C++ source, when raised or trapped:: + + #include "utils_SALOME_Exception.hxx" + +The SALOME_Exception constructor is:: + + SALOME_Exception( const char *text, + const char *fileName=0, + const unsigned int lineNumber=0 ); + +The exception is raised like this:: + + throw SALOME_Exception("my pertinent message"); + +or like this:: + + throw SALOME_Exception(LOCALIZED("my pertinent message")); + +where LOCALIZED is a macro provided with +``utils_SALOME_Exception.hxx`` which gives file name and +line number. + +The exception is handled like this:: + + try + { + ... + } + catch (const SALOME_Exception &ex) + { + cerr << ex.what() <::Instance() ; + assert(ptrPoint!=NULL) ; + +No need to delete ptrPoint. Deletion is achieved +automatically at exit. If the user tries to create more +than one singleton by using the class method +SINGLETON_::Instance(), the pointer is returned +with the same value even if this is done in different +functions (threads ?):: + + POINT *p1=SINGLETON_::Instance() ; + ... + POINT *p2=SINGLETON_::Instance() ; + + assert(p1==p2) + +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 + returns a pointer to the single object ; + +* 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 + 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_()``. diff --git a/doc/rst.css b/doc/rst.css new file mode 100644 index 000000000..eb02941b5 --- /dev/null +++ b/doc/rst.css @@ -0,0 +1,288 @@ +/* +:Authors: David Goodger, David Abrahams +:Contact: goodger@users.sourceforge.net, dave@boost-consulting.com +:date: $Date$ +:version: $Revision$ +:copyright: This stylesheet has been placed in the public domain. + +This stylesheet is for the use of ReStructuredText in a Boost context. +It is basically an agglomeration of boost.css and the default.css that +comes from docutils. + + */ + +.first { + margin-top: 0 } + +.last { + margin-bottom: 0 } + +a.toc-backref { + text-decoration: none ; + color: #00008B } + +dd { + margin-bottom: 0.5em } + +div.abstract { + margin: 2em 5em } + +div.abstract p.topic-title { + font-weight: bold ; + text-align: center } + +div.attention, div.caution, div.danger, div.error, div.hint, +div.important, div.note, div.tip, div.warning, div.admonition { + margin: 2em ; + border: medium outset ; + padding: 1em } + +div.attention p.admonition-title, div.caution p.admonition-title, +div.danger p.admonition-title, div.error p.admonition-title, +div.warning p.admonition-title { + color: red ; + font-weight: bold ; + font-family: sans-serif } + +div.hint p.admonition-title, div.important p.admonition-title, +div.note p.admonition-title, div.tip p.admonition-title, +div.admonition p.admonition-title { + font-weight: bold ; + font-family: sans-serif } + +div.dedication { + margin: 2em 5em ; + text-align: center ; + font-style: italic } + +div.dedication p.topic-title { + font-weight: bold ; + font-style: normal } + +div.figure { + margin-left: 2em } + +div.footer, div.header { + font-size: smaller } + +div.sidebar { + margin-left: 1em ; + border: medium outset ; + padding: 0em 1em ; + background-color: #ffffee ; + width: 40% ; + float: right ; + clear: right } + +div.sidebar p.rubric { + font-family: sans-serif ; + font-size: medium } + +div.system-messages { + margin: 5em } + +div.system-messages h1 { + color: red } + +div.system-message { + border: medium outset ; + padding: 1em } + +div.system-message p.system-message-title { + color: red ; + font-weight: bold } + +div.topic { + margin: 2em } + +H1.title +{ + FONT-SIZE: 200%; + COLOR: #00008B; + text-align: center +} +H1 +{ + FONT-SIZE: 150%; +} +H2 +{ + FONT-SIZE: 125%; +} +h2.subtitle { + text-align: center } +H3 +{ + FONT-SIZE: 108%; +} +BODY +{ + FONT-SIZE: 100%; + BACKGROUND-COLOR: #ffffff; +} +PRE +{ + MARGIN-LEFT: 2em; + FONT-FAMILY: Courier; +} +CODE +{ + FONT-FAMILY: Courier; + white-space: pre; +} +.pre +{ + FONT-FAMILY: Courier; + white-space: pre; +} +.index +{ + TEXT-ALIGN: left; +} +.page-index +{ + TEXT-ALIGN: left; +} +.definition +{ + TEXT-ALIGN: left; +} +.footnote +{ + FONT-SIZE: 66%; + VERTICAL-ALIGN: super; + TEXT-DECORATION: none; +} +.function-semantics +{ + CLEAR: left; +} + +hr { + width: 75% } + +ol.simple, ul.simple { + margin-bottom: 1em } + +ol.arabic { + list-style: decimal } + +ol.loweralpha { + list-style: lower-alpha } + +ol.upperalpha { + list-style: upper-alpha } + +ol.lowerroman { + list-style: lower-roman } + +ol.upperroman { + list-style: upper-roman } + +p.attribution { + text-align: right ; + margin-left: 50% } + +p.caption { + font-style: italic } + +p.credits { + font-style: italic ; + font-size: smaller } + +p.label { + white-space: nowrap } + +p.rubric { + font-weight: bold ; + font-size: larger ; + color: maroon ; + text-align: center } + +p.sidebar-title { + font-family: sans-serif ; + font-weight: bold ; + font-size: larger } + +p.sidebar-subtitle { + font-family: sans-serif ; + font-weight: bold } + +p.topic-title { + font-weight: bold } + +pre.address { + margin-bottom: 0 ; + margin-top: 0 ; + font-family: serif ; + font-size: 100% } + +pre.line-block { + font-family: serif ; + font-size: 100% } + +pre.literal-block, pre.doctest-block { + margin-left: 2em ; + margin-right: 2em ; + font-size: 80%; + border: solid thin gray ; + background-color: #eeeeee } + +span.classifier { + font-family: sans-serif ; + font-style: oblique } + +span.classifier-delimiter { + font-family: sans-serif ; + font-weight: bold } + +span.interpreted { + font-family: sans-serif } + +span.option { + white-space: nowrap } + +span.option-argument { + font-style: italic } + +span.pre { + white-space: pre } + +span.problematic { + color: red } + +table { + margin-top: 0.5em ; + margin-bottom: 0.5em } + +table.citation { + border-left: solid thin gray ; + padding-left: 0.5ex } + +table.docinfo { + margin: 2em 4em } + +table.footnote { + border-left: solid thin black ; + padding-left: 0.5ex } + +td, th { + padding-left: 0.5em ; + padding-right: 0.5em ; + vertical-align: top } + +th.docinfo-name, th.field-name { + font-weight: bold ; + text-align: left ; + white-space: nowrap } + +/* + dwa 2003/7/29 -- commented out so that it wouldn't override earlier + styles from boost.css + +h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { + font-size: 100% } +*/ + +ul.auto-toc { + list-style-type: none } diff --git a/doc/salome/DevelopersGuide/Makefile.am b/doc/salome/DevelopersGuide/Makefile.am new file mode 100644 index 000000000..05493e641 --- /dev/null +++ b/doc/salome/DevelopersGuide/Makefile.am @@ -0,0 +1,33 @@ +# -* Makefile *- +# +# Author : Paul RASCLE (EDF) +# Date : 16/02/2006 +# $Header$ +# + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +TEX=DevelopersGuide.tex +TEX_PS=$(TEX:%.tex=%.ps) +TEX_PDF=$(TEX:%.tex=%.pdf) + +#userdoc: $(TEX_PS) $(TEX_PDF) +userdoc: + @echo document tex a revoir + +clean: + \rm -f *~ *.bak *.aux *.log *.dvi *.toc $(TEX:%.tex=%.out) + \rm -f dummy thumb* + + +SUFFIXES = .tex .dvi .ps .pdf + +#implicits rules +.tex.dvi: clean + $(LATEX) $< + +.dvi.ps: + $(DVIPS) $< -o $@ + +.tex.pdf: clean + $(PDFLATEX) $< diff --git a/doc/salome/DevelopersGuide/Makefile.in b/doc/salome/DevelopersGuide/Makefile.in deleted file mode 100644 index be472d9a6..000000000 --- a/doc/salome/DevelopersGuide/Makefile.in +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Patrick GOLDBRONN (CEA) -# Module : doc -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@ - - -TEX=DevelopersGuide.tex -TEX_PS=$(TEX:%.tex=%.ps) -TEX_PDF=$(TEX:%.tex=%.pdf) - -.SUFFIXES: .tex .dvi .ps .pdf - -docs: $(TEX_PS) clean $(TEX_PDF) clean - -clean: - \rm -f *~ *.bak *.aux *.log *.dvi *.toc $(TEX:%.tex=%.out) - \rm -f dummy thumb* - -distclean: clean - \rm -f $(TEX_PS) $(TEX_PDF) - -install: - -#implicits rules -.tex.dvi: clean - @[ "x@LATEX@" != "x" ] && [ latex $< ] || \ - echo "Can'not execute .tex.dvi rule" - -.dvi.ps: - @[ "x@DVIPS@" != "x" ] && [ dvips $< -o $@ ] || \ - echo "Can'not execute .dvi.ps rule" - -.tex.pdf: clean - @[ "x@PDFLATEX@" != "x" ] && [ pdflatex $< ] || \ - echo "Can'not execute .tex.pdf rule" - diff --git a/doc/salome/KernelResources/kernel_resources-1.html b/doc/salome/KernelResources/kernel_resources-1.html deleted file mode 100644 index 562ffa05b..000000000 --- a/doc/salome/KernelResources/kernel_resources-1.html +++ /dev/null @@ -1,287 +0,0 @@ - - - - - SALOME Kernel resources for developer: Trace and debug Utilities - - - - - -Next -Previous -Contents -
-

1. Trace and debug Utilities

- -

During the development process, an execution log is useful to -identify problems. This log contains messages, variables values, -source files names and line numbers. It is recommended to verify -assertions on variables values and if necessary, to stop the execution -at debug time, in order to validate all parts of code.

- -

1.1 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 process. The purpose of -the utilities provided in SALOME is to help the developer to add -detailed traces and check variables values, without writing a lot -of code.

- -

When the code is assumed to be valid, the release mode optimizes -execution, in terms of speed, memory, and display only user level -messages.

- -

But, some informations must always be displayed in both modes: -especially messages concerning environment or internal errors, with -version identification. When an 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.

- -

1.2 C++ Macros for trace and debug -

- -

SALOME provides C++ macros for trace and debug. These macros -are in SALOME/src/SALOMELocalTrace/utilities.h and 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_ -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 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 unchanged in the source.

- -

All the macros generate trace messages, stored in a circular -buffer pool. A separate thread reads the messages in the buffer pool, -and, depending on options given at SALOME start, writes the messages -on the standard output, a file, or send them via CORBA, in 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. -
  • -
-

-

Macros defined in debug and release modes

- -

INFOS_COMPILATION

- -

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_.

- -

Example :

- -

-

-#include "utilities.h"
-int main(int argc , char **argv) 
-{ 
-  INFOS_COMPILATION;
-  ...
-}
-
-

-

INFOS(str)

- -

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.

- -

Example :

- -

-

-#include "utilities.h"
-int main(int argc , char **argv)
-{ 
-  ... 
-  INFOS("NORMAL END OF THE PROCESS"); 
-  return 0; 
-}
-
-

-

displays :

- -

-

-main.cxx [5] : NORMAL END OF THE PROCESS
-
-
-

-

INTERRUPTION(str)

- -

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)

- -

In both compiling mode _DEBUG_ and _RELEASE_, The C++ macro IMMEDIATE_ABORT -writes the message immediately on standard error and exits the application. -Remaining messages not treated by the message collector thread are -lost.

- -

Macros defined only in debug mode

- -

MESSAGE(str)

- -

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.

- -

Example :

- -

-

-#include "utilities.h" 
-#include <string> 
-using namespace std; 
-int main(int argc , char **argv) 
-{ 
-  ... 
-  const char *str = "Salome";
-  MESSAGE(str);
-  ... const string st; 
-  st = "Aster"; 
-  MESSAGE(c_str(st+" and CASTEM")); 
-  return 0;
-}
-
-

-

displays :

- -

-

-- Trace main.cxx [8] : Salome
-- Trace main.cxx [12] : Aster and CASTEM
-
-

-

BEGIN_OF(func_name)

- -

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.

- -

Example :

- -

-

-#include "utilities.h" 
-int main(int argc , char **argv) 
-{ 
-  BEGIN_OF(argv[0]);
-  return 0;
-}
-
-

-

displays :

- -

-

-- Trace main.cxx [3] : Begin of a.out
-
-

-

END_OF(func_name)

- -

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.

- -

Example :

- -

-

-#include "utilities.h" 
-int main(int argc , char **argv) 
-{ 
-  END_OF(argv[0]);
-  return 0; 
-}
-
-

-

displays :

- -

-

-- Trace main.cxx [4] : Normal end of a.out
-
-

-

SCRUTE(var)

- -

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.

- -

Example :

- -

-

-#include "utilities.h"
-int main(int argc , char **argv) 
-{ 
-  const int i=999;
-  if( i > 0 ) SCRUTE(i) ; i=i+1;
-  return 0;
-}
-
-

-

displays :

- -

-

-- Trace main.cxx [5] : i=999
-
-

-

ASSERT(condition)

- -

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.

- -

Example :

- -

-

-#include "utilities.h" 
-... 
-const char *ptrS = fonc();
-ASSERT(ptrS!=NULL); 
-cout << strlen(ptrS); 
-float table[10];
-int k;
-... 
-ASSERT(k<10);
-cout << table[k];
-
-

-
-Next -Previous -Contents - - diff --git a/doc/salome/KernelResources/kernel_resources-2.html b/doc/salome/KernelResources/kernel_resources-2.html deleted file mode 100644 index 62acf8ca3..000000000 --- a/doc/salome/KernelResources/kernel_resources-2.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - SALOME Kernel resources for developer: Exceptions - - - - - -Next -Previous -Contents -
-

2. Exceptions

- -

2.1 C++ exceptions: class SALOME_Exception -

- -

definition

- -

The class SALOME_Exception provides a generic method to send -a message, with optional source file name and line number. This class -is intended to serve as a base class for all kinds of exceptions -SALOME code. All the exceptions derived from SALOME_Exception could -be handled in a single catch, in which the message associated to -the exception is displayed, or sent to a log file.

- -

The class SALOME_Exception inherits its behavior from the STL -class exception.

- -

usage

- -

The header SALOME/src/utils/utils_SALOME_Exception.hxx must be -included in the C++ source, when raised or trapped:

- -

#include "utils_SALOME_Exception.hxx"

- -

The SALOME_Exception constructor is:

- -

-

-SALOME_Exception( const char *text,
-                  const char *fileName=0, 
-                  const unsigned int lineNumber=0 );
-
-

-

The exception is raised like this:

- -

-

-throw SALOME_Exception("my pertinent message");
-
-

-

or like this:

- -

-

-throw SALOME_Exception(LOCALIZED("my pertinent message"));
-
-

-

where LOCALIZED is a macro provided with utils_SALOME_Exception.hxx -which gives file name and line number.

- -

The exception is handled like this:

- -

-

-try
-  {
-    ...
-  }
-catch (const SALOME_Exception &ex)
-  {
-    cerr << ex.what() <<endl;
-  }
-
-

-

The what() method overrides the one defined in the STL exception -class.

- -

2.2 CORBA exceptions -

- -

definition

- -

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 handled in -a single catch.

- -

The exception types defined in idl are:

- -

-

-
COMM

CORBA communication problem,

-
BAD_PARAM

Bad User parameters,

-
INTERNAL_ERROR

application level problem (often irrecoverable).

- -
-

-

CORBA system and user exceptions already defined in the packages -used within SALOME, such as OmniORB exceptions, must be handled separately.

- -

usage

- -

CORBA servant, C++

- -

The CORBA Server header for SALOME_Exception and a macro to throw -the exception are provided with the header SALOME/src/Utils/Utils_CorbaException.hxx:

- -

-

-#include "Utils_CorbaException.hxx"
-
-

-

The exception is raised with a macro which appends file name -and line number.

- -

-

-if (myStudyName.size() == 0)
-   THROW_SALOME_CORBA_EXCEPTION("No Study Name given", \
-                                SALOME::BAD_PARAM);
-
-

-

CORBA Client, GUI Qt C++

- -

The CORBA Client header for SALOME_Exception and a Qt function -header that displays a message box are provided in SALOME/src/SALOMEGUI/SALOMEGUI_QtCatchCorbaException.hxx:

- -

-

-#include "SALOMEGUI_QtCatchCorbaException.hxx"
-
-

-

A typical exchange with a CORBA Servant will be:

- -

-

-try
-  {
-    ... // one ore more CORBA calls
-  }
-catch (const SALOME::SALOME_Exception & S_ex)
-  {
-    QtCatchCorbaException(S_ex);
-  }
-
-
-

-

CORBA Client, C++, without GUI

- -

Nothing specific has been provided to the developer yet. See -the idl or the Qt function SALOMEGUI_QtCatchCorbaException.hxx to -see how to get the information given by the exception object.

- -
-Next -Previous -Contents - - diff --git a/doc/salome/KernelResources/kernel_resources-3.html b/doc/salome/KernelResources/kernel_resources-3.html deleted file mode 100644 index 27f61e78f..000000000 --- a/doc/salome/KernelResources/kernel_resources-3.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - SALOME Kernel resources for developer: Miscellaneous tools - - - - -Next -Previous -Contents -
-

3. Miscellaneous tools

- -

3.1 Singleton -

- -

Definition

- -

A singleton is an application data which is created and deleted -only once at the end of the application 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 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.

- -

Usage

- -

To create a single instance a POINT object :

- -

-

-# include "Utils_SINGLETON.hxx"
-... 
-POINT *ptrPoint=SINGLETON_<POINT>::Instance() ; 
-assert(ptrPoint!=NULL) ;
-
-

-

No need to delete ptrPoint. Deletion is achieved automatically -at exit. If the user tries to create more than one singleton by using -the class method SINGLETON_<TYPE>::Instance(), the pointer -is returned with the same value even if this is done in different -functions (threads ?).

- -

-

-POINT *p1=SINGLETON_<POINT>::Instance() ;
-... 
-POINT *p2=SINGLETON_<POINT>::Instance() ; 
-assert(p1==p2)
-
-

-

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_<TYPE>::Instance() which returns a pointer to the -single object ;
  • -
  • to create an object, SINGLETON_<TYPE>::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 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_(). -
  • -
-

- - - -
-Next -Previous -Contents - - diff --git a/doc/salome/KernelResources/kernel_resources.html b/doc/salome/KernelResources/kernel_resources.html deleted file mode 100644 index e3819dc56..000000000 --- a/doc/salome/KernelResources/kernel_resources.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - SALOME Kernel resources for developer - - - - - -Next -Previous -Contents -
-

SALOME Kernel resources for developer

- -

Antoine Yessayan, Paul Rascle

Version 0.2 January 28, 2005 -
-ABSTRACT -
-
-This document describes the development environment for C++ and - Python. Makefiles generation and usage are introduced in another - document: "using the SALOME configuration and building system environment". - Development environment is intended here as: trace and debug macros - usage; SALOME exceptions usage, in C++ and Python; user CORBA exceptions - usage, in C++ and Python, with and without Graphical User Interface; - some general purpose services such as singleton, used for CORBA connection - and disconnection. -
-

-

1. Trace and debug Utilities

- - -

-

2. Exceptions

- - -

-

3. Miscellaneous tools

- - -
-Next -Previous -Contents - - diff --git a/doc/salome/KernelResources/kernel_resources.lyx b/doc/salome/KernelResources/kernel_resources.lyx deleted file mode 100644 index 2c5935eab..000000000 --- a/doc/salome/KernelResources/kernel_resources.lyx +++ /dev/null @@ -1,976 +0,0 @@ -#LyX 1.3 created this file. For more info see http://www.lyx.org/ -\lyxformat 221 -\textclass linuxdoc -\language english -\inputencoding default -\fontscheme default -\graphics default -\paperfontsize 10 -\spacing single -\papersize Default -\paperpackage a4 -\use_geometry 0 -\use_amsmath 0 -\use_natbib 0 -\use_numerical_citations 0 -\paperorientation portrait -\secnumdepth 3 -\tocdepth 3 -\paragraph_separation indent -\defskip medskip -\quotes_language english -\quotes_times 2 -\papercolumns 1 -\papersides 1 -\paperpagestyle default - -\layout Title -\added_space_top vfill \added_space_bottom vfill -SALOME Kernel resources for developer -\layout Author - -Antoine Yessayan, Paul Rascle -\layout Date - -Version 0.2 January 28, 2005 -\layout Abstract - -ABSTRACT -\layout Abstract - -This document describes the development environment for C++ and Python. - Makefiles generation and usage are introduced in another document: -\begin_inset Quotes eld -\end_inset - -using the SALOME configuration and building system environment -\begin_inset Quotes erd -\end_inset - -. - Development environment is intended here as: trace and debug macros usage; - SALOME exceptions usage, in C++ and Python; user CORBA exceptions usage, - in C++ and Python, with and without Graphical User Interface; some general - purpose services such as singleton, used for CORBA connection and disconnection. -\layout Standard - - -\begin_inset LatexCommand \tableofcontents{} - -\end_inset - - -\layout Section - -Trace and debug Utilities -\layout Standard - -During the development process, an execution log is useful to identify problems. - This log contains messages, variables values, source files names and line - numbers. - It is recommended to verify assertions on variables values and if necessary, - to stop the execution at debug time, in order to validate all parts of - code. -\layout Subsection - -Two modes: debug and release -\layout Standard - -The goal of debug mode is to check as many features as possible during the - early stages of the development process. - The purpose of the utilities provided in SALOME is to help the developer - to add detailed traces and check variables values, without writing a lot - of code. -\layout Standard - -When the code is assumed to be valid, the release mode optimizes execution, - in terms of speed, memory, and display only user level messages. -\layout Standard - -But, some informations must always be displayed in both modes: especially - messages concerning environment or internal errors, with version identification. - When an end user is confronted to such a message, he may refer to a configurati -on documentation or send the message to the people in charge of SALOME installat -ion, or to the development team, following the kind of error. -\layout Subsection - -C++ Macros for trace and debug -\layout Standard - -SALOME provides C++ macros for trace and debug. - These macros are in -\family typewriter -SALOME/src/SALOMELocalTrace/utilities.h -\family default - and 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, -\family typewriter -_DEBUG_ -\family default - must be defined, which is the case when SALOME Makefiles are generated - from configure, without options. - When -\family typewriter -_DEBUG_ -\family default - is undefined (release mode: -\family typewriter -configure --disable-debug --enable-production -\family default -), 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 unchanged in the source. -\layout Standard - -All the macros generate trace messages, stored in a circular buffer pool. - A separate thread reads the messages in the buffer pool, and, depending - on options given at SALOME start, writes the messages on the standard output, - a file, or send them via CORBA, in case of a multi machine configuration. -\layout Standard - -Three informations are systematically added in front of the information - displayed: -\layout Itemize - -the thread number from which the message come from; -\layout Itemize - -the name of the source file in which the macros is set; -\layout Itemize - -the line number of the source file at which the macro is set. -\layout Subsubsection - -Macros defined in debug and release modes -\layout Paragraph - -INFOS_COMPILATION -\layout Standard - -The C++ macro -\family typewriter -INFOS_COMPILATION -\family default - writes on the trace buffer pool informations about the compiling process: - -\layout Itemize - -the name of the compiler : -\family typewriter -g++, KCC, CC, pgCC -\family default -; -\layout Itemize - -the date and the time of the compiling processing process. -\layout Standard - -This macro -\family typewriter -INFOS_COMPILATION -\family default - does not have any argument. - Moreover, it is defined in both compiling mode : -\family typewriter -_DEBUG_ -\family default - and -\family typewriter -_RELEASE_ -\family default -. -\layout Standard - -Example : -\layout Verbatim - -#include "utilities.h" -\layout Verbatim - -int main(int argc , char **argv) -\layout Verbatim - -{ -\layout Verbatim - - INFOS_COMPILATION; -\layout Verbatim - - ... -\layout Verbatim - -} -\layout Paragraph - -INFOS(str) -\layout Standard - -In both compiling mode -\family typewriter -_DEBUG_ -\family default - and -\family typewriter -_RELEASE_ -\family default -, The C++ macro -\family typewriter -INFOS -\family default - writes on the trace buffer pool the string which has been passed in argument - by the user. -\layout Standard - -Example : -\layout Verbatim - -#include "utilities.h" -\layout Verbatim - -int main(int argc , char **argv) -\layout Verbatim - -{ -\layout Verbatim - - ... - -\layout Verbatim - - INFOS("NORMAL END OF THE PROCESS"); -\layout Verbatim - - return 0; -\layout Verbatim - -} -\layout Standard - -displays : -\layout Verbatim - -main.cxx [5] : NORMAL END OF THE PROCESS -\layout Verbatim - -\layout Paragraph - - -\family roman -INTERRUPTION(str) -\layout Standard - -In both compiling mode -\family typewriter -_DEBUG_ -\family default - and -\family typewriter -_RELEASE_ -\family default -, The C++ macro -\family typewriter -INTERRUPTION -\family default - writes on the trace buffer pool the string, with a special -\family typewriter -ABORT -\family default - type. - When the thread in charge of collecting messages finds this message, it - terminates the application, after message treatment. -\layout Paragraph - -IMMEDIATE_ABORT(str) -\layout Standard - -In both compiling mode -\family typewriter -_DEBUG_ -\family default - and -\family typewriter -_RELEASE_ -\family default -, The C++ macro -\family typewriter -IMMEDIATE_ABORT -\family default - writes the message immediately on standard error and exits the application. - Remaining messages not treated by the message collector thread are lost. -\layout Subsubsection - -Macros defined only in debug mode -\layout Paragraph - -MESSAGE(str) -\layout Standard - -In -\family typewriter -_DEBUG_ -\family default - compiling mode only, the C++ macro -\family typewriter -MESSAGE -\family default - writes on the trace buffer pool the string which has been passed in argument - by the user. - In -\family typewriter -_RELEASE_ -\family default - compiling mode, this macro is blank. -\layout Standard - -Example : -\layout Verbatim - -#include "utilities.h" -\layout Verbatim - -#include -\layout Verbatim - -using namespace std; -\layout Verbatim - -int main(int argc , char **argv) -\layout Verbatim - -{ -\layout Verbatim - - ... - -\layout Verbatim - - const char *str = "Salome"; -\layout Verbatim - - MESSAGE(str); -\layout Verbatim - - ... - const string st; -\layout Verbatim - - st = "Aster"; -\layout Verbatim - - MESSAGE(c_str(st+" and CASTEM")); -\layout Verbatim - - return 0; -\layout Verbatim - -} -\layout Standard - -displays : -\layout Verbatim - -- Trace main.cxx [8] : Salome -\layout Verbatim - -- Trace main.cxx [12] : Aster and CASTEM -\layout Paragraph - -BEGIN_OF(func_name) -\layout Standard - -In -\family typewriter -_DEBUG_ -\family default - compiling mode, The C++ macro -\family typewriter -BEGIN_OF -\family default - appends the string -\family typewriter -"Begin of " -\family default - to the one passed in argument by the user and displays the result on the - trace buffer pool. - In -\family typewriter -_RELEASE_ -\family default - compiling mode, this macro is blank. -\layout Standard - -Example : -\layout Verbatim - -#include "utilities.h" -\layout Verbatim - -int main(int argc , char **argv) -\layout Verbatim - -{ -\layout Verbatim - - BEGIN_OF(argv[0]); -\layout Verbatim - - return 0; -\layout Verbatim - -} -\layout Standard - -displays : -\layout Verbatim - -- Trace main.cxx [3] : Begin of a.out -\layout Paragraph - -END_OF(func_name) -\layout Standard - -In -\family typewriter -_DEBUG_ -\family default - compiling mode, The C++ macro -\family typewriter -END_OF -\family default - appends the string -\family typewriter -"Normal end of " -\family default - to the one passed in argument by the user and displays the result on the - trace buffer pool. - In -\family typewriter -_RELEASE_ -\family default - compiling mode, this macro is blank. -\layout Standard - -Example : -\layout Verbatim - -#include "utilities.h" -\layout Verbatim - -int main(int argc , char **argv) -\layout Verbatim - -{ -\layout Verbatim - - END_OF(argv[0]); -\layout Verbatim - - return 0; -\layout Verbatim - -} -\layout Standard - -displays : -\layout Verbatim - -- Trace main.cxx [4] : Normal end of a.out -\layout Paragraph - -SCRUTE(var) -\layout Standard - -In -\family typewriter -_DEBUG_ -\family default - compiling mode, The C++ macro -\family typewriter -SCRUTE -\family default - displays its argument which is an application variable followed by the - value of the variable. - In -\family typewriter -_RELEASE_ -\family default - compiling mode, this macro is blank. -\layout Standard - -Example : -\layout Verbatim - -#include "utilities.h" -\layout Verbatim - -int main(int argc , char **argv) -\layout Verbatim - -{ -\layout Verbatim - - const int i=999; -\layout Verbatim - - if( i > 0 ) SCRUTE(i) ; i=i+1; -\layout Verbatim - - return 0; -\layout Verbatim - -} -\layout Standard - -displays : -\layout Verbatim - -- Trace main.cxx [5] : i=999 -\layout Paragraph - -ASSERT(condition) -\layout Standard - -In -\family typewriter -_DEBUG_ -\family default - compiling mode only, The C++ macro -\family typewriter -ASSERT -\family default - checks the expression passed in argument to be not NULL. - If it is NULL the condition is written with the macro -\family typewriter -INTERRUPTION -\family default - (see above). - The process exits after trace of this last message. - In -\family typewriter -_RELEASE_ -\family default - compiling mode, this macro is blank. - N.B. - : if -\family typewriter -ASSERT -\family default - is already defined, this macro is ignored. -\layout Standard - -Example : -\layout Verbatim - -#include "utilities.h" -\layout Verbatim - -... - -\layout Verbatim - -const char *ptrS = fonc(); -\layout Verbatim - -ASSERT(ptrS!=NULL); -\layout Verbatim - -cout << strlen(ptrS); -\layout Verbatim - -float table[10]; -\layout Verbatim - -int k; -\layout Verbatim - -... - -\layout Verbatim - -ASSERT(k<10); -\layout Verbatim - -cout << table[k]; -\layout Section - -Exceptions -\layout Subsection - -C++ exceptions: class SALOME_Exception -\layout Subsubsection - -definition -\layout Standard - -The class -\family typewriter -SALOME_Exception -\family default - provides a generic method to send a message, with optional source file - name and line number. - This class is intended to serve as a base class for all kinds of exceptions - SALOME code. - All the exceptions derived from -\family typewriter -SALOME_Exception -\family default - could be handled in a single catch, in which the message associated to - the exception is displayed, or sent to a log file. -\layout Standard - -The class -\family typewriter -SALOME_Exception -\family default - inherits its behavior from the STL class exception. -\layout Subsubsection - -usage -\layout Standard - -The header -\family typewriter -SALOME/src/utils/utils_SALOME_Exception.hxx -\family default - must be included in the C++ source, when raised or trapped: -\layout Standard - - -\family typewriter -#include -\family default -" -\family typewriter -utils_SALOME_Exception.hxx -\family default -" -\layout Standard - -The -\family typewriter -SALOME_Exception -\family default - constructor is: -\layout Verbatim - -SALOME_Exception( const char *text, -\layout Verbatim - - const char *fileName=0, -\layout Verbatim - - const unsigned int lineNumber=0 ); -\layout Standard - -The exception is raised like this: -\layout Verbatim - -throw SALOME_Exception("my pertinent message"); -\layout Standard - -or like this: -\layout Verbatim - -throw SALOME_Exception(LOCALIZED("my pertinent message")); -\layout Standard - -where LOCALIZED is a macro provided with -\family typewriter -utils_SALOME_Exception.hxx -\family default - which gives file name and line number. -\layout Standard - -The exception is handled like this: -\layout Verbatim - -try -\layout Verbatim - - { -\layout Verbatim - - ... -\layout Verbatim - - } -\layout Verbatim - -catch (const SALOME_Exception &ex) -\layout Verbatim - - { -\layout Verbatim - - cerr << ex.what() <::Instance() ; -\layout Verbatim - -assert(ptrPoint!=NULL) ; -\layout Standard - -No need to delete ptrPoint. - Deletion is achieved automatically at exit. - If the user tries to create more than one singleton by using the class - method -\family typewriter -SINGLETON_::Instance() -\family default -, the pointer is returned with the same value even if this is done in different - functions (threads ?). -\layout Verbatim - -POINT *p1=SINGLETON_::Instance() ; -\layout Verbatim - -... - -\layout Verbatim - -POINT *p2=SINGLETON_::Instance() ; -\layout Verbatim - -assert(p1==p2) -\layout Subsubsection - -Design description -\layout Standard - -Here are the principles features of the singleton design : -\layout Itemize - -the user creates an object of class -\family typewriter -TYPE -\family default - by using the class method -\family typewriter -SINGLETON_::Instance() -\family default - which returns a pointer to the single object ; -\layout Itemize - -to create an object, -\family typewriter -SINGLETON_::Instance() -\family default - uses the default constructor of class -\family typewriter -TYPE -\family default - ; -\layout Itemize - -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 ( -\family typewriter -atexit -\family default -) ; -\layout Itemize - -at the end of the application process all the deletions are performed by - the -\family typewriter -Nettoyage() -\family default - C\SpecialChar ~ -function which executes the destruction objects end then deletes the destructi -ons objects themselves ; -\layout Itemize - -the -\family typewriter -Nettoyage() -\family default - C \SpecialChar ~ -function using atexit() C \SpecialChar ~ -function is embedded in a static single object - -\family typewriter -ATEXIT_() -\family default -. -\the_end diff --git a/doc/salome/Makefile.am b/doc/salome/Makefile.am new file mode 100644 index 000000000..f718bbc07 --- /dev/null +++ b/doc/salome/Makefile.am @@ -0,0 +1,20 @@ +# -* Makefile *- +# +# Author : Paul RASCLE (EDF) +# Date : 16/02/2006 +# $Header$ +# + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +SUBDIRS= tui DevelopersGuide gui + +index_html: + $(INSTALL) -d $(docdir); + cp -f $(srcdir)/KERNEL_index.html $(docdir) + +userdoc: index_html + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making userdoc in $$subdir"; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) userdoc) \ + done; diff --git a/doc/salome/Makefile.in b/doc/salome/Makefile.in deleted file mode 100644 index a57414a82..000000000 --- a/doc/salome/Makefile.in +++ /dev/null @@ -1,44 +0,0 @@ - -# -* Makefile *- -# -# Author : Patrick GOLDBRONN (CEA) -# Date : 30/11/2001 -# $Header$ -# -# source path -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@ - -SUBDIRS= tui DevelopersGuide gui - -@COMMENCE@ - -docs: - @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ - done; \ - cp -f $(srcdir)/KERNEL_index.html KERNEL_index.html - -clean: - @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ - done - -distclean: clean - @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ - done - -install: - $(MAKE) docs - (cd tui && $(MAKE) install); - (cd gui && $(MAKE) install); - cp -f KERNEL_index.html $(docdir) - -uninstall: - @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ - done; \ - rm -fr $(docdir)/KERNEL_index.html diff --git a/doc/salome/gui/Makefile.am b/doc/salome/gui/Makefile.am new file mode 100644 index 000000000..635272aec --- /dev/null +++ b/doc/salome/gui/Makefile.am @@ -0,0 +1,18 @@ +# -* Makefile *- +# +# Author : Paul RASCLE (EDF) +# Date : 16/02/2006 +# $Header$ +# + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +EXTRA_DIST = $(srcdir)/KERNEL + +dist-hook: + rm -rf `find $(distdir) -name CVS` + +userdoc: + $(INSTALL) -d $(docdir)/gui; + cp -fr $(srcdir)/KERNEL $(docdir)/gui; + rm -rf `find $(docdir)/gui -name CVS` diff --git a/doc/salome/gui/Makefile.in b/doc/salome/gui/Makefile.in deleted file mode 100644 index ec67d8086..000000000 --- a/doc/salome/gui/Makefile.in +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2003 CEA/DEN, EDF R&D -# -# -# -# File : Makefile.in -# Author : Vasily Rusyaev (Open Cascade NN) -# Module : doc -# $Header: - -top_srcdir=@top_srcdir@ -top_builddir=../../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@ - -@COMMENCE@ - -docs: - cp -fr $(srcdir)/KERNEL ./ - -find $(PWD) -name CVS -exec rm -rf {} \; - -clean: - rm -fr `ls | grep -v "Makefile"` - -distclean: clean - rm -fr KERNEL - -install: - mkdir -p $(docdir)/gui - cp -rf KERNEL $(docdir)/gui - -find $(PWD) -name CVS -exec rm -rf {} \; - -uninstall: - rm -rf $(docdir)/gui/KERNEL diff --git a/doc/salome/kernel_resources.pdf b/doc/salome/kernel_resources.pdf deleted file mode 100644 index b29cb2c04edc6aa1e2d2d971646dfec77a8845a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 127655 zcma&NQq z7Z#;qpk;z08NG@tfMUg`$G0=IgyQC=lQyw6b2i6k`=_EvCu(8sY~qMdCu(irY$9x8 zWM^!`%M0b?>}X} z>t$x@7Br41dGGGn(8%O;>(_hxiTB#OIZHq{OYmW)!{v$n4Y#Ywx7xfsKYM?b>~ns$ zKOh6A7k=1YA{)jtDAX&yM&*PQ*Og{<;XvJMxf7-Pa8Qt{%Iw1R1%yeQ)4l|0`AqHTBZh}-7J_Unvm})YM9D0mu;;+8C%bRk{q$!vp z+^%P=+neQ?SepT=_R{i}N^JN9wGNceKtv+Iq{7F?gJk!>^@C@8+$t4>>jx-xgswsY zu!=25nOaquYp+Q$HcW#3dW9rL#LjX8eH;b&!Dx%FolZnCx%9)byK;AdYmDmX6LE|G zGpwD_2&Pa*bb;h@;>Vt5wPq!Jjlyc#>Ows(AvBPfa7c`urEb^?)BN`uBcfGA;Yx4~ z_~sHU7VHwO3-Mt^LL|jqS)5K>!$Ipi%xY+cKXlN%F#+IeA_1Y;pUD)hYnC>fa*d{o9{j>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_u`0<4{$m7EO zU}{#cc^>?~;Dkg4;)qJ(SV*bwFv>EmkH%|rIR8g}7z5oBs`cwt^Zt^^$x z<_!T35X2(L8+oYYAj}KOPzdt^`Cjbj5O@@*vp`Egtpr+}XJ^^yQMix?E2Zs_SOVtlnA2klr-PCp(w6Vek zhZ_D68fH?{2x?Q)2(+~fd6a5U3Fcp5FU!K}W5Bq_}dO*m$;Qdyva4miGp%vq2&C1OA@1?6BqCl<8oO?@4 uS7u^`GVjgIx&85nOEUqnnfFq`rYBdrR;*+(T@;~(^n&ZIyS4aR60 -D<126012FCB4FCEA7FC0EA1FF0EA07FCEA01FF38007FC0EB1FF0EB07FCEB01FF9038007F -C0EC1FF0EC07FCEC01FF9138007FC0ED1FF0ED07FCED01FF9238007FC0EE1FF0EE07FCEE -01FF9338007F80EF1FC0A2EF7F80933801FF00EE07FCEE1FF0EE7FC04B48C7FCED07FCED -1FF0ED7FC04A48C8FCEC07FCEC1FF0EC7FC04948C9FCEB07FCEB1FF0EB7FC04848CAFCEA -07FCEA3FF0EA7FC048CBFC12FC1270323279AD41>62 D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fb cmsy10 10 1 -/Fb 1 16 df15 -D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fc ectt1000 10 80 -/Fc 80 126 df<007FB512F0B612F8A36C14F01D0579942C>21 D<121FEA3F80EA7FC0EA -FFE0B0EA7FC0AEEA1F00C7FCA7121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B34 -70B32C>33 D<003C131E007F137F481480A66C1400A6007E7FA6003E133EA3003C131E00 -1C131C191977B32C>I<0107131C90380F803EA8011F137EEC007CA4003FB612E0B712F8 -A43A003E00F800A2EB7E01017C5BA8EBFC0301F85BA2B712F8A4003F15E03A01F007C000 -A30003130F01E05BA86C486CC7FC25337DB22C>I38 D<143814FC13011303EB07F8EB0FF0EB1FC0EB -3F80EB7F0013FE485A485A5B12075B120F5B485AA2123F90C7FCA25A127EA312FE5AAC7E -127EA3127F7EA27F121FA26C7E7F12077F12037F6C7E6C7E137FEB3F80EB1FC0EB0FF0EB -07F8EB03FC130113001438164272B92C>40 D<127012FC7E7E6C7E6C7EEA0FE06C7E6C7E -6C7E6C7E137F7F1480131F14C0130FEB07E0A214F01303A214F81301A314FC1300AC1301 -14F8A3130314F0A2130714E0A2EB0FC0131F1480133F14005B13FE485A485A485A485AEA -3FC0485A48C7FC5A5A1270164279B92C>II<147014F8AF003FB612E0B712F8A4C700F8C7FCB0147025267DAB -2C>II<007FB512F0B612F8A36C14F01D -0579942C>I<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B0B708A2C>I<1507ED -0F80A2151F16005D153E157E157CA215FC5D14015D14035D14075D140F5D141F92C7FC5C -143EA2147E147C14FC5C13015C13035C13075C130F5C131F91C8FC5B133EA2137E137C13 -FC5B12015B12035B12075B120F5B121F90C9FCA25A123E127E127C12FC5AA2127021417B -B92C>II<1307497EA2131FA2133F13 -7F13FF5A1207127FB5FC13DF139FEA7C1F1200B3AE007FB512E0B612F0A36C14E01C3477 -B32C>IIII<000FB512FE4880 -A35D0180C8FCADEB83FE90389FFF8090B512E015F8819038FE03FE9038F000FF01C07F49 -EB3F8090C7121F6C15C0C8120FA2ED07E0A4123C127EB4FC150F16C0A248141F007EEC3F -80007FEC7F006C6C5B6D485A391FF80FFC6CB55A6C5C000114C06C6C90C7FCEB0FF82334 -7CB22C>I56 DI<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA -3F80EA1F00C7FCAE121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B2470A32C>I< -EA0F80EA1FC0EA3FE0EA7FF0A5EA3FE0EA1FC0EA0F80C7FCAEEA0F80EA1FE0EA3FF0EA7F -F8A213FCA3123F121F120F120013F8A21201EA03F01207EA1FE0EA7FC0EAFF80130012FC -12700E3071A32C>I<1502ED0F80151F157F15FF913803FE00EC0FFCEC1FF0EC7FE0ECFF -80D903FEC7FC495AEB1FF0495AEBFF80000390C8FCEA07FCEA1FF8EA3FE0EAFF8090C9FC -A27FEA3FE0EA1FF8EA07FC6CB4FCC67FEB3FE06D7EEB07FC6D7E903800FF80EC7FE0EC1F -F0EC0FFCEC03FE913800FF80157F151F150FED0200212A7BAD2C>I<007FB612F0B712F8 -A36C15F0CAFCA8007FB612F0B712F8A36C15F025127DA12C>I<122012F87EB4FC7FEA3F -E0EA1FF8EA07FC6CB4FCC67FEB3FE06D7EEB07FC6D7E903800FF80EC7FE0EC1FF0EC0FFC -EC03FE913800FF80157FA215FF913803FE00EC0FFCEC1FF0EC7FE0ECFF80D903FEC7FC49 -5AEB1FF0495AEBFF80000390C8FCEA07FCEA1FF8EA3FE0EAFF8090C9FC12FC5A1220212A -7BAD2C>I<14FE497EA4497FA214EFA2130781A214C7A2010F7FA314C390381F83F0A590 -383F01F8A490387E00FCA549137E90B512FEA34880A29038F8003FA34848EB1F80A40007 -15C049130FD87FFEEBFFFC6D5AB514FE6C15FC497E27347EB32C>65 -D<007FB512E015F8B612FE6C8016C03903F0003FED0FE0ED07F01503A2ED01F8A6ED03F0 -A21507ED0FE0ED1FC0EDFF8090B612005D5D15FF16C09039F0001FE0ED07F0ED03F81501 -ED00FCA216FE167EA616FE16FC1501ED03F8150FED3FF0007FB612E016C0B712806CECFE -0015F027337FB22C>I<02FF13700107EBE0F84913F9013F13FD4913FFEBFF813901FE00 -7F4848131FD807F0130F1507485A491303485A150148C7FCA25A007EEC00F01600A212FE -5AAB7E127EA3007F15F06CEC01F8A26C7EA26C6C13036D14F06C6C130716E0D803FC131F -6C6CEB3FC03A00FF81FF806DB512006D5B010F5B6D13F00100138025357DB32C>I<007F -B5FCB612C015F0816C803907E003FEEC00FFED7F80153FED1FC0ED0FE0A2150716F01503 -16F81501A4ED00FCACED01F8A3150316F0A2150716E0150FED1FC0153FED7F80EDFF00EC -03FE007FB55AB65A5D15C06C91C7FC26337EB22C>I<007FB612F0B712F8A37E3903F000 -01A7ED00F01600A4EC01E04A7EA490B5FCA5EBF003A46E5A91C8FCA5163C167EA8007FB6 -12FEB7FCA36C15FC27337EB22C>I<007FB612F8B712FCA37ED803F0C7FCA716781600A5 -15F04A7EA490B5FCA5EBF001A46E5A92C7FCAD387FFFE0B5FC805C7E26337EB22C>I<90 -3901FC038090390FFF87C04913EF017F13FF90B6FC4813073803FC01497E4848137F4848 -133F49131F121F5B003F140F90C7FCA2127EED078092C7FCA212FE5AA8913803FFF84A13 -FCA27E007E6D13F89138000FC0A36C141FA27F121F6D133F120F6D137F6C7E6C6C13FF6D -5A3801FF076C90B5FC6D13EF011F13CF6DEB0780D901FCC7FC26357DB32C>II<007FB512F8B612FCA36C14F839000FC000B3B3A5 -007FB512F8B612FCA36C14F81E3379B22C>I75 D<387FFFE0B57EA36C5BD803F0C8FCB3AE16F0ED01F8A8007FB6FCB7 -FCA36C15F025337DB22C>IIII<007FB512C0B612F88115FF6C15802603 -F00013C0153FED0FE0ED07F0A2150316F81501A6150316F01507A2ED0FE0ED3FC015FF90 -B61280160015FC5D15C001F0C8FCB0387FFF80B57EA36C5B25337EB22C>II< -387FFFFCB67E15E015F86C803907E007FE1401EC007F6F7E151FA26F7EA64B5AA2153F4B -C7FCEC01FE140790B55A5D15E081819038E007FCEC01FE1400157F81A8160FEE1F80A5D8 -7FFEEB1FBFB5ECFF00815E6C486D5AC8EA01F029347EB22C>I<90381FF80790B5EA0F80 -4814CF000714FF5A381FF01F383FC003497E48C7FC007E147F00FE143F5A151FA46CEC0F -00007E91C7FC127F7FEA3FE0EA1FFCEBFFC06C13FC0003EBFFC06C14F06C6C7F01077F90 -38007FFEEC07FF02001380153FED1FC0A2ED0FE0A20078140712FCA56CEC0FC0A26CEC1F -806D133F01E0EB7F009038FE01FF90B55A5D00F914F0D8F83F13C0D8700790C7FC23357C -B32C>I<007FB612FCB712FEA43AFC007E007EA70078153CC71400B3AF90383FFFFCA249 -7F6D5BA227337EB22C>I<3B7FFF803FFFC0B56C4813E0A36C496C13C03B03F00001F800 -B3AF6D130300015DA26D130700005D6D130F017F495A6D6C485AECE0FF6DB5C7FC6D5B01 -0313F86D5B9038003F802B3480B22C>I87 D<3A3FFF03FFE0484913F0148714076C6D13E03A01F800 -FE007F0000495A13FE017E5BEB7F03013F5B1487011F5B14CF010F5B14FF6D5BA26D90C7 -FCA26D5AA26D5AA2497EA2497EA2497F81EB0FCF81EB1FC7EC87F0EB3F83EC03F8EB7F01 -017E7FEBFE00497F0001147E49137F000380491480151FD87FFEEBFFFC6D5AB514FE6C15 -FC497E27337EB22C>II<003FB612C04815E0A4007EC7EA1FC0ED3F80A2ED7F00157E15FE4A5A -003C5CC712034A5AA24A5A4A5AA24A5A4AC7FCA214FE495AA2495A495AA2495A495AA249 -5A49C8FCA213FE485AA24848EB03C049EB07E01207485A5B121F485AA248C7FCB7FCA46C -15C023337CB22C>I<387FFFFCB512FEA314FC00FCC7FCB3B3B3B512FC14FEA36C13FC17 -416FB92C>I<127012F8A27E127C127E123E123F7EA27F120F7F12077F12037F12017F12 -007F137C137E133EA2133F7F80130F80130780130380130180130080147C147E143EA214 -3F8081140F81140781140381140181140081157CA2157E153E153F811680150FA2ED0700 -21417BB92C>I<387FFFFCB512FEA37EC7127EB3B3B3387FFFFEB5FCA36C13FC17417DB9 -2C>I<007FB6FCB71280A46C150021067B7D2C>95 D<3801FFF0000713FE001F6D7E15E0 -48809038C01FF81407EC01FC381F80000006C77EC8127EA3ECFFFE131F90B5FC1203120F -48EB807E383FF800EA7FC090C7FC12FE5AA47E007F14FEEB8003383FE01F6CB612FC6C15 -FE6C14BF0001EBFE1F3A003FF007FC27247CA32C>97 DI<903803FFE0011F13F801 -7F13FE48B5FC48804848C6FCEA0FF0485A49137E4848131890C9FC5A127EA25AA8127EA2 -127F6C140F6DEB1F806C7E6D133F6C6CEB7F003907FE03FF6CB55A6C5C6C6C5B011F13E0 -010390C7FC21247AA32C>IIIIII<1307EB1FC0A2497EA36D5AA20107C7FC -90C8FCA7387FFFC080B5FC7EA2EA0007B3A8007FB512FCB612FEA36C14FC1F3479B32C> -I107 D<387FFFE0B57EA37EEA0003B3B3A5007FB61280B712C0A36C158022337BB22C>I< -3A7F83F007E09039CFFC1FF83AFFDFFE3FFCD87FFF13FF91B57E3A07FE1FFC3E01FCEBF8 -3F496C487E01F013E001E013C0A301C01380B33B7FFC3FF87FF0027F13FFD8FFFE6D13F8 -D87FFC4913F0023F137F2D2481A32C>I<397FF01FE039FFF87FFC9038F9FFFE01FB7F6C -B6FC00019038F03F80ECC01F02807FEC000F5B5BA25BB3267FFFE0B5FCB500F11480A36C -01E0140029247FA32C>II<397FF01FE039FFF8FFF801FB13FE90B6FC6C15800001 -9038F07FC09138801FE091380007F049EB03F85BED01FC491300A216FE167EA816FE6D14 -FCA2ED01F86D13036DEB07F0150F9138801FE09138E07FC091B51280160001FB5B01F813 -F8EC3FC091C8FCAD387FFFE0B57EA36C5B27367FA32C>I114 D<90387FF8700003B512F8120F5A5A387F -C00F387E00034813015AA36CEB00F0007F140013F0383FFFC06C13FE6CEBFF80000314E0 -C66C13F8010113FCEB0007EC00FE0078147F00FC143F151F7EA26C143F6D133E6D13FE90 -38F007FC90B5FC15F815E000F8148039701FFC0020247AA32C>I<131E133FA9007FB6FC -B71280A36C1500D8003FC8FCB1ED03C0ED07E0A5EC800F011FEB1FC0ECE07F6DB5128016 -0001035B6D13F89038003FE0232E7EAD2C>I<3A7FF003FF80486C487FA3007F7F0001EB -000FB3A3151FA2153F6D137F3900FE03FF90B7FC6D15807F6D13CF902603FE0713002924 -7FA32C>I<3A7FFF01FFFCB514FE148314016C15FC3A03E0000F80A26D131F00011500A2 -6D5B0000143EA26D137E017C137CA2017E13FC013E5BA2EB3F01011F5BA21483010F5BA2 -14C701075BA214EF01035BA214FF6D90C7FCA26D5A147C27247EA32C>II<3A3FFF03FFF048018713F8A36C010313F03A00FC00 -7E005D90387E01F8013F5BEB1F83EC87E090380FCFC0903807EF80EB03FF6D90C7FC5C6D -5A147C14FE130180903803EF80903807CFC0EB0FC7EC83E090381F01F0013F7FEB7E0001 -7C137C49137E0001803A7FFF01FFFC1483B514FE6C15FC140127247EA32C>I<3A7FFF01 -FFFCB5008113FE148314816C010113FC3A03E0000F806C7E151F6D140012005D6D133E13 -7C017E137E013E137CA2013F13FC6D5BA2EB0F815DA2EB07C1ECC3E0A2EB03E3ECE7C013 -0114F75DEB00FFA292C7FC80A2143EA2147E147CA214FC5CA2EA0C01003F5BEA7F83EB87 -E0EA7E0F495A387FFF806C90C8FC6C5A6C5AEA07E027367EA32C>I<003FB612E04815F0 -A4007EC7EA1FE0ED3FC0ED7F80EDFF004A5A003C495AC7485A4A5A4A5A4A5A4A5A4AC7FC -EB01FC495AEB0FF0495A495A495A49C8FC4848EB01E04848EB03F0485A485A485A485A48 -5AB7FCA46C15E024247DA32C>I<15FF02071380141F147F91B512004913C04AC7FCEB03 -F85CB31307EB1FE013FF007F5BB55A49C8FC6D7E6C7FC67F131FEB07F01303B380EB01FE -ECFFC06D13FF6E1380141F14070200130021417BB92C>I125 -D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fd ecbx1200 12 36 -/Fd 36 121 df<160C161EB3B0007FBB1280BC12C0A26C1A80C9001ECAFCB3B0160C4A4A -7ABD57>43 D46 D49 DII58 D65 -DII69 -D76 DI<923807FFC092B512FE0207ECFFC0021F15F091267FFE0013FC -902601FFF0EB1FFF01070180010313C04990C76C7FD91FFC6E6C7E49486F7E49486F7E01 -FF8348496F7E48496F1380A248496F13C0A24890C96C13E0A24819F04982003F19F8A300 -7F19FC49177FA400FF19FEAD007F19FC6D17FFA3003F19F8A26D5E6C19F0A26E5D6C19E0 -A26C6D4B13C06C19806E5D6C6D4B13006C6D4B5A6D6C4B5A6D6C4B5A6D6C4A5B6D01C001 -075B6D01F0011F5B010101FE90B5C7FC6D90B65A023F15F8020715C002004AC8FC030713 -C047467AC454>79 D82 DI<003FBA12E0 -A59026FE000FEB8003D87FE09338003FF049171F90C71607A2007E1803007C1801A30078 -1800A400F819F8481978A5C81700B3B3A20107B8FCA545437CC24E>I<007FBA12E0BB12 -F0A46C19E04406776757>95 D<903801FFE0011F13FE017F6D7E48B612E03A03FE007FF8 -4848EB1FFC6D6D7E486C6D7EA26F7FA36F7F6C5A6C5AEA00F090C7FCA40203B5FC91B6FC -1307013F13F19038FFFC01000313E0481380381FFE00485A5B127F5B12FF5BA35DA26D5B -6C6C5B4B13F0D83FFE013EEBFFC03A1FFF80FC7F0007EBFFF86CECE01FC66CEB8007D90F -FCC9FC322F7DAD36>97 DIIII< -EDFF80020F13E0027F13F049B512F849EB8FFC90390FFE0FFE90381FFC1F14F8133FEB7F -F0A2ED0FFCEBFFE0ED03F0ED00C01600ABB612F8A5C601E0C7FCB3B0007FEBFFE0A52746 -7DC522>II<137C48B4FC4813804813C0A24813E0A56C13C0A26C13806C1300EA00 -7C90C7FCAAEB7FC0EA7FFFA512037EB3AFB6FCA518467CC520>105 -D108 D<90277F8007FEEC0FFC -B590263FFFC090387FFF8092B5D8F001B512E002816E4880913D87F01FFC0FE03FF8913D -8FC00FFE1F801FFC0003D99F009026FF3E007F6C019E6D013C130F02BC5D02F86D496D7E -A24A5D4A5DA34A5DB3A7B60081B60003B512FEA5572D7CAC5E>I<90397F8007FEB59038 -3FFF8092B512E0028114F8913987F03FFC91388F801F000390399F000FFE6C139E14BC02 -F86D7E5CA25CA35CB3A7B60083B512FEA5372D7CAC3E>II<90397FC00FF8B590B57E02C314E002CF14F89139DFC03F -FC9139FF001FFE000301FCEB07FF6C496D13804A15C04A6D13E05C7013F0A2EF7FF8A4EF -3FFCACEF7FF8A318F017FFA24C13E06E15C06E5B6E4913806E4913006E495A9139DFC07F -FC02CFB512F002C314C002C091C7FCED1FF092C9FCADB67EA536407DAC3E>I<90387F80 -7FB53881FFE0028313F0028F13F8ED8FFC91389F1FFE000313BE6C13BC14F8A214F0ED0F -FC9138E007F8ED01E092C7FCA35CB3A5B612E0A5272D7DAC2E>114 -D<90391FFC038090B51287000314FF120F381FF003383FC00049133F48C7121F127E00FE -140FA215077EA27F01E090C7FC13FE387FFFF014FF6C14C015F06C14FC6C800003806C15 -806C7E010F14C0EB003F020313E0140000F0143FA26C141F150FA27EA26C15C06C141FA2 -6DEB3F8001E0EB7F009038F803FE90B55A00FC5CD8F03F13E026E007FEC7FC232F7CAD2C ->III119 -DI -E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fe ecbx1000 10 52 -/Fe 52 122 df<913803FFC0027F13F00103B512FC010FEB00FED93FF8133FD97FE0EBFF -8049485A5A1480484A13C04A6C1380A36F1300167E93C7FCA592383FFFC0B8FCA4000390 -C7FCB3ABB5D8FC3F13FFA4303A7EB935>28 D<141C143C14F8EB01F0EB03E01307EB0FC0 -EB1F8014005B137E13FE5B12015B1203A2485AA2120F5B121FA25B123FA4485AA512FFB1 -127FA56C7EA4121F7FA2120F7F1207A26C7EA212017F12007F137E7F7F1480EB0FC0EB07 -E01303EB01F0EB00F8143C141C165377BD25>40 D<12E07E127C7E7E7F6C7E6C7E12037F -6C7E7F12007F137E137FA2EB3F80A214C0131F14E0A2130F14F0A4EB07F8A514FCB114F8 -A5EB0FF0A414E0131FA214C0133F1480A2EB7F00A2137E13FE5B12015B485A5B1207485A -485A90C7FC123E5A12F05A16537BBD25>I43 DI46 -D<141E143E14FE1307137FB5FCA3138FEA000FB3B3A5007FB61280A4213679B530>49 -DII<001C15C0D81F80130701F8137F90B61280A216005D5D15F05D15 -804AC7FC14F090C9FCA7EB03FE90381FFFE0017F13F89038FE07FC9038F003FFD9C00113 -80496C13C090C7FC000E15E0C8127F16F0A216F8A3121FEA3FC0487E12FF7FA316F05B15 -FFD87F8014E0007EC713C0003E5B003F4913806C6C481300390FF01FFE6CB512F8000114 -E06C6C1380D90FF8C7FC25377BB530>53 D<49B47E010F13F0013F13FC9038FE01FF3A01 -F8007F804848EB3FC04848EB1FE0150F484814F01507121FA27F7F7F6D130F01FF14E014 -C09138E01FC06CEBF83F9138FE7F806C9038FFFE005D6C14F06C14FC6C14FF6D14806D14 -C090B612E0D803FD14F02607F07F13F848487E261FC00F13FC383F8003007F010013FE90 -C7127F151F00FE140715031501A21500A216FC7E6C14016D14F86C6C13036DEB07F06C6C -EB0FE0D80FFEEB7FC00003B61200C614FC013F13F00103138027377CB530>56 -D65 DIIIIII73 -D76 DII< -EDFFF8020FEBFF80027F14F0903A01FFC01FFC010790380007FFD91FFC010113C0D93FF0 -6D6C7E49486E7E49486E7E48496E7E48834890C86C7EA248486F1380A248486F13C0A200 -3F18E0A348486F13F0A400FF18F8AC007F18F06D5DA3003F18E0A26D5D001F18C0A26C6C -4B13806C18006E5C6C6D4A5A6C5F6C6D4A5A6D6C4A5AD93FFC49485A6DB401075B0107D9 -C01F90C7FC010190B512FC6D6C14F0020F1480020001F8C8FC3D3B7BB948>IIIII<003FB91280A4D9F800EBF003D87FC09238007FC049161F007EC7150FA200 -7C1707A200781703A400F818E0481701A4C892C7FCB3AE010FB7FCA43B387DB742>II<007FB9FCBA1280A36C18003905786A4A>95 -D97 D<13FFB5FCA412077EAF4AB47E020F13F0023F13FC9138FE03FFDAF000 -13804AEB7FC00280EB3FE091C713F0EE1FF8A217FC160FA217FEAA17FCA3EE1FF8A217F0 -6E133F6EEB7FE06E14C0903AFDF001FF80903AF8FC07FE009039F03FFFF8D9E00F13E0D9 -C00390C7FC2F3A7EB935>I<903801FFC0010F13FC017F13FFD9FF8013802603FE0013C0 -48485AEA0FF8121F13F0123F6E13804848EB7F00151C92C7FC12FFA9127FA27F123FED01 -E06C7E15036C6CEB07C06C6C14806C6C131FC69038C07E006DB45A010F13F00101138023 -257DA42A>I -I<903803FF80011F13F0017F13FC3901FF83FE3A03FE007F804848133F484814C0001FEC -1FE05B003FEC0FF0A2485A16F8150712FFA290B6FCA301E0C8FCA4127FA36C7E1678121F -6C6C14F86D14F000071403D801FFEB0FE06C9038C07FC06DB51200010F13FC010113E025 -257DA42C>II<161FD907FEEBFFC090387FFFE348B6EAEFE02607FE07138F260FF801131F48486C13 -8F003F15CF4990387FC7C0EEC000007F81A6003F5DA26D13FF001F5D6C6C4890C7FC3907 -FE07FE48B512F86D13E0261E07FEC8FC90CAFCA2123E123F7F6C7E90B512F8EDFF8016E0 -6C15F86C816C815A001F81393FC0000F48C8138048157F5A163FA36C157F6C16006D5C6C -6C495AD81FF0EB07FCD807FEEB3FF00001B612C06C6C91C7FC010713F02B377DA530>I< -13FFB5FCA412077EAFED7FC0913803FFF8020F13FE91381F03FFDA3C01138014784A7E4A -14C05CA25CA291C7FCB3A3B5D8FC3F13FFA4303A7DB935>II<13FFB5 -FCA412077EB3B3ACB512FCA4163A7DB91B>108 D<01FED97FE0EB0FFC00FF902601FFFC -90383FFF80020701FF90B512E0DA1F81903983F03FF0DA3C00903887801F000749DACF00 -7F00034914DE6D48D97FFC6D7E4A5CA24A5CA291C75BB3A3B5D8FC1FB50083B512F0A44C -257DA451>I<01FEEB7FC000FF903803FFF8020F13FE91381F03FFDA3C01138000071378 -0003497E6D4814C05CA25CA291C7FCB3A3B5D8FC3F13FFA430257DA435>I<903801FFC0 -010F13F8017F13FFD9FF807F3A03FE003FE048486D7E48486D7E48486D7EA2003F814913 -03007F81A300FF1680A9007F1600A3003F5D6D1307001F5DA26C6C495A6C6C495A6C6C49 -5A6C6C6CB45A6C6CB5C7FC011F13FC010113C029257DA430>I<9039FF01FF80B5000F13 -F0023F13FC9138FE07FFDAF00113800003496C13C00280EB7FE091C713F0EE3FF8A2EE1F -FCA3EE0FFEAA17FC161FA217F8163F17F06E137F6E14E06EEBFFC0DAF00313809139FC07 -FE0091383FFFF8020F13E0020390C7FC91C9FCACB512FCA42F357EA435>I<9038FE03F0 -00FFEB0FFEEC3FFF91387C7F809138F8FFC000075B6C6C5A5CA29138807F80ED3F00150C -92C7FC91C8FCB3A2B512FEA422257EA427>114 D<90383FF0383903FFFEF8000F13FF38 -1FC00F383F0003007E1301007C130012FC15787E7E6D130013FCEBFFE06C13FCECFF806C -14C06C14F06C14F81203C614FC131F9038007FFE140700F0130114007E157E7E157C6C14 -FC6C14F8EB80019038F007F090B512C000F8140038E01FF81F257DA426>I<130FA55BA4 -5BA25B5BA25A1207001FEBFFE0B6FCA3000390C7FCB21578A815F86CEB80F014816CEBC3 -E090383FFFC06D1380903803FE001D357EB425>I<01FFEC3FC0B5EB3FFFA4000714016C -80B3A35DA25DA26C5C6E4813E06CD9C03E13FF90387FFFFC011F13F00103138030257DA4 -35>IIIII -E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Ff ecbx1440 14.4 24 -/Ff 24 121 df<151E153E15FE1403140F147FEB07FF0003B5FCB6FCA3EBF87FEAFC00C7 -FCB3B3B3A6007FB712FCA52E4E76CD42>49 DI< -913807FFC0027F13FC0103B67E010F15E090261FF80313F890267FC0007F01FEC7EA3FFE -48488148486E138013FE486C6C6D13C0804817E080A66C5B18C06C5B6C90C75AD8003816 -8090C8FC4C1300A24C5A5F4C5A4B5B4B13C0030F5BDB7FFEC7FC91387FFFF816C016FCEE -FF80DA000313E09238007FF8EE3FFE707E70138018C07013E018F07013F8A218FC82A218 -FEA3EA03C0EA0FF0EA3FFC487EA2B5FCA218FCA25E18F8A26C4816F0495C4916E0D83FE0 -4A13C06C485CD80FF04A1380D807FE91387FFE003B03FFE003FFFC6C90B65A6C6C15E001 -0F92C7FC010114FCD9001F1380374F7BCD42>I<932603FFF01407047F01FF140F0307B6 -00E0131F033F03F8133F92B700FE137F02039126C003FF13FF020F01F8C7EA3FC1023F01 -C0EC0FE391B5C80003B5FC4901FC814949814901E082011F498249498292CA7E49488349 -48835A4A83485B4885A24849187FA2485B1B3FA2485B1B1FA25AA21B0091CDFCA2B5FCAE -7EA280A36C1A1FA36C7FA21B3F6C7F1B3E6C7F1B7E6C6D187C6C1AFC6E18F86C19016D6C -EF03F06D7E6FEE07E06D6DEE0FC001076DEE1F806D01F8EE3F006D6D16FE6D01FF4B5A02 -3F01C0EC07F8020F01FCEC3FF00203903AFFC001FFC0020091B6C7FC033F15FC030715F0 -DB007F1480040301F0C8FC505479D25F>67 D69 D77 -D<003FBB12FCA59126C0007FEB000301FCC7ED003FD87FF0F00FFE491807491803491801 -90C81600A2007E1A7EA3007C1A3EA500FC1A3F481A1FA6C91700B3B3AC49B912C0A55051 -7BD05B>84 DI97 DI<913803FFE0023F13FE91B67E010315E0010F903800 -3FF8D93FFCEB07FC4948497E4948131F4849497E485B485BA24890C7FC5A5B003F6F5A70 -5A705A007F92C8FC5BA312FFAD127F7FA3123F7F6CEE0F80A26C6D141F18006C6D5C6C6D -143E6C6D147E6C6D5C6D6C495A6DB4EB07F0010F9038C01FE06D90B5128001014AC7FCD9 -003F13F80203138031387CB63A>I<943803FF80040FB5FCA5EE003F170FB3A4913803FF -80023F13F849B512FE0107ECFF8F011F9038C03FEF90273FFE0007B5FCD97FF813014948 -7F484980484980484980488291C8FC5A5B123FA2127F5BA312FFAD127FA37F123FA3121F -7F6C5E6C6D5C5F6C6D91B5FC6C6D5B6C6D4914E0D97FFCD90FEFEBFF80D91FFFEB7F8F01 -0790B5120F010114FC6D6C13E00207010049C7FC41547CD249>I<913807FF80027F13F8 -49B512FE01076E7E011F010313E0903A3FFC007FF0D97FF06D7E49486D7E4849130F4849 -6D7E48824890C77E1880485A82003F17C0A3485A18E082A212FFA290B8FCA401FCCAFCA6 -127FA37F123FA2EF03E06C7E17076C17C06C6D140F18806C6D141F6C6DEC3F006C6D147E -D97FFC495AD91FFFEB07F86D9038E03FF0010390B512C001005D023F01FCC7FC020113E0 -33387CB63C>I103 D<133FEBFFC0487F487FA2487FA66C5BA26C5B6C5B -013FC7FC90C8FCAEEB1FF8B5FCA512017EB3B3A6B612F0A51C547CD324>105 -D108 -D110 D<913801FFC0023F13FE91B67E010315E0010F018013F8903A3FFC001F -FED97FF0EB07FF49486D7F48496D7F48496D7F91C8127F4883488349153F001F83A2003F -8349151FA2007F83A400FF1880AC007F1800A3003F5F6D153FA2001F5FA26C6C4B5AA26C -6D4A5A6C5F6C6D495B6C6D495B6D6C4990C7FCD93FFCEB1FFE6DB46CB45A010790B512F0 -010115C0D9003F49C8FC020313E039387CB642>II<90393FF001FCB590380FFF804B13E0037F13F0 -9238FE1FF89138F1F83F00019138F07FFC6CEBF3E015C0ECF780A2ECFF00EE3FF84AEB1F -F0EE0FE093C7FC5CA45CB3ABB612FEA52E367DB535>114 D<903903FFC00E011FEBFC1E -90B6127E000315FE3907FE003FD80FF0130F4848130348481301491300127F90C8127EA2 -48153EA27FA27F01F091C7FC13FCEBFF806C13FEECFFF06C14FE6F7E6C15E06C816C15FC -6C81C681133F010F15801301D9000F14C0EC003F030713E0150100F880167F6C153FA216 -1F7EA217C07E6D143F17807F6DEC7F0001F85C6DEB03FE9039FF801FFC486CB512F0D8F8 -1F14C0D8F00791C7FC39E0007FF02B387CB634>I<147CA614FCA41301A31303A21307A2 -130F131F133F137F13FF1203000F90B512FEB7FCA426007FFCC8FCB3A9EE0F80ABEE1F00 -6D7EA2011F143E806D6D5A6DEBC1F86DEBFFF001005C023F1380DA03FEC7FC294D7ECB33 ->II120 -D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fg ecss1000 10 45 -/Fg 45 122 df<903901F807F0EB07FE130F131F133FEB7F0EEB7E0201FEC8FC5BA21201 -AEB538FE07F0A53801FC00B3AE243D7FBC2C>28 D<00FE13FEAD007E13FCA5007C137CAC -171E77BB2A>34 D<1538157CB3A5003FB812F0B912FCA4C8007CC8FCB3A6153836367BAF -41>43 D<12FEA7121E123CA312381278A21270A212F00711788617>I<12FEA707077886 -17>46 D<12FEA71200B3A512FEA7072578A417>58 D<12FEA71200B3A512FEA7121E123C -A312381278A21270A212F0072F78A417>I65 DI<913803FF80021F13F891B6FC4915C013075B4948C61380D97FF0130FD9FFC013034A -13014890C9FC485A485A5B120F5B485AA2485AA3485AA448CAFCAC6C7EA46C7EA36C7EA2 -6C7E7F12077F6C7E6C6C15206C6D14E06E1301D97FF0130FD91FFE137F6DB6FC6D15C001 -0115006D5C021F13F0020313802B3E7BBB35>III<913803FF80023F13F891B512FE0103ECFFC04915E0 -5B90383FFE00D97FF0EB1FC0D9FFC013074A13014890C8124048481500485A5B120F5B48 -5AA2485AA3485AA448CAFCA992383FFFF0A36C7EA2ED0007A26C7EA36C7EA26C7E7F1207 -7F6C7E6C7E6C7F80EB7FF0D93FFE137F010FB6FC7F6D15C001001500023F13F802031380 -2C3E7BBB37>71 D<12FFB3B3B3A4083A79B917>73 D76 D -I79 -DI82 DIII97 D<12FEB3A4EB01FCEB0FFF013F13C090B57EB67E9038F03FF8 -EBC007496C7EEB0001486D7EA2157FA3ED3F80AAED7F00A35D5D14016C5CEB80039038C0 -0FF89038F03FF090B55A485C6D5BD91FFEC7FC380007F8213D7ABB2B>IIII<14FF010313C0130F5B5BEB7F819038FE00404913 -0012015BA21203ADB512FCA5D803F8C7FCB3AE1A3D7FBC19>I<903907E001F890383FFC -1F90397FFEFFFC48B6FC5A9039F81FF8003907F00FE048486C7EEBC003A248486C7EA76C -6C485AA2EBE0076C6C485A6C6C485A48B5FC5D4849C7FCEB3FFC381F07E090C9FCA37F7F -6CB512C015F815FE6CECFF8016C04815E05A3A3F80007FF048C7120F007EEC03F8481401 -A46C1403007E15F0D87F80130F6C6CEB1FE03A1FFC01FFC06CB612806C1500000114FC6C -6C13F0010790C7FC26387EA52A>I<12FEB3A4EB01FC90380FFF804913C0017F13E090B5 -12F039FFF81FF8EBE007EBC003018013FC14011300A35AB3A71E3C7ABB2B>I<12FFA812 -00AC127FB3B308397BB814>I<12FEB3A5EC03FE4A5A4A5A4A5A4A5A4A5A4A5A4990C7FC -495A5C495A495A495A495A495A497EB57EA280EBF7F813E3EBC1FCEB80FE497E487F6E7E -81141F6E7E8114076E7E6E7E811400157F1680213C7ABB29>107 -D<12FEB3B3B3A6073C7ABB14>IIIII<14F0EAFC07130F13 -3F137F13FF00FD130013FCEAFFF05B5BA25B90C7FCA35AB3A414267AA51C>114 -DII<00FEEB01FCB3AA1403A214076C131F387F807F90B5FC6C -13F914F1000F13C1D803FCC7FC1E267AA42B>II<00 -FED901FEEB01FC007F17F802031403A2018013DF003FEE07F01407ED9F80D81FC016E002 -0F140F158FD80FE002C013C0030F131F141FED07E0D807F01680021E143F143E0003DA03 -F0130013F8023C5C0001017C147EED01F813FC027814FE0000D9F8005BA24A13FC017C5D -167D137E5C013EEC3DF0013F143F5C011F5D161F36257FA439>III -E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fh ecrm1000 10 69 -/Fh 69 123 df27 -DI<146014E0EB01C0EB0380EB0700130E131E5B5BA25B485AA2485A -A212075B120F90C7FCA25A121EA2123EA35AA65AB2127CA67EA3121EA2121F7EA27F1207 -7F1203A26C7EA26C7E1378A27F7F130E7FEB0380EB01C0EB00E01460135278BD20>40 -D<12C07E12707E7E7E120F6C7E6C7EA26C7E6C7EA21378A2137C133C133E131EA2131F7F -A21480A3EB07C0A6EB03E0B2EB07C0A6EB0F80A31400A25B131EA2133E133C137C1378A2 -5BA2485A485AA2485A48C7FC120E5A5A5A5A5A13527CBD20>I<1530B3A8B912FCA2C800 -30C8FCB3A836367BAF41>43 D<121C127FEAFF80A213C0A3127F121C1200A412011380A2 -120313005A1206120E5A5A5A12600A19798817>II<121C127FEA -FF80A5EA7F00121C0909798817>I48 DIII<1538A2157815F8A2140114031407A2140F141F141B14331473146314C313011483 -EB030313071306130C131C131813301370136013C01201EA038013005A120E120C5A1238 -12305A12E0B712F8A3C73803F800AA4A7E0103B512F8A325387EB72A>I<0006140CD807 -80133C9038F003F890B5FC5D5D158092C7FC14FC38067FE090C9FCAAEB07F8EB1FFE9038 -780F809038E007E03907C003F0496C7E130000066D7E81C8FC8181A21680A4121C127F5A -7FA390C713005D12FC00605C12704A5A6C5C6C1303001E495A6C6C485A3907E03F800001 -B5C7FC38007FFCEB1FE021397CB62A>II<123012 -38123E003FB612E0A316C05A168016000070C712060060140E5D5D00E014304814705D5D -C712014A5A4AC7FC1406140E5CA25C1478147014F05C1301A213035C1307A2130FA3131F -5CA2133FA5137FA96DC8FC131E233A7BB72A>II<121C -127FEAFF80A5EA7F00121CC7FCB2121C127FEAFF80A5EA7F00121C092479A317>58 -D<121C127FEAFF80A5EA7F00121CC7FCB2121C127FEAFF80A213C0A3127F121C1200A412 -011380A2120313005A1206120E5A5A5A12600A3479A317>I63 D<1538A3157CA315FEA34A7EA3 -4A6C7EA202077FEC063FA2020E7FEC0C1FA2021C7FEC180FA202387FEC3007A202707FEC -6003A202C07F1501A2D901807F81A249C77F167FA20106810107B6FCA24981010CC7121F -A2496E7EA3496E7EA3496E7EA213E0707E1201486C81D80FFC02071380B56C90B512FEA3 -373C7DBB3E>65 DI<913A01FF800180020FEBE003027F13F8903A01 -FF807E07903A03FC000F0FD90FF0EB039F4948EB01DFD93F80EB00FF49C8127F01FE153F -12014848151F4848150FA248481507A2485A1703123F5B007F1601A35B00FF93C7FCAD12 -7F6DED0180A3123F7F001F160318006C7E5F6C7E17066C6C150E6C6C5D00001618017F15 -386D6C5CD91FE05C6D6CEB03C0D903FCEB0F80902701FF803FC7FC9039007FFFFC020F13 -F002011380313D7BBA3C>IIII72 DI<013FB512E0A39039001FFC00EC07F8B3B3A3123FEA -7F80EAFFC0A44A5A1380D87F005B0070131F6C5C6C495A6C49C7FC380781FC3801FFF038 -007F80233B7DB82B>I76 -DIIIIIII<003FB812E0A3D9C003EB001F273E0001FE130348EE01F000781600007017 -70A300601730A400E01738481718A4C71600B3B0913807FF80011FB612E0A335397DB83C ->IIII89 -D<003FB7FCA39039FC0001FE01C0130349495A003EC7FC003C4A5A5E0038141F00784A5A -12704B5A5E006014FF4A90C7FCA24A5A5DC712074A5AA24A5A5D143F4A5AA24A5A92C8FC -5B495AA2495A5C130F4948EB0180A2495A5C137F495A16034890C7FC5B1203485AEE0700 -485A495C001F5D48485C5E4848495A49130FB8FCA329397BB833>I<007FB81280B912C0 -A26C17803204797041>95 D97 DIIII<147E903803 -FF8090380FC1E0EB1F8790383F0FF0137EA213FCA23901F803C091C7FCADB512FCA3D801 -F8C7FCB3AB487E387FFFF8A31C3B7FBA19>IIIIIII<2703F00FF0EB1FE000FFD9 -3FFCEB7FF8913AF03F01E07E903BF1C01F83803F3D0FF3800FC7001F802603F70013CE01 -FE14DC49D907F8EB0FC0A2495CA3495CB3A3486C496CEB1FE0B500C1B50083B5FCA34025 -7EA445>I<3903F00FF000FFEB3FFCECF03F9039F1C01F803A0FF3800FC03803F70013FE -496D7EA25BA35BB3A3486C497EB500C1B51280A329257EA42E>II<39 -03F01FE000FFEB7FF89038F1E07E9039F3801F803A07F7000FC0D803FEEB07E049EB03F0 -4914F849130116FC150016FEA3167FAA16FEA3ED01FCA26DEB03F816F06D13076DEB0FE0 -01F614C09039F7803F009038F1E07E9038F0FFF8EC1FC091C8FCAB487EB512C0A328357E -A42E>I<3807E01F00FFEB7FC09038E1E3E09038E387F0380FE707EA03E613EE9038EC03 -E09038FC0080491300A45BB3A2487EB512F0A31C257EA421>114 -DI<1318A5 -1338A31378A313F8120112031207001FB5FCB6FCA2D801F8C7FCB215C0A93800FC011580 -EB7C03017E13006D5AEB0FFEEB01F81A347FB220>IIII< -B538807FFFA33A03FE003FF00001EC1F80000092C7FC017E131C6D13186D6C5AECC07001 -0F5B6D6C5AECF180EB03FB6DB4C8FC6D5AA2147F804A7E8114CF903801C7E090380383F0 -90380703F8EB0601496C7E011C137E49137F01787F496D7E486C80000FEC3FF0D8FFFE90 -B51280A329247FA32C>II<003FB512FCA2EB8003 -D83E0013F8003CEB07F00038EB0FE012300070EB1FC0EC3F800060137F150014FE495AA2 -C6485A495AA2495A495A495AA290387F000613FEA2485A485A0007140E5B4848130C4848 -131CA24848133C48C7127C48EB03FC90B5FCA21F247EA325>I E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fi ecss2074 20.74 19 -/Fi 19 119 df65 -D69 -D75 DII79 D<923801FFF8033FEBFFE0 -4AB612FC0207EDFF80021F16E0027F16F891B812FE0103EFFF80499026FE000F14C04901 -E0EB007F490180140F4948C800031380D97FF815004948167F02C0161F4849160F4890CA -120749EF0100000795C7FC5B485AA2485AA35B123FA87FA2121F7FA27F120F7F7F6C7F80 -6C7F6C7F14FC6C13FF6D13C06D13F86DEBFF806D14F86D14FF6D15F06D15FF6D6C15E06E -15F8020F15FE020381DA007F15C0030781030081040F80040080050F7F05017F716C1380 -061F13C018077213E07213F084F17FF8193FF11FFCA2190FF107FEA319031AFFA285A91A -FE1903A3F107FCA20020180F007019F8007C181F007E19F0007F183F01C0EF7FE06DEFFF -C0D8FFF85E01FE4C13806D6C030F13006C01E04B5A001F01FCED7FFC6CD9FF80903803FF -F8000302FC013F5BC691B75A6D5F010F94C7FC010316FCD9007F15F0020F15C002014AC8 -FCDA000713E0487979F659>83 D99 DIII108 D110 DII114 D<91380FFFC091B512FE0107ECFFC001 -1F15F8017F15FE90B812804817C05A489038F0003F4890C70003138049EC007FD81FF815 -1F491507003F16014992C7FCA2485AA77FA26C7E7F7F6CB4FC6C13C014F86CEBFF806C14 -FC6CECFFE06C15FC6D14FF6D15C0010F81010315F8010081020F80DA007F7F03071480DB -003F13C0160F040313E01600EF7FF0173FA2EF1FF8A2170FA7EF1FF0A20070163F127C00 -7FEE7FE001C015FF01F0020313C0B5020F138002F0137F91B712006C5E001F5E000716F0 -C65E011F1580010302FCC7FCD9000F13C0354C7CCA3D>I117 -DI -E -%EndDVIPSBitmapFont -end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin -%%BeginPaperSize: Letter -letter -%%EndPaperSize - -%%EndSetup -%%Page: 1 1 -1 0 bop 0 201 a Fi(SALOME)54 b(Kernel)g(resources)f(fo)l(r)g(develop)t -(er)p 0 315 3900 24 v 0 428 a Fh(An)n(toine)28 b(Y)-7 -b(essa)n(y)n(an,)25 b(P)n(aul)j(Rascle)1735 b(V)-7 b(ersion)27 -b(0.2)g(Jan)n(uary)e(28,)i(2005)0 734 y Fg(This)33 b(do)r(cument)g -(describ)r(es)g(the)g(development)f(environment)g(fo)n(r)i(C++)e(and)h -(Python.)53 b(Mak)n(e\034les)32 b(generation)g(and)h(usage)0 -848 y(a)n(re)40 b(intro)r(duced)f(in)h(another)g(do)r(cument:)61 -b("using)38 b(the)i(SALOME)g(con\034guration)f(and)h(building)e(system) -i(environment".)0 961 y(Development)33 b(environment)h(is)g(intended)g -(here)g(as:)51 b(trace)34 b(and)g(debug)g(macros)g(usage;)j(SALOME)d -(exceptions)f(usage,)i(in)0 1075 y(C++)20 b(and)h(Python;)i(user)e -(CORBA)h(exceptions)e(usage,)i(in)f(C++)f(and)h(Python,)h(with)f(and)f -(without)g(Graphical)h(User)h(Interface;)0 1188 y(some)27 -b(general)g(purp)r(ose)g(services)g(such)g(as)h(singleton,)e(used)h(fo) -n(r)g(CORBA)h(connection)e(and)i(disconnection.)0 1527 -y Ff(Con)l(ten)l(ts)0 1766 y Fe(1)77 b(T)-8 b(race)33 -b(and)f(debug)f(Utilities)2662 b(1)125 1923 y Fh(1.1)83 -b(T)-7 b(w)n(o)27 b(mo)r(des:)37 b(debug)27 b(and)h(release)74 -b(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.) -f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h -(.)134 b(2)125 2079 y(1.2)83 b(C++)27 b(Macros)f(for)h(trace)g(and)g -(debug)36 b(.)42 b(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f -(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.) -f(.)h(.)134 b(2)315 2236 y(1.2.1)94 b(Macros)26 b(de\034ned)i(in)g -(debug)f(and)g(release)g(mo)r(des)60 b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h -(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 -b(2)315 2392 y(1.2.2)94 b(Macros)26 b(de\034ned)i(only)f(in)h(debug)f -(mo)r(de)83 b(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.) -h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 -b(3)0 2632 y Fe(2)77 b(Exceptions)3272 b(5)125 2788 y -Fh(2.1)83 b(C++)27 b(exceptions:)36 b(class)27 b(SALOME_Exception)74 -b(.)42 b(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.) -h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(5)315 2945 -y(2.1.1)94 b(de\034nition)67 b(.)42 b(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f -(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.) -g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 -b(5)315 3101 y(2.1.2)94 b(usage)79 b(.)42 b(.)f(.)h(.)f(.)h(.)g(.)f(.)h -(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.) -h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f -(.)h(.)134 b(6)125 3257 y(2.2)83 b(CORBA)28 b(exceptions)f(.)41 -b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h -(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.) -f(.)h(.)f(.)h(.)f(.)h(.)134 b(6)315 3414 y(2.2.1)94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g(.)f(.)h(.) -f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 -b(8)315 4436 y(3.1.3)94 b(Design)27 b(description)62 -b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.) -h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f -(.)h(.)f(.)h(.)134 b(8)0 4774 y Ff(1)d(T)-11 b(race)45 -b(and)e(debug)h(Utilities)0 5013 y Fh(During)24 b(the)h(dev)n(elopmen)n -(t)e(pro)r(cess,)h(an)g(execution)g(log)f(is)h(useful)h(to)f(iden)n -(tify)h(problems.)35 b(This)24 b(log)g(con)n(tains)f(messages,)0 -5126 y(v)-5 b(ariables)31 b(v)-5 b(alues,)33 b(source)e(\034les)h -(names)g(and)g(line)h(n)n(um)n(b)r(ers.)51 b(It)32 b(is)g(recommended)g -(to)g(v)n(erify)g(assertions)e(on)i(v)-5 b(ariables)0 -5240 y(v)g(alues)27 b(and)h(if)g(necessary)-7 b(,)26 -b(to)h(stop)g(the)h(execution)f(at)h(debug)f(time,)h(in)g(order)e(to)i -(v)-5 b(alidate)27 b(all)g(parts)g(of)h(co)r(de.)p eop -%%Page: 2 2 -2 1 bop 0 -167 3900 5 v 0 -200 a Fe(1.)73 b(T)-8 b(race)34 -b(and)e(debug)f(Utilities)2644 b Fh(2)0 162 y Fd(1.1)112 -b(T)-9 b(w)m(o)37 b(mo)s(des:)50 b(debug)38 b(and)h(release)0 -372 y Fh(The)27 b(goal)e(of)h(debug)h(mo)r(de)f(is)h(to)f(c)n(hec)n(k)g -(as)g(man)n(y)g(features)g(as)f(p)r(ossible)i(during)f(the)h(early)e -(stages)g(of)i(the)g(dev)n(elopmen)n(t)0 485 y(pro)r(cess.)46 -b(The)31 b(purp)r(ose)g(of)g(the)g(utilities)h(pro)n(vided)e(in)h -(SALOME)h(is)f(to)g(help)g(the)g(dev)n(elop)r(er)f(to)h(add)g(detailed) -g(traces)0 599 y(and)c(c)n(hec)n(k)g(v)-5 b(ariables)26 -b(v)-5 b(alues,)27 b(without)h(writing)g(a)f(lot)g(of)h(co)r(de.)0 -755 y(When)33 b(the)g(co)r(de)f(is)h(assumed)e(to)i(b)r(e)g(v)-5 -b(alid,)33 b(the)g(release)e(mo)r(de)i(optimizes)f(execution,)i(in)e -(terms)g(of)h(sp)r(eed,)h(memory)-7 b(,)0 869 y(and)27 -b(displa)n(y)g(only)g(user)g(lev)n(el)g(messages.)0 1025 -y(But,)22 b(some)d(informations)f(m)n(ust)i(alw)n(a)n(ys)e(b)r(e)i -(displa)n(y)n(ed)e(in)i(b)r(oth)g(mo)r(des:)33 b(esp)r(ecially)19 -b(messages)f(concerning)g(en)n(vironmen)n(t)0 1139 y(or)31 -b(in)n(ternal)g(errors,)g(with)h(v)n(ersion)e(iden)n(ti\034cation.)49 -b(When)32 b(an)g(end)g(user)f(is)g(confron)n(ted)g(to)h(suc)n(h)f(a)h -(message,)f(he)h(ma)n(y)0 1253 y(refer)23 b(to)h(a)g(con\034guration)e -(do)r(cumen)n(tation)i(or)f(send)h(the)g(message)f(to)g(the)i(p)r -(eople)f(in)g(c)n(harge)e(of)i(SALOME)h(installation,)0 -1366 y(or)i(to)g(the)h(dev)n(elopmen)n(t)f(team,)h(follo)n(wing)e(the)i -(kind)g(of)f(error.)0 1658 y Fd(1.2)112 b(C++)38 b(Macros)g(for)f -(trace)g(and)i(debug)0 1868 y Fh(SALOME)119 b(pro)n(vides)e(C++)h -(macros)f(for)i(trace)f(and)g(debug.)310 b(These)119 -b(macros)e(are)h(in)0 1981 y Fc(SALOME/src/SALOM)o(EL)o(oca)o(lT)o(ra)o -(ce/)o(ut)o(il)o(iti)o(es)o(.h)44 b Fh(and)50 b(this)g(\034le)h(m)n -(ust)f(b)r(e)g(included)h(in)g(C++)e(source.)103 b(Some)0 -2095 y(macros)22 b(are)g(activ)-5 b(ated)23 b(only)g(in)g(debug)h(mo)r -(de,)g(others)e(are)h(alw)n(a)n(ys)e(activ)-5 b(ated.)35 -b(T)-7 b(o)23 b(activ)-5 b(ate)23 b(the)h(debug)f(mo)r(de,)h -Fc(_DEBUG_)0 2208 y Fh(m)n(ust)i(b)r(e)h(de\034ned,)g(whic)n(h)f(is)h -(the)f(case)g(when)g(SALOME)h(Mak)n(e\034les)e(are)h(generated)f(from)h -(con\034gure,)f(without)i(options.)0 2322 y(When)g Fc(_DEBUG_)c -Fh(is)j(unde\034ned)h(\(release)f(mo)r(de:)36 b Fc(configure)k -(\025disable-debug)d(\025enable-producti)o(on)p Fh(\),)21 -b(the)26 b(debug)0 2436 y(mo)r(de)i(macros)e(are)h(de\034ned)h(empt)n -(y)g(\(they)h(do)e(nothing\).)38 b(So,)28 b(when)g(switc)n(hing)g(from) -f(debug)h(to)g(release,)e(it)j(is)e(p)r(ossible)0 2549 -y(\(and)h(recommended\))f(to)g(let)h(the)g(macro)e(calls)h(unc)n -(hanged)g(in)h(the)g(source.)0 2706 y(All)21 b(the)g(macros)e(generate) -g(trace)h(messages,)h(stored)e(in)i(a)g(circular)e(bu\033er)i(p)r(o)r -(ol.)34 b(A)21 b(separate)e(thread)h(reads)g(the)h(messages)0 -2819 y(in)27 b(the)g(bu\033er)f(p)r(o)r(ol,)h(and,)g(dep)r(ending)g(on) -f(options)g(giv)n(en)f(at)i(SALOME)g(start,)f(writes)g(the)h(messages)e -(on)h(the)h(standard)0 2933 y(output,)h(a)f(\034le,)h(or)f(send)g(them) -h(via)f(CORBA,)h(in)g(case)e(of)i(a)f(m)n(ulti)h(mac)n(hine)f -(con\034guration.)0 3089 y(Three)g(informations)g(are)f(systematically) -h(added)g(in)h(fron)n(t)f(of)g(the)h(information)f(displa)n(y)n(ed:)125 -3329 y Fb(\017)41 b Fh(the)28 b(thread)f(n)n(um)n(b)r(er)g(from)g(whic) -n(h)h(the)f(message)g(come)g(from;)125 3509 y Fb(\017)41 -b Fh(the)28 b(name)f(of)g(the)h(source)f(\034le)g(in)h(whic)n(h)g(the)g -(macros)e(is)h(set;)125 3689 y Fb(\017)41 b Fh(the)28 -b(line)f(n)n(um)n(b)r(er)h(of)f(the)h(source)e(\034le)i(at)g(whic)n(h)f -(the)h(macro)e(is)i(set.)0 3961 y Fe(1.2.1)94 b(Macros)32 -b(de\034ned)f(in)g(debug)h(and)g(release)f(mo)s(des)0 -4171 y(INF)m(OS_COMPILA)-8 b(TION)84 b Fh(The)28 b(C++)g(macro)g -Fc(INFOS_COMPILATI)o(ON)22 b Fh(writes)29 b(on)f(the)h(trace)f -(bu\033er)h(p)r(o)r(ol)g(infor-)0 4285 y(mations)e(ab)r(out)h(the)f -(compiling)h(pro)r(cess:)125 4525 y Fb(\017)41 b Fh(the)28 -b(name)f(of)g(the)h(compiler)f(:)37 b Fc(g++,)42 b(KCC,)g(CC,)g(pgCC)p -Fh(;)125 4705 y Fb(\017)f Fh(the)28 b(date)f(and)g(the)h(time)g(of)g -(the)g(compiling)f(pro)r(cessing)f(pro)r(cess.)0 4944 -y(This)35 b(macro)f Fc(INFOS_COMPILATIO)o(N)29 b Fh(do)r(es)35 -b(not)g(ha)n(v)n(e)f(an)n(y)g(argumen)n(t.)58 b(Moreo)n(v)n(er,)35 -b(it)g(is)g(de\034ned)h(in)f(b)r(oth)h(compiling)0 5058 -y(mo)r(de)28 b(:)37 b Fc(_DEBUG_)24 b Fh(and)k Fc(_RELEASE_)p -Fh(.)0 5214 y(Example)g(:)p eop -%%Page: 3 3 -3 2 bop 0 -167 3900 5 v 0 -200 a Fe(1.)73 b(T)-8 b(race)34 -b(and)e(debug)f(Utilities)2644 b Fh(3)0 162 y Fc(#include)40 -b("utilities.h")0 275 y(int)i(main\(int)e(argc)i(,)i(char)d(**argv\))0 -389 y({)87 502 y(INFOS_COMPILATIO)o(N;)87 616 y(...)0 -730 y(})0 1002 y Fe(INF)m(OS\(str\))83 b Fh(In)23 b(b)r(oth)g -(compiling)f(mo)r(de)h Fc(_DEBUG_)d Fh(and)i Fc(_RELEASE_)p -Fh(,)e(The)j(C++)f(macro)f Fc(INFOS)f Fh(writes)j(on)f(the)h(trace)0 -1116 y(bu\033er)28 b(p)r(o)r(ol)f(the)h(string)f(whic)n(h)g(has)g(b)r -(een)h(passed)f(in)h(argumen)n(t)e(b)n(y)i(the)g(user.)0 -1272 y(Example)g(:)0 1512 y Fc(#include)40 b("utilities.h")0 -1625 y(int)i(main\(int)e(argc)i(,)i(char)d(**argv\))0 -1739 y({)87 1852 y(...)87 1966 y(INFOS\("NORMAL)d(END)43 -b(OF)f(THE)h(PROCESS"\);)87 2080 y(return)e(0;)0 2193 -y(})0 2433 y Fh(displa)n(ys)26 b(:)0 2672 y Fc(main.cxx)40 -b([5])i(:)i(NORMAL)d(END)h(OF)h(THE)f(PROCESS)0 3058 -y Fe(INTERR)m(UPTION\(str\))84 b Fh(In)72 b(b)r(oth)h(compiling)e(mo)r -(de)i Fc(_DEBUG_)c Fh(and)j Fc(_RELEASE_)p Fh(,)80 b(The)72 -b(C++)f(macro)0 3172 y Fc(INTERRUPTION)34 b Fh(writes)k(on)g(the)h -(trace)f(bu\033er)g(p)r(o)r(ol)h(the)g(string,)h(with)g(a)e(sp)r(ecial) -g Fc(ABORT)e Fh(t)n(yp)r(e.)71 b(When)39 b(the)g(thread)0 -3285 y(in)28 b(c)n(harge)e(of)h(collecting)g(messages)f(\034nds)i(this) -f(message,)g(it)h(terminates)f(the)h(application,)f(after)g(message)f -(treatmen)n(t.)0 3558 y Fe(IMMEDIA)-8 b(TE_ABOR)g(T\(str\))83 -b Fh(In)48 b(b)r(oth)f(compiling)g(mo)r(de)h Fc(_DEBUG_)c -Fh(and)j Fc(_RELEASE_)p Fh(,)i(The)e(C++)f(macro)0 3672 -y Fc(IMMEDIATE_ABORT)29 b Fh(writes)35 b(the)g(message)f(immediately)h -(on)g(standard)f(error)f(and)i(exits)g(the)h(application.)59 -b(Remain-)0 3785 y(ing)27 b(messages)f(not)i(treated)f(b)n(y)g(the)h -(message)e(collector)g(thread)h(are)g(lost.)0 4058 y -Fe(1.2.2)94 b(Macros)32 b(de\034ned)f(only)g(in)h(debug)f(mo)s(de)0 -4268 y(MESSA)m(GE\(str\))83 b Fh(In)32 b Fc(_DEBUG_)e -Fh(compiling)i(mo)r(de)g(only)-7 b(,)33 b(the)g(C++)f(macro)f -Fc(MESSAGE)e Fh(writes)j(on)g(the)g(trace)g(bu\033er)0 -4381 y(p)r(o)r(ol)d(the)g(string)f(whic)n(h)h(has)f(b)r(een)i(passed)e -(in)h(argumen)n(t)e(b)n(y)i(the)g(user.)40 b(In)29 b -Fc(_RELEASE_)d Fh(compiling)i(mo)r(de,)h(this)g(macro)0 -4495 y(is)e(blank.)0 4652 y(Example)h(:)0 4891 y Fc(#include)40 -b("utilities.h")0 5005 y(#include)g()0 5118 y(using)h -(namespace)f(std;)0 5232 y(int)i(main\(int)e(argc)i(,)i(char)d -(**argv\))0 5345 y({)p eop -%%Page: 4 4 -4 3 bop 0 -167 3900 5 v 0 -200 a Fe(1.)73 b(T)-8 b(race)34 -b(and)e(debug)f(Utilities)2644 b Fh(4)87 162 y Fc(...)87 -275 y(const)42 b(char)f(*str)h(=)i("Salome";)87 389 y(MESSAGE\(str\);) -87 502 y(...)e(const)g(string)f(st;)87 616 y(st)i(=)g("Aster";)87 -730 y(MESSAGE\(c_str\(st)o(+")37 b(and)42 b(CASTEM"\)\);)87 -843 y(return)f(0;)0 957 y(})0 1192 y Fh(displa)n(ys)26 -b(:)0 1428 y Fc(-)43 b(Trace)f(main.cxx)e([8])i(:)h(Salome)0 -1541 y(-)g(Trace)f(main.cxx)e([12])i(:)h(Aster)e(and)i(CASTEM)0 -1813 y Fe(BEGIN_OF\(func_name\))82 b Fh(In)28 b Fc(_DEBUG_)c -Fh(compiling)i(mo)r(de,)i(The)f(C++)f(macro)g Fc(BEGIN_OF)d -Fh(app)r(ends)k(the)h(string)0 1927 y Fc("Begin)41 b(of)i(")26 -b Fh(to)h(the)g(one)f(passed)g(in)h(argumen)n(t)e(b)n(y)i(the)g(user)f -(and)g(displa)n(ys)g(the)h(result)f(on)h(the)g(trace)f(bu\033er)g(p)r -(o)r(ol.)37 b(In)0 2040 y Fc(_RELEASE_)24 b Fh(compiling)j(mo)r(de,)h -(this)g(macro)e(is)h(blank.)0 2197 y(Example)h(:)0 2432 -y Fc(#include)40 b("utilities.h")0 2546 y(int)i(main\(int)e(argc)i(,)i -(char)d(**argv\))0 2659 y({)87 2773 y(BEGIN_OF\(argv[0])o(\);)87 -2886 y(return)g(0;)0 3000 y(})0 3235 y Fh(displa)n(ys)26 -b(:)0 3471 y Fc(-)43 b(Trace)f(main.cxx)e([3])i(:)h(Begin)f(of)g(a.out) -0 3743 y Fe(END_OF\(func_name\))82 b Fh(In)47 b Fc(_DEBUG_)c -Fh(compiling)i(mo)r(de,)51 b(The)46 b(C++)f(macro)f Fc(END_OF)g -Fh(app)r(ends)i(the)g(string)0 3856 y Fc("Normal)41 b(end)h(of)h(")32 -b Fh(to)g(the)i(one)e(passed)g(in)h(argumen)n(t)e(b)n(y)h(the)h(user)f -(and)h(displa)n(ys)e(the)i(result)g(on)f(the)h(trace)f(bu\033er)0 -3970 y(p)r(o)r(ol.)37 b(In)27 b Fc(_RELEASE_)d Fh(compiling)j(mo)r(de,) -h(this)g(macro)e(is)i(blank.)0 4126 y(Example)g(:)0 4362 -y Fc(#include)40 b("utilities.h")0 4475 y(int)i(main\(int)e(argc)i(,)i -(char)d(**argv\))0 4589 y({)87 4702 y(END_OF\(argv[0]\);)87 -4816 y(return)g(0;)0 4929 y(})0 5165 y Fh(displa)n(ys)26 -b(:)0 5400 y Fc(-)43 b(Trace)f(main.cxx)e([4])i(:)h(Normal)e(end)i(of)f -(a.out)p eop -%%Page: 5 5 -5 4 bop 0 -167 3900 5 v 0 -200 a Fe(2.)73 b(Exceptions)3255 -b Fh(5)0 162 y Fe(SCR)m(UTE\(v)-5 b(ar\))84 b Fh(In)30 -b Fc(_DEBUG_)c Fh(compiling)j(mo)r(de,)h(The)f(C++)f(macro)g -Fc(SCRUTE)f Fh(displa)n(ys)h(its)h(argumen)n(t)f(whic)n(h)h(is)g(an)0 -275 y(application)21 b(v)-5 b(ariable)22 b(follo)n(w)n(ed)f(b)n(y)h -(the)g(v)-5 b(alue)22 b(of)g(the)h(v)-5 b(ariable.)34 -b(In)22 b Fc(_RELEASE_)d Fh(compiling)j(mo)r(de,)h(this)f(macro)f(is)h -(blank.)0 432 y(Example)28 b(:)0 671 y Fc(#include)40 -b("utilities.h")0 785 y(int)i(main\(int)e(argc)i(,)i(char)d(**argv\))0 -898 y({)87 1012 y(const)h(int)g(i=999;)87 1126 y(if\()g(i)i(>)f(0)g(\)) -g(SCRUTE\(i\))d(;)j(i=i+1;)87 1239 y(return)e(0;)0 1353 -y(})0 1592 y Fh(displa)n(ys)26 b(:)0 1832 y Fc(-)43 b(Trace)f(main.cxx) -e([5])i(:)h(i=999)0 2104 y Fe(ASSER)-8 b(T\(condition\))82 -b Fh(In)33 b Fc(_DEBUG_)c Fh(compiling)i(mo)r(de)i(only)-7 -b(,)33 b(The)f(C++)f(macro)g Fc(ASSERT)e Fh(c)n(hec)n(ks)i(the)i -(expression)0 2218 y(passed)c(in)h(argumen)n(t)e(to)h(b)r(e)h(not)g -(NULL.)g(If)g(it)g(is)f(NULL)h(the)g(condition)g(is)f(written)h(with)g -(the)g(macro)e Fc(INTERRUPTION)0 2331 y Fh(\(see)f(ab)r(o)n(v)n(e\).)36 -b(The)27 b(pro)r(cess)f(exits)h(after)f(trace)h(of)g(this)g(last)g -(message.)35 b(In)28 b Fc(_RELEASE_)23 b Fh(compiling)k(mo)r(de,)g -(this)g(macro)f(is)0 2445 y(blank.)37 b(N.B.)27 b(:)37 -b(if)28 b Fc(ASSERT)e Fh(is)h(already)f(de\034ned,)i(this)g(macro)e(is) -i(ignored.)0 2601 y(Example)g(:)0 2841 y Fc(#include)40 -b("utilities.h")0 2955 y(...)0 3068 y(const)h(char)h(*ptrS)g(=)h -(fonc\(\);)0 3182 y(ASSERT\(ptrS!=NUL)o(L\))o(;)0 3295 -y(cout)f(<<)h(strlen\(ptrS\);)0 3409 y(float)e(table[10];)0 -3522 y(int)h(k;)0 3636 y(...)0 3750 y(ASSERT\(k<10\);)0 -3863 y(cout)g(<<)h(table[k];)0 4201 y Ff(2)131 b(Exceptions)0 -4459 y Fd(2.1)112 b(C++)38 b(exceptions:)49 b(class)38 -b(SALOME_Exception)0 4669 y Fe(2.1.1)94 b(de\034nition)0 -4879 y Fh(The)30 b(class)f Fc(SALOME_Exceptio)o(n)24 -b Fh(pro)n(vides)k(a)h(generic)g(metho)r(d)h(to)g(send)f(a)h(message,)f -(with)h(optional)f(source)f(\034le)i(name)0 4993 y(and)g(line)g(n)n(um) -n(b)r(er.)43 b(This)30 b(class)f(is)h(in)n(tended)g(to)g(serv)n(e)e(as) -h(a)h(base)f(class)g(for)g(all)h(kinds)g(of)g(exceptions)f(SALOME)h(co) -r(de.)0 5106 y(All)25 b(the)g(exceptions)e(deriv)n(ed)h(from)g -Fc(SALOME_Exception)18 b Fh(could)24 b(b)r(e)h(handled)f(in)h(a)f -(single)f(catc)n(h,)i(in)g(whic)n(h)f(the)h(message)0 -5220 y(asso)r(ciated)h(to)i(the)g(exception)f(is)g(displa)n(y)n(ed,)g -(or)f(sen)n(t)i(to)f(a)g(log)g(\034le.)0 5376 y(The)h(class)e -Fc(SALOME_Exception)21 b Fh(inherits)28 b(its)f(b)r(eha)n(vior)f(from)i -(the)g(STL)f(class)g(exception.)p eop -%%Page: 6 6 -6 5 bop 0 -167 3900 5 v 0 -200 a Fe(2.)73 b(Exceptions)3255 -b Fh(6)0 162 y Fe(2.1.2)94 b(usage)0 372 y Fh(The)26 -b(header)g Fc(SALOME/src/util)o(s/)o(uti)o(ls)o(_S)o(ALO)o(ME)o(_E)o -(xce)o(pt)o(io)o(n.h)o(xx)20 b Fh(m)n(ust)26 b(b)r(e)h(included)f(in)h -(the)f(C++)g(source,)f(when)0 485 y(raised)h(or)h(trapp)r(ed:)0 -642 y Fc(#include)40 b("utils_SALOME_Ex)o(cep)o(ti)o(on)o(.hx)o(x")0 -798 y Fh(The)28 b Fc(SALOME_Exceptio)o(n)21 b Fh(constructor)26 -b(is:)0 1038 y Fc(SALOME_Exception)o(\()37 b(const)42 -b(char)g(*text,)784 1151 y(const)g(char)g(*fileName=0,)784 -1265 y(const)g(unsigned)e(int)i(lineNumber=0)d(\);)0 -1504 y Fh(The)28 b(exception)f(is)g(raised)g(lik)n(e)g(this:)0 -1744 y Fc(throw)41 b(SALOME_Exception\()o("m)o(y)d(pertinent)h -(message"\);)0 1983 y Fh(or)27 b(lik)n(e)g(this:)0 2223 -y Fc(throw)41 b(SALOME_Exception\()o(LO)o(CAL)o(IZ)o(ED)o(\("m)o(y)c -(pertinent)j(message"\)\);)0 2462 y Fh(where)24 b(LOCALIZED)h(is)f(a)h -(macro)e(pro)n(vided)g(with)j Fc(utils_SALOME_Ex)o(ce)o(pti)o(on)o(.h)o -(xx)18 b Fh(whic)n(h)25 b(giv)n(es)e(\034le)i(name)f(and)h(line)0 -2576 y(n)n(um)n(b)r(er.)0 2732 y(The)j(exception)f(is)g(handled)h(lik)n -(e)f(this:)0 2972 y Fc(try)87 3085 y({)174 3199 y(...)87 -3313 y(})0 3426 y(catch)41 b(\(const)g(SALOME_Exception)c(&ex\))87 -3540 y({)174 3653 y(cerr)42 b(<<)h(ex.what\(\))d(<::)o(In)o(st)o(anc)o(e\()o(\))c(;)0 2400 y(assert\(ptrPoint!)o(=N)o -(ULL)o(\))g(;)0 2639 y Fh(No)27 b(need)g(to)g(delete)g(ptrP)n(oin)n(t.) -37 b(Deletion)27 b(is)g(ac)n(hiev)n(ed)f(automatically)g(at)h(exit.)37 -b(If)27 b(the)h(user)e(tries)h(to)g(create)f(more)g(than)0 -2753 y(one)e(singleton)g(b)n(y)g(using)f(the)i(class)e(metho)r(d)i -Fc(SINGLETON_)p Fa(<)p Fc(TYPE)p Fa(>)o Fc(::I)o(ns)o(ta)o(nce)o(\(\))o -Fh(,)19 b(the)25 b(p)r(oin)n(ter)f(is)g(returned)g(with)h(the)0 -2866 y(same)i(v)-5 b(alue)27 b(ev)n(en)g(if)i(this)e(is)h(done)f(in)h -(di\033eren)n(t)g(functions)f(\(threads)h(?\).)0 3106 -y Fc(POINT)41 b(*p1=SINGLETON_:)o(:I)o(ns)o(tan)o(ce)o -(\(\))c(;)0 3219 y(...)0 3333 y(POINT)k(*p2=SINGLETON_:)o -(:I)o(ns)o(tan)o(ce)o(\(\))c(;)0 3446 y(assert\(p1==p2\))0 -3719 y Fe(3.1.3)94 b(Design)30 b(description)0 3929 y -Fh(Here)d(are)g(the)h(principles)f(features)g(of)g(the)h(singleton)f -(design)g(:)125 4169 y Fb(\017)41 b Fh(the)28 b(user)f(creates)g(an)g -(ob)5 b(ject)28 b(of)g(class)f Fc(TYPE)f Fh(b)n(y)i(using)f(the)i -(class)e(metho)r(d)h Fc(SINGLETON_)p Fa(<)p Fc(TYPE)p -Fa(>)o Fc(::)o(In)o(sta)o(nc)o(e\()o(\))208 4282 y Fh(whic)n(h)f -(returns)g(a)g(p)r(oin)n(ter)g(to)h(the)g(single)f(ob)5 -b(ject)27 b(;)125 4462 y Fb(\017)41 b Fh(to)27 b(create)g(an)g(ob)5 -b(ject,)27 b Fc(SINGLETON_)p Fa(<)p Fc(TYPE)p Fa(>)o -Fc(::I)o(ns)o(tan)o(ce)o(\(\))21 b Fh(uses)27 b(the)h(default)g -(constructor)e(of)i(class)e Fc(TYPE)g Fh(;)125 4642 y -Fb(\017)41 b Fh(at)31 b(the)h(same)g(time,)h(this)f(class)f(metho)r(d)h -(creates)f(a)g(destructor)g(ob)5 b(ject)31 b(whic)n(h)h(is)g(added)f -(to)h(the)g(generic)f(list)h(of)208 4756 y(destructor)26 -b(ob)5 b(jects)27 b(to)h(b)r(e)g(executed)f(at)g(the)h(end)g(of)g(the)g -(application)f(\()p Fc(atexit)p Fh(\))e(;)125 4936 y -Fb(\017)41 b Fh(at)30 b(the)h(end)f(of)h(the)f(application)g(pro)r -(cess)f(all)h(the)h(deletions)f(are)g(p)r(erformed)f(b)n(y)i(the)f -Fc(Nettoyage\(\))c Fh(C)31 b(function)208 5049 y(whic)n(h)c(executes)g -(the)h(destruction)f(ob)5 b(jects)27 b(end)h(then)g(deletes)g(the)g -(destructions)f(ob)5 b(jects)27 b(themselv)n(es)g(;)125 -5229 y Fb(\017)41 b Fh(the)20 b Fc(Nettoyage\(\))c Fh(C)41 -b(function)21 b(using)f(atexit\(\))h(C)40 b(function)21 -b(is)f(em)n(b)r(edded)h(in)g(a)f(static)g(single)g(ob)5 -b(ject)20 b Fc(ATEXIT_\(\))p Fh(.)p eop -%%Trailer -end -userdict /end-hook known{end-hook}if -%%EOF diff --git a/doc/salome/tui/Makefile.am b/doc/salome/tui/Makefile.am new file mode 100644 index 000000000..09511f953 --- /dev/null +++ b/doc/salome/tui/Makefile.am @@ -0,0 +1,27 @@ +# -* Makefile *- +# +# Author : Paul RASCLE (EDF) +# Date : 16/02/2006 +# $Header$ +# + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +EXTRA_DIST = $(srcdir)/KERNEL + +dist-hook: + rm -rf `find $(distdir) -name CVS` + +userdoc: + cp -fr $(srcdir)/KERNEL ./INPUT; \ + cd INPUT; \ + sed 's|../../../share/salome|@top_srcdir@|' ./doxyfile > ./doxyfile1; \ + mv -f doxyfile1 doxyfile; \ + $(DOXYGEN) ./doxyfile; \ + cd ..; + $(INSTALL) -d $(docdir)/tui/KERNEL; + 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; + diff --git a/doc/salome/tui/Makefile.in b/doc/salome/tui/Makefile.in deleted file mode 100644 index eeaff820d..000000000 --- a/doc/salome/tui/Makefile.in +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (C) 2003 CEA/DEN, EDF R&D -# -# -# -# File : Makefile.in -# Author : Vasily Rusyaev (Open Cascade NN) -# Module : doc -# $Header: - -top_srcdir=@top_srcdir@ -top_builddir=../../.. -root_srcdir=@ROOT_SRCDIR@ -srcdir=@srcdir@ -VPATH=.:@srcdir@ -doxygen=@DOXYGEN@ - -@COMMENCE@ - -docs: - cp -fr $(srcdir)/KERNEL ./INPUT; \ - cd INPUT; \ - sed 's|../../../share/salome|$(root_srcdir)|' ./doxyfile > ./doxyfile1; \ - mv -f doxyfile1 doxyfile; \ - $(doxygen) ./doxyfile; \ - cd ..; \ - mkdir KERNEL; \ - cp -fr $(srcdir)/KERNEL/sources/static/*.* ./KERNEL/ - cp -fr $(srcdir)/KERNEL/sources/ KERNEL/ - cp -fr $(srcdir)/KERNEL/HTML/ KERNEL/ - cp -f $(srcdir)/pythfilter.py KERNEL/ - rm -fr INPUT - -clean: - rm -fr KERNEL - -distclean: clean - rm -fr INPUT - -install: - $(INSTALL) -d $(docdir); \ - mkdir -p $(docdir)/tui - cp -fr KERNEL $(docdir)/tui - -uninstall: - rm -fr $(docdir)/tui/KERNEL diff --git a/doc/txt2html.sh b/doc/txt2html.sh new file mode 100755 index 000000000..941046314 --- /dev/null +++ b/doc/txt2html.sh @@ -0,0 +1,36 @@ +#/bin/sh +# =================================================================== +# This shell script is provided for generating the html files +# from the txt files (restructured text) in the source directory. +# +# Usage: just execute the script where it stands in the source +# directory. The file list has to be updated manually when adding +# a new restructured text file. +# +# Note that the building process executes a target rstdoc that +# generates the html documentation without need of this script. +# The autoconficuration (check_htmlgen.m4) set the correct generator +# rst2html by replacing the @RST2HTML@ tag. +# =================================================================== +# (CSSI - gboulant - 25/10/05) +# + +# This must be updated manually in this script (for source usage only) +RST2HTML=rst2html + +FILELIST="index + UnitTests + SALOME_Application + INSTALL + kernel_resources + userguide" + +STYLESHEET=rst.css +RSTOPTS="--output-encoding=latin1 --stylesheet=$STYLESHEET" + +for file in $FILELIST; do + bfn=`basename $file .txt` + echo "Generating ${bfn}.html from ${bfn}.txt ..." + $RST2HTML $RSTOPTS ${bfn}.txt ${bfn}.html +done + diff --git a/doc/userguide.txt b/doc/userguide.txt new file mode 100644 index 000000000..96bbfb6b0 --- /dev/null +++ b/doc/userguide.txt @@ -0,0 +1,125 @@ + +================================================================= +User's guide, for developpers and users +================================================================= + +.. contents:: +.. sectnum:: + +This guide provides you with some basic concepts for developing and +using the SALOME platform. You will find some information on the +general technical architecture ... + +Introduction +============ + +General information +------------------- + +This document has been initialized by collecting and updating an existing +documentation. The restructured text format has been selected for +writing. This format can be read with a basic editor except for +pictures and some hypertext links. You can build the html pages using +the docutils scripts provided with python packages on most platform. + +Definitions +----------- + +``WORK IN PROGRESS`` + +Module + definition of a module and/or link to the definition + +Container + definition of a container + + +General concepts +================ +modules et dépendances (s'inspirer de PYHELLO) + + +Filesystem organisation +======================== + +Voir doc de JR "Organisation de la plate-forme" + +A typical source working directory +---------------------------------- +organisation type des sources d'un module standard (spécifications techniques) + +A typical installation directory +-------------------------------- +organisation type des produits installés + + +Building process +================ +Procédures de compilation (renvoie au install.sh) + + +Developer's guide - basic concepts +========================================= + +Guide du développeur: éléments de conception + - zoom sur certains éléments techniques bons à connaitre pour faire + évoluer le KERNEL sans tout casser. + - les ressources du kernel: + - trace, debug, exception (cf. kernel_ressources.tex) + - classes batch (présentation puis renvoi à la doc d'Ivan) + - développement de tests unitaires + +Developer's guide - managing the development space +================================================== + +- Guide du développeur: gestion de l'espace de développement + - principe de mise en oeuvre (rÎle des étapes: build_configure, ...) + - description des fichiers m4 et du principe de mise en oeuvre + - les Makefile.in, ... (cf. doc guide du développeur). + - évolution des procédures de construction + - personalisation des procédures de construction + +Developer' guide - integration tools +==================================== +- Guide de l'intégrateur (développeur de nouveaux modules) +(on lui montre ici le principe de construction et les ressources à +disposition pour faire le travail) + - création d'un modules + - intégration code boßte noire (perfect, solver) + - intégration bibliothÚque de fonctions (hxx2salome, voir avec + N.Crouzet) + - intégration de modÚles de données (xdata) + + +End user's guide +================ +- Guide de l'utilisateur + - concept d'application (renvoie doc Paul) + - commandes avancées (showNS, exemple de contact de la + session, d'un engine, utilisation du lifeCycle, du module salome, + des modules geompy et smesh) + - utilisation en mode distribué (doc de B. Sechet) + - GUI and TUI documentation + + + + + + + + + + + + + + + +RST Exemples +============ + +See INSTALL_ for general information on required configuration and +prerequisites, compilation procedure, setting environment principles. + +.. _INSTALL: ./INSTALL.html + diff --git a/idl/Makefile.am b/idl/Makefile.am new file mode 100644 index 000000000..3f41523bf --- /dev/null +++ b/idl/Makefile.am @@ -0,0 +1,129 @@ + +# +# 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 +# package and then is not manage here. +# + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +BASEIDL_FILES = \ + SALOME_Exception.idl \ + SALOME_Comm.idl \ + SALOME_ModuleCatalog.idl \ + SALOME_DataTypeCatalog.idl \ + SALOME_RessourcesCatalog.idl \ + SALOMEDS.idl \ + SALOMEDS_Attributes.idl \ + SALOME_Component.idl \ + SALOME_ContainerManager.idl \ + SALOME_TestComponent.idl \ + SALOME_Registry.idl \ + Logger.idl \ + SALOME_GenericObj.idl \ + SALOME_TestModuleCatalog.idl \ + nstest.idl + +MPIIDL_FILES = \ + SALOME_MPIObject.idl \ + SALOME_MPIContainer.idl \ + SALOME_TestMPIComponent.idl + +IDL_FILES = $(BASEIDL_FILES) +if MPI_IS_OK + IDL_FILES += $(MPIIDL_FILES) +endif + +# all the idl files are needed for make dist +EXTRA_DIST= $(BASEIDL_FILES) $(MPIIDL_FILES) + +# This variable defines the files to be installed +salomeidl_DATA = $(IDL_FILES) + +# Sources built from idl files +# BUILT_SOURCE = first thing done on make all +# idl dependencies are checked and rebuilt first + +BASEIDL_SOURCES =\ + SALOME_ExceptionSK.cc \ + SALOME_CommSK.cc \ + SALOME_ModuleCatalogSK.cc \ + SALOME_DataTypeCatalogSK.cc \ + SALOME_RessourcesCatalogSK.cc \ + SALOMEDSSK.cc \ + SALOMEDS_AttributesSK.cc \ + SALOME_ComponentSK.cc \ + SALOME_ContainerManagerSK.cc \ + SALOME_TestComponentSK.cc \ + SALOME_RegistrySK.cc \ + LoggerSK.cc \ + SALOME_GenericObjSK.cc \ + SALOME_TestModuleCatalogSK.cc \ + nstestSK.cc + +MPIIDL_SOURCES = \ + SALOME_MPIObjectSK.cc \ + SALOME_MPIContainerSK.cc \ + SALOME_TestMPIComponentSK.cc + +IDL_SOURCES = $(BASEIDL_SOURCES) +if MPI_IS_OK + IDL_SOURCES += $(MPIIDL_SOURCES) +endif + +BUILT_SOURCES = $(IDL_SOURCES) + +lib_LTLIBRARIES = libSalomeIDLKernel.la +nodist_libSalomeIDLKernel_la_SOURCES = $(BUILT_SOURCES) +libSalomeIDLKernel_la_CPPFLAGS =\ + -I$(top_builddir)/salome_adm/unix \ + -I$(top_builddir)/idl \ + @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ +libSalomeIDLKernel_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libSalomeIDLKernel_la_LIBADD = @CORBA_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@ -I$(top_builddir)/salome/idl +IDLPYFLAGS = @IDLPYFLAGS@ + +# potential problem on parallel make on the following - multiple outputs +SUFFIXES = .idl .hh SK.cc +.idlSK.cc: + $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $< +.idl.hh: + $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $< + + +install-exec-local: $(IDL_FILES:%=$(top_srcdir)/idl/%) + $(INSTALL) -d $(pkgpythondir) + ls $^ | while read file; do \ + $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(pkgpythondir) $$file ; \ + done + +# uninstall-local removes too much, but it works in distcheck +uninstall-local: + rm -rf $(pkgpythondir)/* + +mostlyclean-local: + -rm -f *.hh *.cc .depidl + +# 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) + @echo "" > $@ + @for dep in $^ dummy; do \ + if [ $$dep != "dummy" ]; then \ + echo Building dependencies for $$dep; \ + $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) $$dep 2>/dev/null | \ + sed 's/\.o/\SK.cc/' >>$@; \ + fi; \ + done ; + +-include .depidl + diff --git a/idl/Makefile.in b/idl/Makefile.in deleted file mode 100644 index 9ac8e2c24..000000000 --- a/idl/Makefile.in +++ /dev/null @@ -1,83 +0,0 @@ -# -# generate dependencies for idl file : -# - -# source path -top_srcdir=@top_srcdir@ -top_builddir=.. -srcdir=@srcdir@ -VPATH=. - -@COMMENCE@ - -IDL_FILES = \ - SALOME_Exception.idl \ - SALOME_Comm.idl \ - SALOME_ModuleCatalog.idl \ - SALOME_DataTypeCatalog.idl \ - SALOME_RessourcesCatalog.idl \ - SALOMEDS.idl \ - SALOMEDS_Attributes.idl \ - SALOME_Component.idl \ - SALOME_ContainerManager.idl \ - SALOME_TestComponent.idl \ - SALOME_Registry.idl \ - SALOME_MPIObject.idl \ - SALOME_MPIContainer.idl \ - Logger.idl \ - SALOME_GenericObj.idl \ - SALOME_TestModuleCatalog.idl - -PY_CLIENT_IDL = $(IDL_FILES) - -# we copy all idl file in $(top_builddir)/idl -inc: $(top_builddir)/idl/salome $(IDL_FILES:%=$(top_builddir)/idl/salome/%) - -$(top_builddir)/idl/salome: - mkdir -p $@ - -$(IDL_FILES:%=$(top_builddir)/idl/salome/%):$(IDL_FILES:%=$(top_srcdir)/idl/%) -# $(CP) $< $@ - cp -f $^ $(top_builddir)/idl/salome - - -lib: pyidl - -PYTHON_BUILD_SITE=$(top_builddir)/lib/python$(PYTHON_VERSION)/site-packages/@PACKAGE@ - -pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py) - -$(PYTHON_BUILD_SITE): - $(INSTALL) -d $@ - -$(PYTHON_BUILD_SITE)/%_idl.py: $(top_builddir)/idl/salome/%.idl - $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_BUILD_SITE) $< - - -# install python client (generated from idl file -install: $(top_builddir)/idl/salome install-pyidl install-idl - -# create directory $(idldir) and copy idl files into it -install-idl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%) - $(INSTALL) -d $(idldir) - cp -p -f $^ $(idldir) - - -install-pyidl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%) - $(INSTALL) -d $(PYTHON_SITE_INSTALL) - @for file in $^ dummy; do \ - if [ $$file != "dummy" ]; then \ - $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_SITE_INSTALL) $$file ; \ - fi ; \ - done ; - -#@ CONCLUDE @ - -cleandep: - -$(RM) .dep* - -distclean: - -$(RM) *.py - -$(RM) $(IDL_FILES:%=$(top_builddir)/idl/salome/%) - -$(RM) Makefile - diff --git a/idl/SALOMEDS.idl b/idl/SALOMEDS.idl index de883d82e..4c21467c8 100644 --- a/idl/SALOMEDS.idl +++ b/idl/SALOMEDS.idl @@ -97,6 +97,7 @@ during each working session. interface ChildIterator; interface Driver; interface AttributeStudyProperties; + interface AttributeParameter; interface UseCaseIterator; interface UseCaseBuilder; @@ -370,6 +371,29 @@ during each working session. boolean DumpStudy(in string thePath, in string theBaseName, in boolean isPublished); +/*! + 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. + \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 +*/ + AttributeParameter GetModuleParameters(in string theID, in string theModuleName, in long theSavePoint); + + +/*! + Returns 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") +*/ + string GetDefaultScript(in string theID, in string theModuleName); + /*! Private method, returns an implementation of this Study. \param theHostname is a hostname of the caller @@ -876,14 +900,14 @@ Gets the list of open studies ListOfAttributes GetAllAttributes(); /*! Gets the study of a given %SObject. - /return The study containing the given %SObject. + \return The study containing the given %SObject. */ Study GetStudy(); /*! Gets the CORBA object by its own IOR attribute. Returns nil, if can't. - /return The CORBA object of the %SObject. + \return The CORBA object of the %SObject. */ Object GetObject(); diff --git a/idl/SALOMEDS_Attributes.idl b/idl/SALOMEDS_Attributes.idl index 80afd5603..9306818dc 100644 --- a/idl/SALOMEDS_Attributes.idl +++ b/idl/SALOMEDS_Attributes.idl @@ -1334,5 +1334,130 @@ Sets the item to be selectable */ boolean IsScript(); }; + //========================================================================== +/*! \brief %AttributeParameter interface + + Attribute is a universal container of basic types +*/ + //========================================================================== + 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 +*/ + AttributeParameter GetFather(); +/*! + Returns True if this attribute has a father attribute +*/ + boolean HasFather(); +/*! + Returns True if this attribute is a root attribute +*/ + boolean IsRoot(); +/*! + 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); + }; }; #endif diff --git a/resources/Plugin.in b/resources/DEPRECATED/Plugin.in similarity index 100% rename from resources/Plugin.in rename to resources/DEPRECATED/Plugin.in diff --git a/resources/Makefile.am b/resources/Makefile.am new file mode 100644 index 000000000..b8f2d501f --- /dev/null +++ b/resources/Makefile.am @@ -0,0 +1,26 @@ +# -* Makefile *- +# +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL +# $Header$ +# + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Files to be installed +# =============================================================== +# + + +dist_salomeres_DATA=\ + CatalogDataType.xml \ + CatalogResources.xml \ + CatalogModulePersonnel.xml_skel \ + close.png \ + config \ + channel.cfg \ + KERNELCatalog.xml \ + salomeCommonModel.spml \ + SALOMEDS_Resources diff --git a/salome_adm/Makefile.am b/salome_adm/Makefile.am new file mode 100644 index 000000000..17e24c797 --- /dev/null +++ b/salome_adm/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = unix diff --git a/salome_adm/Makefile.in b/salome_adm/Makefile.in deleted file mode 100644 index 4dfafb94b..000000000 --- a/salome_adm/Makefile.in +++ /dev/null @@ -1,47 +0,0 @@ -# source path -top_srcdir=@top_srcdir@ -top_builddir=.. -srcdir=@srcdir@ -VPATH=.:$(srcdir)/salome_adm - - -all: resources - -install: - cp -rf @top_srcdir@/salome_adm @prefix@ - -bin: - -resources : - cp -rf @top_srcdir@/salome_adm $(top_builddir) - -inc: - -lib: - -include/salome/SALOMEconfig.h: - -include/salome/config.h: - -include/salome/sstream: - -depend: - -depend_idl: - -install-end: - -install-include: - -install-bin: - -uninstall: - -uninstall-idl: - -distclean: - -clean: - -distclean-other: - diff --git a/salome_adm/unix/Doxyfile b/salome_adm/unix/DEPRECATED/Doxyfile similarity index 100% rename from salome_adm/unix/Doxyfile rename to salome_adm/unix/DEPRECATED/Doxyfile diff --git a/salome_adm/unix/F77config.h.in b/salome_adm/unix/DEPRECATED/F77config.h.in similarity index 100% rename from salome_adm/unix/F77config.h.in rename to salome_adm/unix/DEPRECATED/F77config.h.in diff --git a/salome_adm/unix/config.h.in b/salome_adm/unix/DEPRECATED/config.h.in similarity index 100% rename from salome_adm/unix/config.h.in rename to salome_adm/unix/DEPRECATED/config.h.in diff --git a/salome_adm/unix/depend.in b/salome_adm/unix/DEPRECATED/depend.in similarity index 100% rename from salome_adm/unix/depend.in rename to salome_adm/unix/DEPRECATED/depend.in diff --git a/salome_adm/unix/DEPRECATED/envScript.in b/salome_adm/unix/DEPRECATED/envScript.in new file mode 100644 index 000000000..3a0574312 --- /dev/null +++ b/salome_adm/unix/DEPRECATED/envScript.in @@ -0,0 +1,26 @@ + +DIR=`pwd` +EXEC_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` +cd $EXEC_DIR/.. +SALOME_HOME_DIR=`pwd` +cd $EXEC_DIR + +export SALOME_HOME_DIR +SALOME_SRC_DIR=@ROOT_SRCDIR@ +export SALOME_SRC_DIR +ORB_HOME_DIR=@CORBA_ROOT@ +export ORB_HOME_DIR + +LD_LIBRARY_PATH=${SALOME_HOME_DIR}/lib:${LD_LIBRARY_PATH} +export LD_LIBRARY_PATH + +# echo $SALOME_HOME_DIR = SALOME_HOME_DIR +# echo $SALOME_SRC_DIR = SALOME_SRC_DIR + +PYVTK_PATH=@VTKPY_MODULES@ +PYTHONPATH=${PYTHONPATH}:${SALOME_HOME_DIR}/idl:${SALOME_HOME_DIR}/bin:${SALOME_HOME_DIR}/lib:${PYVTK_PATH}:${EXEC_DIR} +export PYTHONPATH + +MICORC=/dev/null +export MICORC + diff --git a/salome_adm/unix/make_commence.in b/salome_adm/unix/DEPRECATED/make_commence.in similarity index 78% rename from salome_adm/unix/make_commence.in rename to salome_adm/unix/DEPRECATED/make_commence.in index d1b961624..5517078df 100644 --- a/salome_adm/unix/make_commence.in +++ b/salome_adm/unix/DEPRECATED/make_commence.in @@ -42,8 +42,8 @@ CXX_DEPEND_FLAG = @CXX_DEPEND_FLAG@ # BOOST Library BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ +BOOST_LIBSUFFIX = @BOOST_LIBSUFFIX@ BOOST_LIBS = @BOOST_LIBS@ -BOOST_LIBTHREAD = @BOOST_LIBTHREAD@ # OpenPBS @@ -62,12 +62,6 @@ LSF_LIBS = @LSF_LIBS@ CPPUNIT_INCLUDES = @CPPUNIT_INCLUDES@ CPPUNIT_LIBS = @CPPUNIT_LIBS@ -# JAVA - -#JAVA_INCLUDES = @JAVA_INCLUDES@ -#JAVA_LIBS = @JAVA_LIBS@ -#JAVA_LDPATH = @JAVA_LDPATH@ - # PYTHON PYTHON = @PYTHON@ @@ -77,8 +71,8 @@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_VERSION = @PYTHON_VERSION@ PYTHON_SITE = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages PYTHON_SITE_INSTALL = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome -# QT +# QT QT_ROOT = @QT_ROOT@ QT_INCLUDES = @QT_INCLUDES@ QT_MT_INCLUDES = @QT_INCLUDES@ -DQT_THREAD_SUPPORT @@ -259,33 +253,11 @@ all: # add target to build administrative files # -Makefile: $(top_builddir)/config.status $(srcdir)/Makefile.in - cd $(top_builddir) ; ./config.status - -$(top_builddir)/config.status: $(top_srcdir)/configure - cd $(top_builddir) ; ./config.status --recheck - -# VPATH contain $(srcdir), so make configure is good in top_srcdir and we must add target configure otherwise :-) -ifneq ($(top_srcdir),$(srcdir)) -configure: $(top_srcdir)/configure -endif - -$(top_srcdir)/configure: $(top_srcdir)/configure.in $(top_srcdir)/aclocal.m4 - cd $(top_srcdir) ; autoconf - -$(top_srcdir)/configure.in: $(top_srcdir)/configure.in.base - cd $(top_srcdir) && ./build_configure - - -ACLOCAL_SRC = \ -ac_cxx_bool.m4 check_corba.m4 check_vtk.m4 \ -ac_cxx_depend_flag.m4 check_hdf5.m4 enable_pthreads.m4 \ -ac_cxx_mutable.m4 check_mico.m4 libtool.m4 \ -ac_cxx_namespaces.m4 check_omniorb.m4 pyembed.m4 \ -ac_cxx_partial_specialization.m4 check_opengl.m4 python.m4 \ -ac_cxx_typename.m4 check_pthreads.m4 check_cas.m4 \ -ac_cc_warnings.m4 check_qt.m4 check_swig.m4 \ -check_boost.m4 +# Building html from restructured text files +STYLESHEET=rst.css +RST2HTML=@RST2HTML@ +#RSTOPTS=--output-encoding=latin1 --stylesheet=$(STYLESHEET) +RSTOPTS=--output-encoding=latin1 -$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) - cd $(top_srcdir) ; aclocal --acdir=adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files +%.html: $(srcdir)/%.txt + $(RST2HTML) $(RSTOPTS) $< $@ diff --git a/salome_adm/unix/make_conclude.in b/salome_adm/unix/DEPRECATED/make_conclude.in similarity index 98% rename from salome_adm/unix/make_conclude.in rename to salome_adm/unix/DEPRECATED/make_conclude.in index d5d4a5d14..a66834628 100644 --- a/salome_adm/unix/make_conclude.in +++ b/salome_adm/unix/DEPRECATED/make_conclude.in @@ -59,7 +59,7 @@ $(LIB_BUILD): $(top_builddir)/lib/salome/%.la: %.la ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<).0 \ $(patsubst %.la, %.so, $@).0 || true - if ! test -z $(LIB_SWIG) ; then \ + if test "X$(LIB_SWIG)" != "X"; then \ ln -sf $(patsubst %.la,%.so, $(CURDIR)/.libs/$<) $(top_builddir)/lib/salome/_$(LIB_SWIG) || true;\ fi; @@ -139,10 +139,14 @@ $(DEST_SHAREDPYSCRIPTS): $(PYTHON_SHARED_SITE)/%: % check: test -tests: test +tests: unittest test: $(LIB) $(TEST_PROGS:%=$(top_builddir)/bin/salome/%) +unittest: + @if test "x$(UNIT_TEST_PROG)" != "x"; then \ + $(top_builddir)/bin/salome/$(UNIT_TEST_PROG); \ + fi; # copy header file in $(inc_builddir) # @@ -177,7 +181,7 @@ install: $(LIB) $(BIN) $(TEST_PROGS) $(libdir) $(includedir) $(bindir) $(datadir ($(LT_INSTALL_LIB) $$f $(libdir)/. || exit 1); \ fi; \ done - @if ! test -z $(LIB_SWIG) ; then \ + @if test "X$(LIB_SWIG)" != "X"; then \ (cd $(libdir); ln -sf $(patsubst %.so, %cmodule.so, $(LIB_SWIG)) _$(LIB_SWIG) || true); \ fi; @for f in X $(BIN); do \ diff --git a/salome_adm/unix/make_module.in b/salome_adm/unix/DEPRECATED/make_module.in similarity index 100% rename from salome_adm/unix/make_module.in rename to salome_adm/unix/DEPRECATED/make_module.in diff --git a/salome_adm/unix/make_omniorb.in b/salome_adm/unix/DEPRECATED/make_omniorb.in similarity index 100% rename from salome_adm/unix/make_omniorb.in rename to salome_adm/unix/DEPRECATED/make_omniorb.in diff --git a/salome_adm/unix/sstream.in b/salome_adm/unix/DEPRECATED/sstream.in similarity index 100% rename from salome_adm/unix/sstream.in rename to salome_adm/unix/DEPRECATED/sstream.in diff --git a/salome_adm/unix/Makefile.am b/salome_adm/unix/Makefile.am new file mode 100644 index 000000000..b1f868738 --- /dev/null +++ b/salome_adm/unix/Makefile.am @@ -0,0 +1,21 @@ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +SUBDIRS = config_files + +DEPRECATED_FILES=\ + DEPRECATED/F77config.h.in \ + DEPRECATED/sstream.in \ + DEPRECATED/envScript.in \ + DEPRECATED/depend.in \ + DEPRECATED/make_commence.in \ + DEPRECATED/make_conclude.in \ + DEPRECATED/make_module.in \ + DEPRECATED/make_omniorb.in + +# The deprecated files are deprecated for the KERNEL but not for the +# related modules (GUI, MED, ...), for now. Some files have to be installed. +dist_salomeadmux_DATA=\ + SALOMEconfig.h.in \ + pythonbe.py \ + $(DEPRECATED_FILES) diff --git a/salome_adm/unix/SALOMEconfig.h.in b/salome_adm/unix/SALOMEconfig.h.in index c1be35bd0..22372e97a 100644 --- a/salome_adm/unix/SALOMEconfig.h.in +++ b/salome_adm/unix/SALOMEconfig.h.in @@ -32,4 +32,26 @@ #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@" + #endif diff --git a/salome_adm/unix/config_files/ac_cc_warnings.m4 b/salome_adm/unix/config_files/DEPRECATED/ac_cc_warnings.m4 similarity index 100% rename from salome_adm/unix/config_files/ac_cc_warnings.m4 rename to salome_adm/unix/config_files/DEPRECATED/ac_cc_warnings.m4 diff --git a/salome_adm/unix/config_files/ac_cxx_bool.m4 b/salome_adm/unix/config_files/DEPRECATED/ac_cxx_bool.m4 similarity index 100% rename from salome_adm/unix/config_files/ac_cxx_bool.m4 rename to salome_adm/unix/config_files/DEPRECATED/ac_cxx_bool.m4 diff --git a/salome_adm/unix/config_files/ac_cxx_mutable.m4 b/salome_adm/unix/config_files/DEPRECATED/ac_cxx_mutable.m4 similarity index 100% rename from salome_adm/unix/config_files/ac_cxx_mutable.m4 rename to salome_adm/unix/config_files/DEPRECATED/ac_cxx_mutable.m4 diff --git a/salome_adm/unix/config_files/ac_cxx_partial_specialization.m4 b/salome_adm/unix/config_files/DEPRECATED/ac_cxx_partial_specialization.m4 similarity index 100% rename from salome_adm/unix/config_files/ac_cxx_partial_specialization.m4 rename to salome_adm/unix/config_files/DEPRECATED/ac_cxx_partial_specialization.m4 diff --git a/salome_adm/unix/config_files/ac_cxx_typename.m4 b/salome_adm/unix/config_files/DEPRECATED/ac_cxx_typename.m4 similarity index 100% rename from salome_adm/unix/config_files/ac_cxx_typename.m4 rename to salome_adm/unix/config_files/DEPRECATED/ac_cxx_typename.m4 diff --git a/salome_adm/unix/config_files/check_Salome.m4 b/salome_adm/unix/config_files/DEPRECATED/check_Salome.m4 similarity index 94% rename from salome_adm/unix/config_files/check_Salome.m4 rename to salome_adm/unix/config_files/DEPRECATED/check_Salome.m4 index ff12fd6c3..d598c99f9 100644 --- a/salome_adm/unix/config_files/check_Salome.m4 +++ b/salome_adm/unix/config_files/DEPRECATED/check_Salome.m4 @@ -33,7 +33,7 @@ AC_ARG_WITH(salome, --with-salome=DIR root directory path of SALOME installation, SALOME_DIR="$withval",SALOME_DIR="") -if test "x$SALOME_DIR" == "x" ; then +if test "x$SALOME_DIR" = "x" ; then # no --with-salome-dir option used @@ -59,10 +59,10 @@ if test -f ${SALOME_DIR}/bin/libMEDMEM_Swig.py ; then Salome_ok=yes AC_MSG_RESULT(Using Salome distribution in ${SALOME_DIR}) - if test "x$SALOME_ROOT_DIR" == "x" ; then + if test "x$SALOME_ROOT_DIR" = "x" ; then SALOME_ROOT_DIR=${SALOME_DIR} fi - if test "x$SALOME_SITE_DIR" == "x" ; then + if test "x$SALOME_SITE_DIR" = "x" ; then SALOME_SITE_DIR=${SALOME_ROOT_DIR} fi AC_SUBST(SALOME_ROOT_DIR) diff --git a/salome_adm/unix/config_files/check_java.m4 b/salome_adm/unix/config_files/DEPRECATED/check_java.m4 similarity index 100% rename from salome_adm/unix/config_files/check_java.m4 rename to salome_adm/unix/config_files/DEPRECATED/check_java.m4 diff --git a/salome_adm/unix/config_files/check_mico.m4 b/salome_adm/unix/config_files/DEPRECATED/check_mico.m4 similarity index 100% rename from salome_adm/unix/config_files/check_mico.m4 rename to salome_adm/unix/config_files/DEPRECATED/check_mico.m4 diff --git a/salome_adm/unix/config_files/check_pthreads.m4 b/salome_adm/unix/config_files/DEPRECATED/check_pthreads.m4 similarity index 92% rename from salome_adm/unix/config_files/check_pthreads.m4 rename to salome_adm/unix/config_files/DEPRECATED/check_pthreads.m4 index d5033889e..eb511eca3 100644 --- a/salome_adm/unix/config_files/check_pthreads.m4 +++ b/salome_adm/unix/config_files/DEPRECATED/check_pthreads.m4 @@ -39,10 +39,14 @@ if test $flag = no; then AC_CHECK_LIB(pthread,pthread_mutex_lock, LIBS_PTHREADS="-lpthread $LIBS_PTHREADS",LIBS_PTHREADS="") else - LDFLAGS="-pthread $LDFLAGS" + case $host_os in + osf*) + LIBS_PTHREADS="-lpthread $LIBS_PTHREADS" + ;; + esac fi -if test $flag = no && x$LIBS_PTHREADS = x; then +if test $flag = no && test x$LIBS_PTHREADS = x; then threads_ok=no else threads_ok=yes diff --git a/salome_adm/unix/config_files/config.guess b/salome_adm/unix/config_files/DEPRECATED/config.guess similarity index 100% rename from salome_adm/unix/config_files/config.guess rename to salome_adm/unix/config_files/DEPRECATED/config.guess diff --git a/salome_adm/unix/config_files/config.sub b/salome_adm/unix/config_files/DEPRECATED/config.sub similarity index 100% rename from salome_adm/unix/config_files/config.sub rename to salome_adm/unix/config_files/DEPRECATED/config.sub diff --git a/salome_adm/unix/config_files/install-sh b/salome_adm/unix/config_files/DEPRECATED/install-sh similarity index 96% rename from salome_adm/unix/config_files/install-sh rename to salome_adm/unix/config_files/DEPRECATED/install-sh index 56ccb7b5f..51319e83e 100755 --- a/salome_adm/unix/config_files/install-sh +++ b/salome_adm/unix/config_files/DEPRECATED/install-sh @@ -33,7 +33,7 @@ done if test x$dirParams = "xyes"; then mkdir -p $dirPath else -cp $args $dirPath +cp -f $args $dirPath for arg in $args; do myArg=`basename $arg` if test x$chmodParams != x; then diff --git a/salome_adm/unix/config_files/libtool.m4 b/salome_adm/unix/config_files/DEPRECATED/libtool.m4 similarity index 100% rename from salome_adm/unix/config_files/libtool.m4 rename to salome_adm/unix/config_files/DEPRECATED/libtool.m4 diff --git a/salome_adm/unix/config_files/ltconfig b/salome_adm/unix/config_files/DEPRECATED/ltconfig similarity index 100% rename from salome_adm/unix/config_files/ltconfig rename to salome_adm/unix/config_files/DEPRECATED/ltconfig diff --git a/salome_adm/unix/config_files/ltmain.sh b/salome_adm/unix/config_files/DEPRECATED/ltmain.sh similarity index 100% rename from salome_adm/unix/config_files/ltmain.sh rename to salome_adm/unix/config_files/DEPRECATED/ltmain.sh diff --git a/salome_adm/unix/config_files/missing b/salome_adm/unix/config_files/DEPRECATED/missing similarity index 100% rename from salome_adm/unix/config_files/missing rename to salome_adm/unix/config_files/DEPRECATED/missing diff --git a/salome_adm/unix/config_files/mkinstalldirs b/salome_adm/unix/config_files/DEPRECATED/mkinstalldirs similarity index 100% rename from salome_adm/unix/config_files/mkinstalldirs rename to salome_adm/unix/config_files/DEPRECATED/mkinstalldirs diff --git a/salome_adm/unix/config_files/Makefile.am b/salome_adm/unix/config_files/Makefile.am new file mode 100644 index 000000000..fde107175 --- /dev/null +++ b/salome_adm/unix/config_files/Makefile.am @@ -0,0 +1,65 @@ +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + + +# The deprecated files are deprecated for the KERNEL but not for the +# related modules (GUI, MED, ...). Some files have to be installed. +DEPRECATED_FILES=\ + DEPRECATED/ac_cc_warnings.m4 \ + DEPRECATED/ac_cxx_bool.m4 \ + DEPRECATED/ac_cxx_mutable.m4 \ + DEPRECATED/ac_cxx_partial_specialization.m4 \ + DEPRECATED/ac_cxx_typename.m4 \ + DEPRECATED/check_mico.m4 \ + DEPRECATED/check_pthreads.m4 \ + DEPRECATED/config.sub \ + DEPRECATED/config.guess \ + DEPRECATED/install-sh \ + DEPRECATED/libtool.m4 \ + DEPRECATED/ltconfig \ + DEPRECATED/ltmain.sh + +## The following scripts are required for modules not built with autotools +#dist_salomem4_SCRIPTS=\ +# compile \ +# config.guess \ +# config.sub \ +# depcomp \ +# install-sh \ +# ltmain.sh \ +# missing \ +# py-compile + +dist_salomem4_DATA=\ +ac_cxx_depend_flag.m4 \ +ac_cxx_have_sstream.m4 \ +ac_cxx_namespaces.m4 \ +ac_cxx_option.m4 \ +ac_cxx_template_options.m4 \ +ac_cxx_use_std_iostream.m4 \ +ac_cxx_warnings.m4 \ +ac_linker_options.m4 \ +acx_pthread.m4 \ +check_Kernel.m4 \ +check_boost.m4 \ +check_cas.m4 \ +check_corba.m4 \ +check_cppunit.m4 \ +check_f77.m4 \ +check_hdf5.m4 \ +check_htmlgen.m4 \ +check_lam.m4 \ +check_lsf.m4 \ +check_mpi.m4 \ +check_mpich.m4 \ +check_omniorb.m4 \ +check_opengl.m4 \ +check_openpbs.m4 \ +check_qt.m4 \ +check_sockets.m4 \ +check_swig.m4 \ +check_withihm.m4 \ +enable_pthreads.m4 \ +production.m4 \ +pyembed.m4 \ +python.m4 \ +$(DEPRECATED_FILES) diff --git a/salome_adm/unix/config_files/ac_cxx_option.m4 b/salome_adm/unix/config_files/ac_cxx_option.m4 index 72ea0ab11..d1f43ea6a 100644 --- a/salome_adm/unix/config_files/ac_cxx_option.m4 +++ b/salome_adm/unix/config_files/ac_cxx_option.m4 @@ -32,13 +32,14 @@ int main() { return 0; } EOF $CXX $1 conftest.cxx > conftest.log 2>&1 var=`echo $1 | sed -e "s, .*$,," | sed -e "s,^-,,"` - if ! grep -e $var conftest.log > /dev/null 2>&1 ; then +#CCRT if ! grep -e $var conftest.log > /dev/null 2>&1 ; then + if grep -e $var conftest.log > /dev/null 2>&1 ; then + AC_MSG_RESULT(no) + eval $4 + else AC_MSG_RESULT(yes) $2="${$2} $1" eval $3 - else - AC_MSG_RESULT(no) - eval $4 fi ]) diff --git a/salome_adm/unix/config_files/acx_pthread.m4 b/salome_adm/unix/config_files/acx_pthread.m4 new file mode 100644 index 000000000..87c868673 --- /dev/null +++ b/salome_adm/unix/config_files/acx_pthread.m4 @@ -0,0 +1,207 @@ +dnl Paul RASCLE: modification for Linux: -pthread required by boost... +dnl +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html +dnl +AC_DEFUN([ACX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_LANG_SAVE +AC_LANG_C +acx_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) + AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) + AC_MSG_RESULT($acx_pthread_ok) + if test x"$acx_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case "${host_cpu}-${host_os}" in + *linux*) + + # On linux "none" works, but boost requires -pthread, so, try first "-pthread" +acx_pthread_flags="-pthread pthreads none -Kthread -kthread lthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + ;; + + *solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthread or + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" + ;; +esac + +if test x"$acx_pthread_ok" = xno; then +for flag in $acx_pthread_flags; do + + case $flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $flag]) + PTHREAD_CFLAGS="$flag" + ;; + + pthread-config) + AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) + if test x"$acx_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$flag]) + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + AC_TRY_LINK([#include ], + [pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], + [acx_pthread_ok=yes]) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + AC_MSG_RESULT($acx_pthread_ok) + if test "x$acx_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$acx_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: threads are created detached by default + # and the JOINABLE attribute has a nonstandard name (UNDETACHED). + AC_MSG_CHECKING([for joinable pthread attribute]) + AC_TRY_LINK([#include ], + [int attr=PTHREAD_CREATE_JOINABLE;], + ok=PTHREAD_CREATE_JOINABLE, ok=unknown) + if test x"$ok" = xunknown; then + AC_TRY_LINK([#include ], + [int attr=PTHREAD_CREATE_UNDETACHED;], + ok=PTHREAD_CREATE_UNDETACHED, ok=unknown) + fi + if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then + AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok, + [Define to the necessary symbol if this constant + uses a non-standard name on your system.]) + fi + AC_MSG_RESULT(${ok}) + if test x"$ok" = xunknown; then + AC_MSG_WARN([we do not know how to create joinable pthreads]) + fi + + AC_MSG_CHECKING([if more special flags are required for pthreads]) + flag=no + case "${host_cpu}-${host_os}" in + *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; + *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; + esac + AC_MSG_RESULT(${flag}) + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: must compile with cc_r + AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) +else + PTHREAD_CC="$CC" +fi + +AC_SUBST(PTHREAD_LIBS) +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_CC) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_pthread_ok" = xyes; then + ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) + : +else + acx_pthread_ok=no + $2 +fi +AC_LANG_RESTORE +])dnl ACX_PTHREAD diff --git a/salome_adm/unix/config_files/check_boost.m4 b/salome_adm/unix/config_files/check_boost.m4 index 5d63bc4a0..37ff78d4f 100644 --- a/salome_adm/unix/config_files/check_boost.m4 +++ b/salome_adm/unix/config_files/check_boost.m4 @@ -23,67 +23,117 @@ AC_DEFUN([CHECK_BOOST],[ AC_CHECKING(for BOOST Library) +AC_REQUIRE([ENABLE_PTHREADS])dnl + AC_LANG_SAVE AC_LANG_CPLUSPLUS -AC_SUBST(BOOST_CPPFLAGS) BOOST_CPPFLAGS="" - -AC_SUBST(BOOST_LIBS) +BOOST_LIBSUFFIX="-mt" BOOST_LIBS="" -AC_SUBST(BOOST_LIBTHREAD) -BOOST_LIBTHREAD="" +AC_CHECKING(for BOOST location) +AC_ARG_WITH(boost, + [AC_HELP_STRING([--with-boost=DIR],[root directory path to BOOST library installation])], + [BOOSTDIR="$withval" + AC_MSG_RESULT("select $withval as path to BOOST library") + ]) -boost_ok=no +AC_MSG_RESULT(\$BOOSTDIR = ${BOOSTDIR}) -if test -z ${BOOSTDIR}; then - AC_CHECK_HEADER(boost/shared_ptr.hpp,boost_ok=yes,boost_ok=no) - if test boost_ok = no ; then - AC_MSG_WARN(You must provide BOOSTDIR variable) - fi -else - AC_MSG_RESULT(\$BOOSTDIR = ${BOOSTDIR}) +CPPFLAGS_old="${CPPFLAGS}" +LIBS_old=$LIBS - dnl BOOST headers - AC_CHECKING(for boost/shared_ptr.hpp header file) - CPPFLAGS_old="${CPPFLAGS}" +if test "x${BOOSTDIR}" != "x" ; then BOOST_CPPFLAGS="-I${BOOSTDIR}/include" - CPPFLAGS="${CPPFLAGS} ${BOOST_CPPFLAGS}" - - AC_CHECK_HEADER(boost/shared_ptr.hpp,boost_ok=yes,boost_ok=no) - - CPPFLAGS="${CPPFLAGS_old}" - - if test "x${boost_ok}" = "xyes" ; then - AC_MSG_RESULT(\$BOOST_CPPFLAGS = ${BOOST_CPPFLAGS}) - dnl BOOST libs - AC_CHECKING(for libboost_thread-mt.so library file) - AC_CHECK_FILE(${BOOSTDIR}/lib/libboost_thread-mt.so,boost_ok=yes,boost_ok=no) - if test "x${boost_ok}" = "xyes" ; then - BOOST_LIBTHREAD="libboost_thread-mt.so" - AC_MSG_RESULT(\$BOOST_LIBTHREAD = ${BOOST_LIBTHREAD}) - else - AC_CHECKING(for libboost_thread.so library file) - AC_CHECK_FILE(${BOOSTDIR}/lib/libboost_thread.so,boost_ok=yes,boost_ok=no) - if test "x${boost_ok}" = "xyes" ; then - BOOST_LIBTHREAD="libboost_thread.so" - AC_MSG_RESULT(\$BOOST_LIBTHREAD = ${BOOST_LIBTHREAD}) - fi + BOOST_LIBS="-L${BOOSTDIR}/lib" +fi + +boost_ok=no +boost_headers_ok=no +boost_binaries_ok=no + +dnl BOOST headers +AC_CHECKING(for BOOST headers) +CPPFLAGS="${CPPFLAGS_old} ${BOOST_CPPFLAGS}" + +boost_include_dir_ok=yes +if test "x${BOOSTDIR}" != "x" ; then + AC_CHECK_FILE(${BOOSTDIR}/include/boost/shared_ptr.hpp, + boost_include_dir_ok=yes, + boost_include_dir_ok=no) +fi + +if test "x${boost_include_dir_ok}" = "xyes" ; then + AC_TRY_COMPILE([#include ], + [boost::shared_ptr(new int)], + boost_headers_ok=yes, + boost_headers_ok=no) +fi + +if test "x${boost_headers_ok}" = "xno" ; then + BOOST_CPPFLAGS="BOOST_CPPFLAGS_NOT_DEFINED" +else + AC_MSG_RESULT(\$BOOST_CPPFLAGS = ${BOOST_CPPFLAGS}) +fi +AC_MSG_RESULT(for boost headers: $boost_headers_ok) + +if test "x${boost_headers_ok}" = "xyes" ; then + dnl BOOST binaries + AC_CHECKING(for BOOST binaries) + boost_lib_dir_ok=yes + if test "x${BOOSTDIR}" != "x" ; then + AC_CHECK_FILE(${BOOSTDIR}/lib/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/libboost_thread${BOOST_LIBSUFFIX}.so, + boost_lib_dir_ok=yes, + boost_lib_dir_ok=no) fi - if test "x${boost_ok}" = "xyes" ; then - if test "x${BOOSTDIR}" = "x/usr" ; then - BOOST_LIBS="" - else - BOOST_LIBS="-L${BOOSTDIR}/lib" - fi - AC_MSG_RESULT(\$BOOST_LIBS = ${BOOST_LIBS}) + fi + if test "x${boost_lib_dir_ok}" = "xyes" ; then + 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}" = "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) fi fi fi +if test "x${boost_binaries_ok}" = "xno" ; then + BOOST_LIBS="BOOST_LIBS_NOT_FOUND" + BOOST_LIBSUFFIX="-not-defined" +else + AC_MSG_RESULT(\$BOOST_LIBSUFFIX = ${BOOST_LIBSUFFIX}) + AC_MSG_RESULT(\$BOOST_LIBS = ${BOOST_LIBS}) +fi +AC_MSG_RESULT(for boost binaries: $boost_binaries_ok) + +CPPFLAGS="${CPPFLAGS_old}" +LIBS="${LIBS_old}" + +if test "x${boost_headers_ok}" = "xyes" ; then + if test "x${boost_binaries_ok}" = "xyes" ; then + boost_ok=yes + fi +fi + AC_MSG_RESULT(for boost: $boost_ok) +AC_SUBST(BOOST_CPPFLAGS) +AC_SUBST(BOOST_LIBSUFFIX) +AC_SUBST(BOOST_LIBS) + AC_LANG_RESTORE ])dnl diff --git a/salome_adm/unix/config_files/check_cas.m4 b/salome_adm/unix/config_files/check_cas.m4 index 0d1eb1653..2db76b875 100644 --- a/salome_adm/unix/config_files/check_cas.m4 +++ b/salome_adm/unix/config_files/check_cas.m4 @@ -42,13 +42,11 @@ AC_SUBST(CAS_LDFLAGS) AC_SUBST(CAS_LDPATH) AC_SUBST(CAS_STDPLUGIN) -OWN_CONFIG_H=no - CAS_CPPFLAGS="" CAS_CXXFLAGS="" CAS_LDFLAGS="" occ_ok=no -own_config_h=no +config_h=no dnl libraries directory location case $host_os in @@ -77,7 +75,7 @@ esac AC_MSG_CHECKING(for OpenCascade directories) -if test -z $CASROOT; then +if test -z "$CASROOT"; then AC_MSG_RESULT(CASROOT not defined) for d in `echo $LD_LIBRARY_PATH | sed -e "s/:/ /g"` ; do if test -f $d/libTKernel.so ; then @@ -103,7 +101,7 @@ fi dnl were is OCC ? -if test -z $CASROOT; then +if test -z "$CASROOT"; then AC_MSG_WARN(You must provide CASROOT variable : see OCC installation manual) else occ_ok=yes @@ -145,48 +143,25 @@ case $host_os in esac CPPFLAGS="$CPPFLAGS $CAS_CPPFLAGS" - if test -n $KERNEL_ROOT_DIR; then - if test -d $KERNEL_ROOT_DIR/include/salome; then - CAS_CPPFLAGS="$CAS_CPPFLAGS -I$KERNEL_ROOT_DIR/include/salome" - CPPFLAGS="$CPPFLAGS -I$KERNEL_ROOT_DIR/include/salome" - fi - fi - CAS_CPPFLAGS="$CAS_CPPFLAGS -I${ROOT_BUILDDIR}/include/salome" - CPPFLAGS="$CPPFLAGS -I${ROOT_BUILDDIR}/salome_adm/unix" - - echo echo echo testing config.h - echo - echo - AC_CHECK_HEADER(config.h, own_config_h=no, [ - echo - echo - echo "config.h file not found! Generating it..." - echo - echo - mv confdefs.h backup_confdefs.h - ${ROOT_SRCDIR}/make_config - rm -rf ${ROOT_BUILDDIR}/*.log - rm -rf ${ROOT_BUILDDIR}/*.status - mv backup_confdefs.h confdefs.h - rm -f backup_confdefs.h - own_config_h=yes - echo - echo + AC_CHECK_HEADER(config.h, config_h=yes, [ + echo "config.h file not found!" ]) - if test "x$own_config_h" = xyes ; then - OWN_CONFIG_H=yes + if test "x$config_h" = xno ; then + AC_MSG_WARN(config.h file not found) + dnl There is no consequence for SALOME building because + dnl this file is not used. SALOME uses SALOMEconfig.h instead! + else + AC_MSG_RESULT(config.h file ok) fi AC_CHECK_HEADER(Standard_Type.hxx,occ_ok=yes ,occ_ok=no) fi -AC_SUBST(OWN_CONFIG_H) - if test "x$occ_ok" = xyes ; then AC_MSG_CHECKING(for OpenCascade libraries) diff --git a/salome_adm/unix/config_files/check_cppunit.m4 b/salome_adm/unix/config_files/check_cppunit.m4 index 10c91812d..9de130c26 100644 --- a/salome_adm/unix/config_files/check_cppunit.m4 +++ b/salome_adm/unix/config_files/check_cppunit.m4 @@ -8,18 +8,18 @@ cppunit_ok=yes dnl were is cppunit ? AC_ARG_WITH(cppunit, - [ --with-cppunit=DIR directory path to CPPUNIT installation ], + [AC_HELP_STRING([--with-cppunit=DIR],[directory path to CPPUNIT installation])], [CPPUNITHOME="$withval" AC_MSG_RESULT("select $withval as path to CPPUNIT") ]) AC_ARG_WITH(cppunit_inc, - [ --with-cppunit_inc=DIR directory path to CPPUNIT includes ], + [AC_HELP_STRING([--with-cppunit_inc=DIR],[directory path to CPPUNIT includes])], [CPPUNIT_INCLUDES="$withval" AC_MSG_RESULT("select $withval as path to CPPUNIT includes") ]) -if test -z $CPPUNITHOME; then +if test -z "$CPPUNITHOME"; then AC_MSG_RESULT(CPPUNITHOME not defined) exits_ok=no if test "x$exits_ok" = "xno"; then @@ -43,12 +43,12 @@ if test -z $CPPUNITHOME; then done fi if test "x$exits_ok" = "xyes"; then - if test -z $CPPUNIT_INCLUDES; then + if test -z "$CPPUNIT_INCLUDES"; then CPPUNIT_INCLUDES=$CPPUNITHOME"/include" fi fi else - if test -z $CPPUNIT_INCLUDES; then + if test -z "$CPPUNIT_INCLUDES"; then CPPUNIT_INCLUDES="$CPPUNITHOME/include" fi fi @@ -96,13 +96,13 @@ else AC_SUBST(CPPUNIT_INCLUDES) AC_SUBST(CPPUNIT_LIBS) AC_SUBST(cppunit_ok) - AC_MSG_RESULT(yes) fi - fi +AM_CONDITIONAL(CPPUNIT_IS_OK, [test x"$cppunit_ok" = xyes]) + AC_LANG_RESTORE ])dnl -dnl \ No newline at end of file +dnl diff --git a/salome_adm/unix/config_files/check_hdf5.m4 b/salome_adm/unix/config_files/check_hdf5.m4 index b20db13ac..4d200e8f3 100644 --- a/salome_adm/unix/config_files/check_hdf5.m4 +++ b/salome_adm/unix/config_files/check_hdf5.m4 @@ -25,7 +25,7 @@ AC_REQUIRE([AC_PROG_CPP])dnl AC_CHECKING(for HDF5) AC_ARG_WITH(hdf5, - [ --with-hdf5=DIR root directory path to hdf5 installation ], + [AC_HELP_STRING([--with-hdf5=DIR],[root directory path to hdf5 installation])], [HDF5HOME="$withval" AC_MSG_RESULT("select $withval as path to hdf5") ]) diff --git a/salome_adm/unix/config_files/check_htmlgen.m4 b/salome_adm/unix/config_files/check_htmlgen.m4 index 85c8dca84..d8bcb0cdc 100644 --- a/salome_adm/unix/config_files/check_htmlgen.m4 +++ b/salome_adm/unix/config_files/check_htmlgen.m4 @@ -41,5 +41,18 @@ if test "x$PDFLATEX" = "x" ; then fi AC_SUBST(PDFLATEX) +rst2html_ok=yes +dnl were is rst2html ? +AC_PATH_PROG(RST2HTML,rst2html) +if test "x$RST2HTML" = "x"; then + AC_PATH_PROG(RST2HTML,rst2html.py) +fi + +if test "x$RST2HTML" = "x"; then + AC_MSG_WARN(rst2html not found) + rst2html_ok=no +fi +AC_SUBST(RST2HTML) + ])dnl dnl diff --git a/salome_adm/unix/config_files/check_lam.m4 b/salome_adm/unix/config_files/check_lam.m4 index 4a9941e2c..e2d03b7e0 100644 --- a/salome_adm/unix/config_files/check_lam.m4 +++ b/salome_adm/unix/config_files/check_lam.m4 @@ -25,13 +25,14 @@ AC_DEFUN([CHECK_LAM],[ AC_REQUIRE([AC_PROG_CC])dnl AC_ARG_WITH(lam, - --with-lam=DIR root directory path of LAM installation, - WITHLAM="yes",WITHLAM="no") + [AC_HELP_STRING([--with-lam=DIR],[root directory path of LAM installation])], + WITHLAM="yes",WITHLAM="no") MPI_INCLUDES="" MPI_LIBS="" if test "$WITHLAM" = yes; then + MPIREQUESTED="yes" echo echo --------------------------------------------- echo testing lam diff --git a/salome_adm/unix/config_files/check_local.m4 b/salome_adm/unix/config_files/check_local.m4 new file mode 100755 index 000000000..67274089f --- /dev/null +++ b/salome_adm/unix/config_files/check_local.m4 @@ -0,0 +1,69 @@ +# 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 index a172d477d..a4faddb3c 100755 --- a/salome_adm/unix/config_files/check_lsf.m4 +++ b/salome_adm/unix/config_files/check_lsf.m4 @@ -72,7 +72,7 @@ AC_DEFUN([CHECK_LSF], fi - dnl AM_CONDITIONAL(WITH_LSF, test $WITH_LSF = 1) + AM_CONDITIONAL(WITH_LSF, test $WITH_LSF = yes) lsf_ok=$WITH_LSF if test $lsf_ok = no ; then diff --git a/salome_adm/unix/config_files/check_mpi.m4 b/salome_adm/unix/config_files/check_mpi.m4 index e8255a2e4..57b796b72 100644 --- a/salome_adm/unix/config_files/check_mpi.m4 +++ b/salome_adm/unix/config_files/check_mpi.m4 @@ -25,12 +25,14 @@ AC_DEFUN([CHECK_MPI],[ AC_REQUIRE([AC_PROG_CC])dnl AC_ARG_WITH(mpi, - --with-mpi=DIR root directory path of MPICH installation, - WITHMPI="yes",WITHMPI="no") + [AC_HELP_STRING([--with-mpi=DIR],[root directory path of MPICH installation])], + MPIREQUESTED="yes",MPIREQUESTED="no") MPI_INCLUDES="" MPI_LIBS="" -if test "$WITHMPI" = yes; then +WITHMPI=no +mpi_ok=no +if test x"$MPIREQUESTED" = xyes; then echo echo --------------------------------------------- @@ -96,7 +98,7 @@ dnl fi -if test "$WITHMPI2" = "yes";then +if test x$WITHMPI2 = xyes; then CPPFLAGS="-DHAVE_MPI2 $CPPFLAGS" CORBA_IDLCXXFLAGS="-DHAVE_MPI2 $CORBA_IDLCXXFLAGS" CORBA_IDLPYFLAGS="-DHAVE_MPI2 $CORBA_IDLPYFLAGS" @@ -106,4 +108,5 @@ AC_SUBST(WITHMPI) AC_SUBST(MPI_INCLUDES) AC_SUBST(MPI_LIBS) AC_SUBST(mpi_ok) +AM_CONDITIONAL(MPI_IS_OK, [test x"$mpi_ok" = xyes]) ])dnl diff --git a/salome_adm/unix/config_files/check_mpich.m4 b/salome_adm/unix/config_files/check_mpich.m4 index c5971aa35..732ff94bc 100644 --- a/salome_adm/unix/config_files/check_mpich.m4 +++ b/salome_adm/unix/config_files/check_mpich.m4 @@ -25,13 +25,14 @@ AC_DEFUN([CHECK_MPICH],[ AC_REQUIRE([AC_PROG_CC])dnl AC_ARG_WITH(mpich, - --with-mpich=DIR root directory path of MPICH installation, - WITHMPICH="yes",WITHMPICH="no") + [AC_HELP_STRING([--with-mpich=DIR],[root directory path of MPICH installation])], + WITHMPICH="yes",WITHMPICH="no") MPI_INCLUDES="" MPI_LIBS="" if test "$WITHMPICH" = yes; then + MPIREQUESTED="yes" echo echo --------------------------------------------- echo testing mpich diff --git a/salome_adm/unix/config_files/check_msg2qm.m4 b/salome_adm/unix/config_files/check_msg2qm.m4 deleted file mode 100755 index 8d0c5474f..000000000 --- a/salome_adm/unix/config_files/check_msg2qm.m4 +++ /dev/null @@ -1,57 +0,0 @@ -# Check availability of Qt's msg2qm tool binary distribution -# -# Author : Jerome Roy (CEA, 2003) -# - -AC_DEFUN([CHECK_MSG2QM],[ - -AC_CHECKING(for msg2qm) - -msg2qm_ok=no - -AC_ARG_WITH(msg2qm, - [ --with-msg2qm=DIR root directory path of MSG2QM installation], - MSG2QM_DIR="$withval",MSG2QM_DIR="") - -if test "x$MSG2QM_DIR" == "x" ; then - -# no --with-MSG2QM-dir option used - - if test "x$MSG2QM_ROOT" != "x" ; then - - # MSG2QM_ROOT environment variable defined - MSG2QM_DIR=$MSG2QM_ROOT - - else - - # search MSG2QM binaries in PATH variable - AC_PATH_PROG(TEMP, msg2qm) - if test "x$TEMP" != "x" ; then - MSG2QM_DIR=`dirname $TEMP` - fi - - fi -# -fi - -# look for msg2qm in ${MSG2QM_DIR} directory -if test -f ${MSG2QM_DIR}/msg2qm ; then - msg2qm_ok=yes - MSG2QM="${MSG2QM_DIR}/msg2qm" - AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR}) -else - # if not found, look for msg2qm in ${MSG2QM_DIR}/bin directory - if test -f ${MSG2QM_DIR}/bin/msg2qm ; then - msg2qm_ok=yes - MSG2QM="${MSG2QM_DIR}/bin/msg2qm" - AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR}/bin) - else - AC_MSG_WARN("Cannot find MSG2QM executable") - fi -fi - -AC_SUBST(MSG2QM) -AC_MSG_RESULT(for MSG2QM: $msg2qm_ok) - -])dnl - diff --git a/salome_adm/unix/config_files/check_omniorb.m4 b/salome_adm/unix/config_files/check_omniorb.m4 index 7a6b6fd6d..392a70aa0 100644 --- a/salome_adm/unix/config_files/check_omniorb.m4 +++ b/salome_adm/unix/config_files/check_omniorb.m4 @@ -70,6 +70,12 @@ then ;; esac case $build_os in + osf*) + AC_DEFINE(__osf1__) + __OSVERSION__=5 + AC_DEFINE(__OSVERSION__) + OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__osf1__" + ;; solaris*) AC_DEFINE(__sunos__) __OSVERSION__=5 diff --git a/salome_adm/unix/config_files/check_opengl.m4 b/salome_adm/unix/config_files/check_opengl.m4 index dd43d25a0..bb549fac2 100644 --- a/salome_adm/unix/config_files/check_opengl.m4 +++ b/salome_adm/unix/config_files/check_opengl.m4 @@ -23,12 +23,12 @@ AC_DEFUN([CHECK_OPENGL],[ AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_CPP])dnl AC_ARG_WITH(opengl, - [ --with-opengl=DIR root directory path of OpenGL installation ], - [ - opengl_dir="$withval" - local_opengl=yes - ], [ - dirs="/usr/lib /usr/local/lib /opt/graphics/OpenGL/lib /usr/openwin/lib /usr/X11R6/lib" + [AC_HELP_STRING([--with-opengl=DIR],[root directory path of OpenGL installation])], + [ + opengl_dir="$withval" + local_opengl=yes + ], [ + dirs="/usr/lib /usr/local/lib /opt/graphics/OpenGL/lib /usr/openwin/lib /usr/X11R6/lib" ])dnl AC_CHECKING(for OpenGL) diff --git a/salome_adm/unix/config_files/check_openpbs.m4 b/salome_adm/unix/config_files/check_openpbs.m4 index 014545886..977aa776d 100644 --- a/salome_adm/unix/config_files/check_openpbs.m4 +++ b/salome_adm/unix/config_files/check_openpbs.m4 @@ -61,5 +61,7 @@ AC_DEFUN([CHECK_OPENPBS], fi AC_SUBST(WITHOPENPBS) + AM_CONDITIONAL(WITH_OPENPBS, test $WITHOPENPBS = yes) + ]) diff --git a/salome_adm/unix/config_files/check_pyqt.m4 b/salome_adm/unix/config_files/check_pyqt.m4 deleted file mode 100644 index ee024efaf..000000000 --- a/salome_adm/unix/config_files/check_pyqt.m4 +++ /dev/null @@ -1,307 +0,0 @@ -dnl Copyright (C) 2003 CEA/DEN, EDF R&D - -AC_DEFUN([CHECK_PYQT],[ -AC_REQUIRE([CHECK_PYTHON])dnl -AC_REQUIRE([CHECK_QT])dnl -AC_REQUIRE([CHECK_SIP])dnl - -AC_LANG_SAVE -AC_LANG_CPLUSPLUS - -AC_ARG_WITH(pyqt, - [ --with-pyqt=DIR root directory path to PyQt installation ], - [PYQTDIR="$withval" - AC_MSG_RESULT("select $withval as path to PyQt") - ]) - -AC_ARG_WITH(pyqt_sips, - [ --with-pyqt_sips=DIR a directory path to PyQt sips installation ], - [PYQT_SIPS="$withval" - AC_MSG_RESULT("select $withval as path to PyQt sips") - ]) - - -AC_ARG_WITH(pyuic, - [ --with-pyuic=EXEC pyuic executable ], - [PYUIC="$withval" - AC_MSG_RESULT("select $withval as pyqt executable") - ]) - -AC_CHECKING(for pyqt) - -pyqt_ok=yes - -dnl look for pyuic -pyqt_uic_ok=no -if test "x$PYUIC" != x; then - dnl try withval value - AC_CHECK_FILE($PYUIC,pyqt_uic_ok=yes,pyqt_uic_ok=no) -fi -if test "x$pyqt_uic_ok" == "xno"; then - dnl try ${PYQTDIR} - if test "x${PYQTDIR}" != "x"; then - if test -d ${PYQTDIR} ; then - AC_CHECK_FILE(${PYQTDIR}/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no) - if test "x$pyqt_uic_ok" == "xyes"; then - PYUIC="${PYQTDIR}/pyuic" - fi - fi - fi -fi -if test "x$pyqt_uic_ok" == "xno"; then - dnl try ${SIPDIR} - if test "x${SIPDIR}" != "x"; then - if test -d ${SIPDIR} ; then - AC_CHECK_FILE(${SIPDIR}/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no) - if test "x$pyqt_uic_ok" == "xyes"; then - PYUIC="${SIPDIR}/pyuic" - fi - fi - fi -fi -if test "x$pyqt_uic_ok" == "xno"; then - dnl try ${PYTHONHOME}/bin - if test "x${PYTHONHOME}" != "x"; then - if test -d ${PYTHONHOME}/bin ; then - AC_CHECK_FILE(${PYTHONHOME}/bin/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no) - if test "x$pyqt_uic_ok" == "xyes"; then - PYUIC="${PYTHONHOME}/bin/pyuic" - fi - fi - fi -fi -if test "x$pyqt_uic_ok" == "xno"; then - dnl try /usr/bin - AC_CHECK_FILE(/usr/bin/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no) - if test "x$pyqt_uic_ok" == "xyes"; then - PYUIC="/usr/bin/pyuic" - fi -fi -if test "x$pyqt_uic_ok" == "xno"; then - pyqt_ok=no -fi - -dnl look for PyQt libs -pyqt_lib_ok=no -if test "x${PYQTDIR}" != "x"; then - dnl try {PYQTDIR} - AC_CHECK_FILE(${PYQTDIR}/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then - if test "x${PYQTDIR}" = "x/usr/lib" - then - PYQT_LIBS="-lqtcmodule" - else - PYQT_LIBS="-L${PYQTDIR} -lqtcmodule" - fi - else - AC_CHECK_FILE(${PYQTDIR}/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then - if test "x${PYQTDIR}" = "x/usr/lib" - then - PYQT_LIBS="" - else - PYQT_LIBS="-L${PYQTDIR}" - fi - fi - fi - if test "x$pyqt_lib_ok" == "xno"; then - dnl try {PYQTDIR}/lib - if test -d {PYQTDIR}/lib; then - AC_CHECK_FILE(${PYQTDIR}/lib/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then - PYQT_LIBS="-L${PYQTDIR}/lib -lqtcmodule" - else - AC_CHECK_FILE(${PYQTDIR}/lib/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then - PYQT_LIBS="-L${PYQTDIR}/lib" - fi - fi - fi - fi - if test "x$pyqt_lib_ok" == "xno"; then - dnl try {PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages - if test -d {PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages; then - AC_CHECK_FILE(${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then - PYQT_LIBS="-L${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages -lqtcmodule" - else - AC_CHECK_FILE(${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then - PYQT_LIBS="-L${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages" - fi - fi - fi - fi -fi -if test "x$pyqt_lib_ok" == "xno"; then - dnl try ${SIPDIR} - if test "x${SIPDIR}" != "x"; then - if test -d ${SIPDIR} ; then - AC_CHECK_FILE(${SIPDIR}/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then - if test "x${SIPDIR}" = "x/usr/lib" - then - PYQT_LIBS="-lqtcmodule" - else - PYQT_LIBS="-L${SIPDIR} -lqtcmodule" - fi - else - AC_CHECK_FILE(${SIPDIR}/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then - if test "x${SIPDIR}" = "x/usr/lib" - then - PYQT_LIBS="" - else - PYQT_LIBS="-L${SIPDIR}" - fi - fi - fi - fi - fi -fi -if test "x$pyqt_lib_ok" == "xno"; then - dnl try ${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages - if test "x${PYTHONHOME}" != "x"; then - if test -d ${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages ; then - AC_CHECK_FILE(${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then - PYQT_LIBS="-L${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages -lqtcmodule" - else - AC_CHECK_FILE(${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then - PYQT_LIBS="-L${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages" - fi - fi - fi - fi -fi -if test "x$pyqt_lib_ok" == "xno"; then - dnl try /usr/lib/python${PYTHON_VERSION}/site-packages - AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then - PYQT_LIBS="-L/usr/lib/python${PYTHON_VERSION}/site-packages -lqtcmodule" - else - AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then - PYQT_LIBS="-L/usr/lib/python${PYTHON_VERSION}/site-packages" - fi - fi -fi -if test "x$pyqt_lib_ok" == "xno"; then - pyqt_ok=no -fi - -dnl look for PyQt sips -pyqt_sips_ok=no -dnl try ${PYQT_SIPS} or ${PYQT_SIPS}/qt -if test "x${PYQT_SIPS}" != "x"; then - AC_CHECK_FILE(${PYQT_SIPS}/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) - if test "x$pyqt_sips_ok" == "xno"; then - AC_CHECK_FILE(${PYQT_SIPS}/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) - if test "x$pyqt_sips_ok" == "xyes"; then - PYQT_SIPS="${PYQT_SIPS}/qt" - fi - fi -fi -if test "x$pyqt_sips_ok" == "xno"; then - dnl try ${PYQTDIR}/sip - if test "x${PYQTDIR}" != "x"; then - if test -d ${PYQTDIR}/sip ; then - AC_CHECK_FILE(${PYQTDIR}/sip/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) - if test "x$pyqt_sips_ok" == "xyes"; then - PYQT_SIPS="${PYQTDIR}/sip" - else - AC_CHECK_FILE(${PYQTDIR}/sip/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) - if test "x$pyqt_sips_ok" == "xyes"; then - PYQT_SIPS="${PYQTDIR}/sip/qt" - fi - fi - fi - fi -fi -if test "x$pyqt_sips_ok" == "xno"; then - dnl try ${SIPDIR}/sip - if test "x${SIPDIR}" != "x"; then - if test -d ${SIPDIR}/sip ; then - AC_CHECK_FILE(${SIPDIR}/sip/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) - if test "x$pyqt_sips_ok" == "xyes"; then - PYQT_SIPS="${SIPDIR}/sip" - else - AC_CHECK_FILE(${SIPDIR}/sip/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) - if test "x$pyqt_sips_ok" == "xyes"; then - PYQT_SIPS="${SIPDIR}/sip/qt" - fi - fi - fi - fi -fi -if test "x$pyqt_sips_ok" == "xno"; then - dnl try /usr/share/sip - if test -d /usr/share/sip ; then - AC_CHECK_FILE(/usr/share/sip/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) - if test "x$pyqt_sips_ok" == "xyes"; then - PYQT_SIPS="/usr/share/sip" - else - AC_CHECK_FILE(/usr/share/sip/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) - if test "x$pyqt_sips_ok" == "xyes"; then - PYQT_SIPS="/usr/share/sip/qt" - fi - fi - fi -fi -if test "x$pyqt_sips_ok" == "xno"; then - pyqt_ok=no -else - PYQT_INCLUDES="-I$PYQT_SIPS" - - dnl Additional sip flags required for correct wrappers compilation - AC_MSG_CHECKING(which qt classes should be excluded) - - PYQT_SIPFLAGS="" - - CXXFLAGS_old=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $QT_INCLUDES" - LIBS_old=$LIBS - LIBS="$LIBS $QT_LIBS" - - AC_TRY_COMPILE([#include ], - [new QCDEStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_CDE") - AC_TRY_COMPILE([#include ], - [new QInterlaceStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_INTERLACE") - AC_TRY_COMPILE([#include ], - [new QMotifStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_MOTIF") - AC_TRY_COMPILE([#include ], - [new QMotifPlusStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_MOTIFPLUS") - AC_TRY_COMPILE([#include ], - [new QPlatinumStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_PLATINUM") - AC_TRY_COMPILE([#include ], - [new QSGIStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_SGI") - AC_TRY_COMPILE([#include ], - [new QWindowsStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_WINDOWS") - AC_TRY_COMPILE([#include ], - [new QWindowsXPStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_WINDOWSXP") - - LIBS="$LIBS -lqassistantclient" - AC_TRY_LINK([#include ], - [new QAssistantClient("foo");],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_ASSISTANTCLIENT") - - AC_MSG_RESULT(done) - - CXXFLAGS=$CXXFLAGS_old - LIBS=$LIBS_old -fi - -AC_SUBST(PYQT_INCLUDES) -AC_SUBST(PYQT_LIBS) -AC_SUBST(PYQT_SIPS) -AC_SUBST(PYUIC) -AC_SUBST(PYQT_SIPFLAGS) - -AC_LANG_RESTORE - -AC_MSG_RESULT(for pyqt: $pyqt_ok) - -])dnl -dnl - - diff --git a/salome_adm/unix/config_files/check_qt.m4 b/salome_adm/unix/config_files/check_qt.m4 index ab2869c21..3fe9ad7ea 100644 --- a/salome_adm/unix/config_files/check_qt.m4 +++ b/salome_adm/unix/config_files/check_qt.m4 @@ -160,6 +160,7 @@ AC_SUBST(UIC) AC_SUBST(QT_ROOT) AC_SUBST(QT_INCLUDES) +AC_SUBST(QT_MT_INCLUDES) AC_SUBST(QT_LIBS) AC_SUBST(QT_MT_LIBS) AC_SUBST(QT_VERS) diff --git a/salome_adm/unix/config_files/check_qwt.m4 b/salome_adm/unix/config_files/check_qwt.m4 deleted file mode 100644 index 13bf90914..000000000 --- a/salome_adm/unix/config_files/check_qwt.m4 +++ /dev/null @@ -1,151 +0,0 @@ -dnl Copyright (C) 2003 CEA/DEN, EDF R&D - -AC_DEFUN([CHECK_QWT],[ -AC_REQUIRE([CHECK_QT])dnl - -AC_CHECKING(for qwt) - -qwt_ok=yes - -dnl were is qwt ? - -AC_ARG_WITH(qwt, - [ --with-qwt=DIR directory path to QWT installation ], - [QWTHOME="$withval" - AC_MSG_RESULT("select $withval as path to QWT") - ]) - -AC_ARG_WITH(qwt_inc, - [ --with-qwt_inc=DIR directory path to QWT includes ], - [QWT_INCLUDES="$withval" - AC_MSG_RESULT("select $withval as path to QWT includes") - ]) - -if test -z $QWTHOME; then - AC_MSG_RESULT(QWTHOME not defined) - exits_ok=no - if test "x$exits_ok" = "xno"; then - for d in /usr/local /usr ; do - AC_CHECK_FILE(${d}/lib/libqwt.so,exits_ok=yes,exits_ok=no) - if test "x$exits_ok" = "xyes"; then - QWTHOME=$d - AC_MSG_RESULT(libqwt.so detected in $d/lib) - fi - done - fi - if test "x$exits_ok" = "xno"; then - for d in `echo $LD_LIBRARY_PATH | sed -e "s/:/ /g"` ; do - if test -f $d/libqwt.so ; then - AC_MSG_RESULT(libqwt.so detected in $d) - QWTHOME=$d - QWTHOME=`echo ${QWTHOME} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` - exits_ok=yes - break - fi - done - fi - if test "x$exits_ok" = "xyes"; then - if test -z $QWT_INCLUDES; then - QWT_INCLUDES=$QWTHOME"/include/qwt" - if test ! -f $QWT_INCLUDES/qwt.h ; then - QWT_INCLUDES=$QWTHOME"/include" - fi - if test ! -f $QWT_INCLUDES/qwt.h ; then - QWT_INCLUDES=/usr/lib/qt3/include/qwt - fi - fi - fi -else - if test -z $QWT_INCLUDES; then - QWT_INCLUDES="$QWTHOME/include" - fi -fi - -if test "x$qwt_ok" = xno -o ! -d "$QWTHOME" ; then - AC_MSG_RESULT(no) - AC_MSG_WARN(qwt not found) - qwt_ok=no -else - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - CPPFLAGS_old=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$QWT_INCLUDES" - CPPFLAGS="$CPPFLAGS $QT_INCLUDES" - - AC_CHECK_HEADER(qwt.h,qwt_ok=yes,qwt_ok=no) - - CPPFLAGS=$CPPFLAGS_old - - if test "x$qwt_ok" = xno ; then - AC_MSG_RESULT(no) - AC_MSG_WARN(qwt not found) - else - qwt_ok=yes - fi - -if test "x$qwt_ok" = "xyes" -then - AC_MSG_CHECKING(linking qwt library) - LIBS_old=$LIBS - if test "x$QTDIR" = "x/usr" - then - LIBS="$LIBS -lqt-mt" - else - LIBS="$LIBS -L$QTDIR/lib -lqt-mt" - fi - if test "x$QWTHOME" = "x/usr" - then - LIBS="$LIBS -lqwt" - else - LIBS="$LIBS -L$QWTHOME/lib -lqwt" - fi - - CXXFLAGS_old=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $QT_INCLUDES -I$QWT_INCLUDES" - - AC_CACHE_VAL(salome_cv_lib_qwt,[ - AC_TRY_LINK( -#include -#include -, int n; - char **s; - QApplication a(n, s); - QwtPlot* p; - a.setMainWidget(p); - a.exec();, - eval "salome_cv_lib_qwt=yes",eval "salome_cv_lib_qwt=no") - ]) - qwt_ok="$salome_cv_lib_qwt" - - if test "x$qwt_ok" = "xno" - then - AC_MSG_RESULT(unable to link with qwt library) - AC_MSG_RESULT(QWTHOME environment variable may be wrong) - else - QWT_INCLUDES="-I$QWT_INCLUDES" - if test "x$QWTHOME" = "x/usr" - then - QWT_LIBS=" -lqwt" - else - QWT_LIBS="-L$QWTHOME/lib -lqwt" - fi - - AC_SUBST(QWT_INCLUDES) - AC_SUBST(QWT_LIBS) - - AC_MSG_RESULT(yes) - fi - - LIBS=$LIBS_old - CXXFLAGS=$CXXFLAGS_old - -fi - - - AC_LANG_RESTORE - -fi - - -])dnl -dnl diff --git a/salome_adm/unix/config_files/check_sip.m4 b/salome_adm/unix/config_files/check_sip.m4 deleted file mode 100644 index 245f2382e..000000000 --- a/salome_adm/unix/config_files/check_sip.m4 +++ /dev/null @@ -1,168 +0,0 @@ -dnl Copyright (C) 2003 CEA/DEN, EDF R&D - -AC_DEFUN([CHECK_SIP],[ -AC_REQUIRE([CHECK_PYTHON])dnl -AC_REQUIRE([CHECK_QT])dnl - -sip_ok=yes - -AC_ARG_WITH(sip, - [ --with-sip=EXEC sip executable ], - [SIP="$withval" - AC_MSG_RESULT("select $withval as sip executable") - ], [ - AC_PATH_PROG(SIP, sip) - ]) - -if test "x$SIP" = "x" ; then - sip_ok=no - AC_MSG_RESULT(sip not in PATH variable) -else - version=`$SIP -V` - AC_MSG_RESULT(sip version is $version) - case "$version" in - 3.2*) - SIP_VERS=v3_old ;; - 3.3*) - SIP_VERS=v3_old ;; - 3.4*) - SIP_VERS=v3_old ;; - 3.5*) - SIP_VERS=v3_old ;; - 3.6*) - SIP_VERS=v3_old ;; - 3.7*) - SIP_VERS=v3_old ;; - 3.8*) - SIP_VERS=v3_old ;; - 3.9*) - SIP_VERS=v3_old ;; - 3.10*) - SIP_VERS=v3_new ;; - 4.1*) - SIP_VERS=v4_old ;; - 4.2*) - SIP_VERS=v4_new ;; - *) - AC_MSG_RESULT(sip version $version not supported) - SIP_VERS=unsupported ;; - esac - - sip_ok=no - dnl Search sip.h file - if test "x$SIPDIR" != "x" ; then - dnl look for sip.h in ${SIPDIR} - AC_CHECK_FILE(${SIPDIR}/sip.h,sip_ok=yes,sip_ok=no) - if test "x$sip_ok" == "xyes" ; then - SIP_INCLUDES="-I${SIPDIR}" - fi - if test "x$sip_ok" == "xno" ; then - dnl look for sip.h in ${SIPDIR}/include/python${PYTHON_VERSION} - if test -d ${SIPDIR}/include/python${PYTHON_VERSION} ; then - AC_CHECK_FILE(${SIPDIR}/include/python${PYTHON_VERSION}/sip.h,sip_ok=yes,sip_ok=no) - if test "x$sip_ok" == "xyes" ; then - SIP_INCLUDES="-I${SIPDIR}/include/python${PYTHON_VERSION}" - fi - fi - fi - fi - if test "x$sip_ok" == "xno" ; then - dnl look for sip.h in ${PYTHON_PREFIX}/include/python${PYTHON_VERSION} - if test -d ${PYTHON_PREFIX}/include/python${PYTHON_VERSION} ; then - AC_CHECK_FILE(${PYTHON_PREFIX}/include/python${PYTHON_VERSION}/sip.h,sip_ok=yes,sip_ok=no) - if test "x$sip_ok" == "xyes" ; then - SIP_INCLUDES="${PYTHON_INCLUDES}" - fi - fi - fi - if test "x$sip_ok" == "xno" ; then - dnl look for sip.h in /usr/include/python${PYTHON_VERSION} - if test -d /usr/include/python${PYTHON_VERSION} ; then - AC_CHECK_FILE(/usr/include/python${PYTHON_VERSION}/sip.h,sip_ok=yes,sip_ok=no) - if test "x$sip_ok" == "xyes" ; then - SIP_INCLUDES="/usr/include/python${PYTHON_VERSION}" - fi - fi - fi - - dnl Search (lib)sip.so file - sip_lib_ok=no - if test "x$SIPDIR" != "x" ; then - dnl look for (lib)sip.so in ${SIPDIR} - AC_CHECK_FILE(${SIPDIR}/libsip.so,sip_lib_ok=yes,sip_lib_ok=no) - if test "x$sip_lib_ok" == "xyes" ; then - if test "x${SIPDIR}" = "x/usr/lib" - then - SIP_LIBS="-lsip" - else - SIP_LIBS="-L${SIPDIR} -lsip" - fi - else - AC_CHECK_FILE(${SIPDIR}/sip.so,sip_lib_ok=yes,sip_lib_ok=no) - if test "x$sip_lib_ok" == "xyes" ; then - if test "x${SIPDIR}" = "x/usr/lib" - then - SIP_LIBS="" - else - SIP_LIBS="-L${SIPDIR}" - fi - fi - fi - - if test "x$sip_lib_ok" == "xno" ; then - dnl look for (lib)sip.so in ${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages - if test -d ${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages ; then - AC_CHECK_FILE(${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no) - if test "x$sip_lib_ok" == "xyes" ; then - SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages -lsip" - else - AC_CHECK_FILE(${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no) - if test "x$sip_lib_ok" == "xyes" ; then - SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages" - fi - fi - fi - fi - fi - if test "x$sip_lib_ok" == "xno" ; then - dnl look for (lib)sip.so in ${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages - if test -d ${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages ; then - AC_CHECK_FILE(${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no) - if test "x$sip_lib_ok" == "xyes" ; then - SIP_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages -lsip" - else - AC_CHECK_FILE(${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no) - if test "x$sip_lib_ok" == "xyes" ; then - SIP_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages" - fi - fi - fi - fi - if test "x$sip_lib_ok" == "xno" ; then - dnl look for (lib)sip.so in /usr/lib/python${PYTHON_VERSION}/site-packages - if test -d /usr/lib/python${PYTHON_VERSION}/site-packages ; then - AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no) - if test "x$sip_lib_ok" == "xyes" ; then - SIP_LIBS="-L$/usr/lib/python${PYTHON_VERSION}/site-packages -lsip" - else - AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no) - if test "x$sip_lib_ok" == "xyes" ; then - SIP_LIBS="-L/usr/lib/python${PYTHON_VERSION}/site-packages" - fi - fi - fi - fi - if test "x$sip_lib_ok" == "xno" ; then - sip_ok=no - fi -fi - -AC_SUBST(SIP) -AC_SUBST(SIP_INCLUDES) -AC_SUBST(SIP_LIBS) -AC_SUBST(SIP_VERS) - -AC_MSG_RESULT(for sip: $sip_ok) - -])dnl -dnl diff --git a/salome_adm/unix/config_files/check_swig.m4 b/salome_adm/unix/config_files/check_swig.m4 index 10408c009..db9d234e9 100644 --- a/salome_adm/unix/config_files/check_swig.m4 +++ b/salome_adm/unix/config_files/check_swig.m4 @@ -26,7 +26,7 @@ AC_REQUIRE([CHECK_PYTHON])dnl swig_ok=yes AC_ARG_WITH(swig, - [ --with-swig=EXEC swig executable ], + [AC_HELP_STRING([--with-swig=EXEC],[swig executable])], [SWIG="$withval" AC_MSG_RESULT("select $withval as swig executable") ], [ diff --git a/salome_adm/unix/config_files/check_vtk.m4 b/salome_adm/unix/config_files/check_vtk.m4 deleted file mode 100644 index df9245b5d..000000000 --- a/salome_adm/unix/config_files/check_vtk.m4 +++ /dev/null @@ -1,148 +0,0 @@ -dnl Copyright (C) 2003 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -dnl -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_CHECKING(for VTK) - -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 - -AC_PATH_X - -if test "x$OpenGL_ok" != "xyes" -then - AC_MSG_WARN(vtk needs OpenGL correct configuration, check configure output) -fi - -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" -then - LXLIB="" -fi - -if test "x$x_libraries" = "x/usr/lib" -then - LXLIB="" -fi - -LOCAL_INCLUDES="$OGL_INCLUDES" -LOCAL_LIBS="-lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid $OGL_LIBS $LXLIB -lX11 -lXt" -TRY_LINK_LIBS="-lvtkCommon $OGL_LIBS $LXLIB -lX11 -lXt" - -if test -z $VTKHOME -then - AC_MSG_WARN(undefined VTKHOME variable which specify where vtk was compiled) - if test -f /usr/include/vtk/vtkPlane.h ; then - AC_MSG_RESULT(trying /usr) - VTKHOME="/usr" - fi -fi - -if test ! -z $VTKHOME -then - LOCAL_INCLUDES="-I$VTKHOME/include/vtk $LOCAL_INCLUDES" - LOCAL_LIBS="-L$VTKHOME/lib/vtk $LOCAL_LIBS" - TRY_LINK_LIBS="-L$VTKHOME/lib/vtk $TRY_LINK_LIBS" -fi - -dnl vtk headers -CPPFLAGS_old="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $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 VTK library) - - LIBS_old="$LIBS" -# LIBS="$LIBS $TRY_LINK_LIBS" - LIBS="$LIBS $LOCAL_LIBS" - CPPFLAGS_old="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $VTK_INCLUDES" - - dnl VTKPY_MODULES="$VTKHOME/python" - - AC_CACHE_VAL(salome_cv_lib_vtk,[ - AC_TRY_LINK( -#include "vtkPlane.h" -, vtkPlane *p = vtkPlane::New();, - eval "salome_cv_lib_vtk=yes",eval "salome_cv_lib_vtk=no") - ]) - vtk_ok="$salome_cv_lib_vtk" - LIBS="$LIBS_old" - CPPFLAGS="$CPPFLAGS_old" - -fi - -if test "x$vtk_ok" = "xno" -then - AC_MSG_RESULT("no") - AC_MSG_WARN(unable to link with vtk library) -else - AC_MSG_RESULT("yes") - VTK_LIBS="$LOCAL_LIBS" - VTK_MT_LIBS="$LOCAL_LIBS" -fi - -AC_MSG_RESULT("for vtk: $vtk_ok") - -AC_LANG_RESTORE - -# Save cache -AC_CACHE_SAVE - -])dnl - - diff --git a/salome_adm/unix/config_files/enable_pthreads.m4 b/salome_adm/unix/config_files/enable_pthreads.m4 index 45652fbb5..37f878bc6 100644 --- a/salome_adm/unix/config_files/enable_pthreads.m4 +++ b/salome_adm/unix/config_files/enable_pthreads.m4 @@ -25,17 +25,22 @@ dnl modify CFLAGS, CXXFLAGS and LIBS for compiling pthread-based programs. dnl dnl@author (C) Ruslan Shevchenko , 1998, 2000 dnl@id $Id$ +dnl Modified to use acx_pthread.m4 from GNU Autoconf Macro Archive dnl -dnl + AC_DEFUN([ENABLE_PTHREADS],[ -AC_REQUIRE([CHECK_PTHREADS]) +AC_REQUIRE([ACX_PTHREAD]) -if test -z "$enable_pthreads_done" -then - CFLAGS="$CFLAGS $CFLAGS_PTHREADS" - CXXFLAGS="$CXXFLAGS $CXXFLAGS_PTHREADS" - LIBS="$LIBS $LIBS_PTHREADS" +if test x"$enable_pthreads_done" != xyes; then + if test x"$acx_pthread_ok" = xyes; then + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" + LIBS="$LIBS $PTHREAD_LIBS" + threads_ok=yes + else + threads_ok=no + fi + enable_pthreads_done=yes fi -enable_pthreads_done=yes ])dnl dnl diff --git a/salome_adm/unix/config_files/python.m4 b/salome_adm/unix/config_files/python.m4 index a8013e290..240f6ec0d 100644 --- a/salome_adm/unix/config_files/python.m4 +++ b/salome_adm/unix/config_files/python.m4 @@ -37,7 +37,7 @@ dnl a `module'. AC_DEFUN([CHECK_PYTHON], [ AC_ARG_WITH(python, - [ --with-python=DIR root directory path of python installation ], + [AC_HELP_STRING([--with-python=DIR],[root directory path of python installation])], [PYTHON="$withval/bin/python" AC_MSG_RESULT("select python distribution in $withval") ], [ @@ -79,20 +79,20 @@ AC_DEFUN([CHECK_PYTHON], AC_SUBST(PYTHON_SITE) AC_ARG_WITH(python-site, -[ --with-python-site=DIR Use DIR for installing platform independent - Python site-packages], + [AC_HELP_STRING([--with-python-site=DIR], + [Use DIR for installing platform independent Python site-packages])], dnl modification : by default, we install python script in salome root tree dnl [PYTHON_SITE="$withval" dnl python_site_given=yes], dnl [PYTHON_SITE=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION/site-packages -dnl python_site_given=no]) +dnl python_site_given=no] -[PYTHON_SITE="$withval" -python_site_given=yes], -[PYTHON_SITE=$prefix"/lib/python"$PYTHON_VERSION/site-packages -python_site_given=no]) + [PYTHON_SITE="$withval" + python_site_given=yes], + [PYTHON_SITE=$prefix"/lib/python"$PYTHON_VERSION/site-packages + python_site_given=no]) AC_SUBST(PYTHON_SITE_PACKAGE) PYTHON_SITE_PACKAGE=$PYTHON_SITE/$PACKAGE @@ -103,14 +103,14 @@ python_site_given=no]) AC_SUBST(PYTHON_SITE_EXEC) AC_ARG_WITH(python-site-exec, -[ --with-python-site-exec=DIR Use DIR for installing platform dependent - Python site-packages], -[PYTHON_SITE_EXEC="$withval"], -[if test "$python_site_given" = yes; then - PYTHON_SITE_EXEC=$PYTHON_SITE -else - PYTHON_SITE_EXEC=$PYTHON_EXEC_PREFIX"/lib/python"$PYTHON_VERSION/site-packages -fi]) + [AC_HELP_STRING([--with-python-site-exec=DIR], + [Use DIR for installing platform dependent Python site-packages])], + [PYTHON_SITE_EXEC="$withval"], + [if test "$python_site_given" = yes; then + PYTHON_SITE_EXEC=$PYTHON_SITE + else + PYTHON_SITE_EXEC=$PYTHON_EXEC_PREFIX"/lib/python"$PYTHON_VERSION/site-packages + fi]) dnl Set up the install directory ifelse($1, classes, diff --git a/salome_adm/unix/envScript.in b/salome_adm/unix/envScript.in deleted file mode 100644 index eaa69845d..000000000 --- a/salome_adm/unix/envScript.in +++ /dev/null @@ -1,22 +0,0 @@ - -DIR=`pwd` -EXEC_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` -cd $EXEC_DIR/.. -SALOME_HOME_DIR=`pwd` -cd $EXEC_DIR - -export SALOME_HOME_DIR -export SALOME_SRC_DIR=@ROOT_SRCDIR@ -export ORB_HOME_DIR=@CORBA_ROOT@ - -export LD_LIBRARY_PATH=${SALOME_HOME_DIR}/lib:${LD_LIBRARY_PATH} - -# echo $SALOME_HOME_DIR = SALOME_HOME_DIR -# echo $SALOME_SRC_DIR = SALOME_SRC_DIR - -PYVTK_PATH=@VTKPY_MODULES@ -export PYTHONPATH=${PYTHONPATH}:${SALOME_HOME_DIR}/idl:${SALOME_HOME_DIR}/bin:${SALOME_HOME_DIR}/lib:${PYVTK_PATH}:${EXEC_DIR} - -MICORC=/dev/null -export MICORC - diff --git a/salome_adm/unix/make_common_starter.am b/salome_adm/unix/make_common_starter.am new file mode 100644 index 000000000..c19d256e7 --- /dev/null +++ b/salome_adm/unix/make_common_starter.am @@ -0,0 +1,30 @@ +# +# ============================================================ +# This file defines the common definitions used in several +# Makefile. This file must be included, if needed, by the file +# Makefile.am. +# ============================================================ +# + +# Standard directory for installation +salomeincludedir = $(includedir)/@PACKAGE@ +libdir = $(prefix)/lib/@PACKAGE@ +bindir = $(prefix)/bin/@PACKAGE@ +salomescriptdir = $(bindir) + +# Directory for installing idl files +salomeidldir = $(prefix)/idl/@PACKAGE@ + +# Directory for installing resource files +salomeresdir = $(prefix)/share/@PACKAGE@/resources + +# Directories for installing admin files +salomeadmdir = $(prefix)/salome_adm +salomeadmuxdir = $(salomeadmdir)/unix +salomem4dir = $(salomeadmdir)/unix/config_files + +# Shared modules installation directory +sharedpkgpythondir =$(pkgpythondir)/shared_modules + +# Documentation directory +docdir = $(datadir)/doc/@PACKAGE@ diff --git a/src/Basics/BasicsGenericDestructor.cxx b/src/Basics/BasicsGenericDestructor.cxx index 91585a2ae..39d190bd8 100644 --- a/src/Basics/BasicsGenericDestructor.cxx +++ b/src/Basics/BasicsGenericDestructor.cxx @@ -37,7 +37,9 @@ using namespace std; void HouseKeeping(); std::list PROTECTED_DELETE::_objList; -pthread_mutex_t PROTECTED_DELETE::_listMutex; +//CCRT +pthread_mutex_t PROTECTED_DELETE::_listMutex = PTHREAD_MUTEX_INITIALIZER ; +//pthread_mutex_t PROTECTED_DELETE::_listMutex ; std::list *GENERIC_DESTRUCTOR::Destructors = 0; static bool atExitSingletonDone = false ; diff --git a/src/Basics/Makefile.in b/src/Basics/Makefile.am similarity index 71% rename from src/Basics/Makefile.in rename to src/Basics/Makefile.am index 612581468..0203ea726 100644 --- a/src/Basics/Makefile.in +++ b/src/Basics/Makefile.am @@ -26,27 +26,13 @@ # Module : SALOME # $Header$ -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -# header files -EXPORT_HEADERS= \ - BasicsGenericDestructor.hxx - -EXPORT_PYSCRIPTS = - -# Libraries targets - -LIB = libSALOMEBasics.la -LIB_SRC = BasicsGenericDestructor.cxx - -LIBS= @LIBS@ -#LDFLAGS+= - - -@CONCLUDE@ +salomeincludedir = $(includedir)/@PACKAGE@ +salomeinclude_HEADERS = BasicsGenericDestructor.hxx + +libdir = $(prefix)/lib/@PACKAGE@ +lib_LTLIBRARIES = libSALOMEBasics.la +libSALOMEBasics_la_SOURCES = \ + BasicsGenericDestructor.cxx \ + BasicsGenericDestructor.hxx +libSALOMEBasics_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libSALOMEBasics_la_CPPFLAGS = @CPPFLAGS@ diff --git a/src/Basics/Test/Makefile.in b/src/Basics/Test/Makefile.am similarity index 68% rename from src/Basics/Test/Makefile.in rename to src/Basics/Test/Makefile.am index c98aadb0c..c8353fd72 100644 --- a/src/Basics/Test/Makefile.in +++ b/src/Basics/Test/Makefile.am @@ -21,41 +21,19 @@ # # # -# File : Makefile.in -# Author : Paul RASCLE (EDF) -# Module : SALOME +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL # $Header$ -top_srcdir=@top_srcdir@ -top_builddir=../../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ +include $(top_srcdir)/salome_adm/unix/make_common_starter.am +# +# =============================================================== +# Files to be installed +# =============================================================== +# # header files -EXPORT_HEADERS= BasicMainTest.hxx - -EXPORT_PYSCRIPTS = - -# Libraries targets - -LIB = -LIB_SRC = - -# Executables targets - -BIN = -BIN_SRC = - -CXXFLAGS += @CPPUNIT_INCLUDES@ -CPPFLAGS += @CPPUNIT_INCLUDES@ - -LIBS= @LIBS@ @CPPUNIT_LIBS@ - -LDFLAGS+= - -LDFLAGSFORBIN+= - -@CONCLUDE@ +salomeinclude_HEADERS = BasicMainTest.hxx +# This include file defines the minimal source file for all test +# program. It provides the common main function. diff --git a/src/Batch/Batch_BatchManager_Local.cxx b/src/Batch/Batch_BatchManager_Local.cxx new file mode 100644 index 000000000..0161ed791 --- /dev/null +++ b/src/Batch/Batch_BatchManager_Local.cxx @@ -0,0 +1,774 @@ +/* + * 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 +#include +#include +#include +#include +#include +#include +#include "Batch_IOMutex.hxx" +#include "Batch_BatchManager_Local.hxx" + +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(), _thread_id_id_association() + { + 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 = 0; + + // 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); + 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); + + 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); + 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 ); + } + 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) + { + // 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 = new char [PATH_MAX]; + getcwd(cwd, PATH_MAX); + 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); + } + + } + } + + + + + + // 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(); + } + + + + + // 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); + + return NULL; + } + + + + + void BatchManager_Local::ThreadAdapter::pere(pid_t child) + { + 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); + + } + + + } + + + + + void BatchManager_Local::ThreadAdapter::fils() + { + 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); + + } + + + + + void BatchManager_Local::kill_child_on_exit(void * p_pid) + { + 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. + + } + + 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 new file mode 100644 index 000000000..e635fa59a --- /dev/null +++ b/src/Batch/Batch_BatchManager_Local.hxx @@ -0,0 +1,146 @@ +/* + * 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 +#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 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; + 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; + map _threads; + + // Methode abstraite qui renvoie la commande de copie du fichier source en destination + virtual string copy_command(const string & host_source, const string & source, const string & host_destination, const string & destination) const = 0; + + // Methode abstraite qui renvoie la commande a executer + virtual string exec_command(Parametre & param) const = 0; + + // Methode abstraite qui renvoie la commande d'effacement du fichier + virtual string remove_command(const string & host_destination, const 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; + map _thread_id_id_association; + +#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 new file mode 100644 index 000000000..f376cf060 --- /dev/null +++ b/src/Batch/Batch_BatchManager_Local_RSH.cxx @@ -0,0 +1,126 @@ +/* + * 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 +#include +#include +#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 + +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 new file mode 100644 index 000000000..1ea4fc269 --- /dev/null +++ b/src/Batch/Batch_BatchManager_Local_RSH.hxx @@ -0,0 +1,56 @@ +/* + * 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 +#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 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 string copy_command(const string & host_source, const string & source, const string & host_destination, const string & destination) const; + + // Methode abstraite qui renvoie la commande a executer + virtual string exec_command(Parametre & param) const; + + // Methode qui renvoie la commande d'effacement du fichier + virtual string remove_command(const string & host_destination, const string & destination) const; + + }; + +} + +#endif diff --git a/src/Batch/Batch_BatchManager_Local_SH.cxx b/src/Batch/Batch_BatchManager_Local_SH.cxx new file mode 100644 index 000000000..e10e7271a --- /dev/null +++ b/src/Batch/Batch_BatchManager_Local_SH.cxx @@ -0,0 +1,93 @@ +/* + * 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 +#include +#include +#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 + +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 new file mode 100644 index 000000000..b72a0873e --- /dev/null +++ b/src/Batch/Batch_BatchManager_Local_SH.hxx @@ -0,0 +1,56 @@ +/* + * 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 +#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 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 string copy_command(const string & host_source, const string & source, const string & host_destination, const string & destination) const; + + // Methode qui renvoie la commande a executer + virtual string exec_command(Parametre & param) const; + + // Methode qui renvoie la commande d'effacement du fichier + virtual string remove_command(const string & host_destination, const string & destination) const; + + }; + +} + +#endif diff --git a/src/Batch/Batch_BatchManager_Local_SSH.cxx b/src/Batch/Batch_BatchManager_Local_SSH.cxx new file mode 100644 index 000000000..d74b4e1f5 --- /dev/null +++ b/src/Batch/Batch_BatchManager_Local_SSH.cxx @@ -0,0 +1,126 @@ +/* + * 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 +#include +#include +#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 + +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 new file mode 100644 index 000000000..4d6c2eed9 --- /dev/null +++ b/src/Batch/Batch_BatchManager_Local_SSH.hxx @@ -0,0 +1,56 @@ +/* + * 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 +#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 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 string copy_command(const string & host_source, const string & source, const string & host_destination, const string & destination) const; + + // Methode abstraite qui renvoie la commande a executer + virtual string exec_command(Parametre & param) const; + + // Methode qui renvoie la commande d'effacement du fichier + virtual string remove_command(const string & host_destination, const string & destination) const; + + }; + +} + +#endif diff --git a/src/Batch/Batch_FactBatchManager_Local.cxx b/src/Batch/Batch_FactBatchManager_Local.cxx new file mode 100644 index 000000000..91eb63ef8 --- /dev/null +++ b/src/Batch/Batch_FactBatchManager_Local.cxx @@ -0,0 +1,39 @@ +/* + * 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 new file mode 100644 index 000000000..a74f63332 --- /dev/null +++ b/src/Batch/Batch_FactBatchManager_Local.hxx @@ -0,0 +1,39 @@ +/* + * FactBatchManager_Local.hxx : + * + * Auteur : Ivan DUTKA-MALEN - EDF R&D + * Date : Septembre 2004 + * Projet : SALOME 2 + * + */ + +#ifndef _FACTBATCHMANAGER_LOCAL_H_ +#define _FACTBATCHMANAGER_LOCAL_H_ + +using namespace std; +#include +#include +#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 new file mode 100644 index 000000000..176e5f13d --- /dev/null +++ b/src/Batch/Batch_FactBatchManager_Local_RSH.cxx @@ -0,0 +1,39 @@ +/* + * 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 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 new file mode 100644 index 000000000..29ed41a6b --- /dev/null +++ b/src/Batch/Batch_FactBatchManager_Local_RSH.hxx @@ -0,0 +1,39 @@ +/* + * 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_ + +using namespace std; +#include +#include +#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 new file mode 100644 index 000000000..185716a94 --- /dev/null +++ b/src/Batch/Batch_FactBatchManager_Local_SH.cxx @@ -0,0 +1,39 @@ +/* + * 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 new file mode 100644 index 000000000..1490436d2 --- /dev/null +++ b/src/Batch/Batch_FactBatchManager_Local_SH.hxx @@ -0,0 +1,39 @@ +/* + * 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_ + +using namespace std; +#include +#include +#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 new file mode 100644 index 000000000..60a26af30 --- /dev/null +++ b/src/Batch/Batch_FactBatchManager_Local_SSH.cxx @@ -0,0 +1,39 @@ +/* + * 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 new file mode 100644 index 000000000..645638bcb --- /dev/null +++ b/src/Batch/Batch_FactBatchManager_Local_SSH.hxx @@ -0,0 +1,39 @@ +/* + * 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_ + +using namespace std; +#include +#include +#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_IOMutex.cxx b/src/Batch/Batch_IOMutex.cxx new file mode 100644 index 000000000..b56a421fa --- /dev/null +++ b/src/Batch/Batch_IOMutex.cxx @@ -0,0 +1,17 @@ +/* + * 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 new file mode 100644 index 000000000..77b40f85e --- /dev/null +++ b/src/Batch/Batch_IOMutex.hxx @@ -0,0 +1,26 @@ +/* + * 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_Job.cxx b/src/Batch/Batch_Job.cxx index 53a57b26c..e49b04952 100644 --- a/src/Batch/Batch_Job.cxx +++ b/src/Batch/Batch_Job.cxx @@ -68,13 +68,13 @@ namespace Batch { } // Accesseur - Parametre Job::getParametre() const + Batch::Parametre Job::getParametre() const { return _param; } // Accesseur - void Job::setParametre(const Parametre & param) + void Job::setParametre(const Batch::Parametre & param) { _param = param; } diff --git a/src/Batch/Batch_JobInfo.cxx b/src/Batch/Batch_JobInfo.cxx index c5ceda997..9909c0fcd 100644 --- a/src/Batch/Batch_JobInfo.cxx +++ b/src/Batch/Batch_JobInfo.cxx @@ -32,7 +32,6 @@ #include //#include "MEDMEM_STRING.hxx" #include "Batch_JobInfo.hxx" -using namespace std; namespace Batch { diff --git a/src/Batch/Batch_JobInfo.hxx b/src/Batch/Batch_JobInfo.hxx index a829802bd..3d54a78c6 100644 --- a/src/Batch/Batch_JobInfo.hxx +++ b/src/Batch/Batch_JobInfo.hxx @@ -30,6 +30,7 @@ #ifndef _JOBINFO_H_ #define _JOBINFO_H_ +using namespace std; #include #include #include "Batch_Parametre.hxx" @@ -45,23 +46,26 @@ namespace Batch { virtual ~JobInfo(); // Constructeur par recopie - JobInfo(const Batch::JobInfo & jinfo) : _param(jinfo._param), _env(jinfo._env) {}; + 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 Batch::JobInfo & ji); + friend ostream & operator <<(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 + string __str__() const; // SWIG : affichage en Python + string __repr__() const { return __str__(); }; // SWIG : affichage en Python protected: - Batch::Parametre _param; // parametres du job - Batch::Environnement _env; // variables d'environnement du job + Parametre _param; // parametres du job + Environnement _env; // variables d'environnement du job + JobInfo(const Parametre & param, const Environnement & env) : _param(param), _env(env) {}; private: diff --git a/src/Batch/Batch_JobInfo_Local.cxx b/src/Batch/Batch_JobInfo_Local.cxx new file mode 100644 index 000000000..1874793a9 --- /dev/null +++ b/src/Batch/Batch_JobInfo_Local.cxx @@ -0,0 +1,33 @@ +/* + * 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 new file mode 100644 index 000000000..05c570db8 --- /dev/null +++ b/src/Batch/Batch_JobInfo_Local.hxx @@ -0,0 +1,39 @@ +/* + * 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_Job_Local.cxx b/src/Batch/Batch_Job_Local.cxx new file mode 100644 index 000000000..1c5c593dd --- /dev/null +++ b/src/Batch/Batch_Job_Local.cxx @@ -0,0 +1,81 @@ +/* + * 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 +#include +#include "Batch_Job_Local.hxx" + +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 new file mode 100644 index 000000000..0115c5cec --- /dev/null +++ b/src/Batch/Batch_Job_Local.hxx @@ -0,0 +1,50 @@ +/* + * 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_Parametre.cxx b/src/Batch/Batch_Parametre.cxx index fbdeac9e1..c460b8aba 100644 --- a/src/Batch/Batch_Parametre.cxx +++ b/src/Batch/Batch_Parametre.cxx @@ -30,7 +30,6 @@ #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 @@ -72,14 +71,15 @@ def_static_MapKey(USEDDISKSIZE); def_static_MapKey(USEDRAMSIZE); def_static_MapKey(USEDWALLTIME); def_static_MapKey(USER); +def_static_MapKey(WORKDIR); 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) + // 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; @@ -192,23 +192,26 @@ namespace Batch { TypeMap[USER].type = STRING; TypeMap[USER].maxelem = 1; + + TypeMap[WORKDIR].type = STRING; + TypeMap[WORKDIR].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 + // 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 + // On controle que la clef est valide if (TypeMap.find(mk) == TypeMap.end()) throw InvalidKeyException(mk.c_str()); - // On recherche la valeur associee... + // 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 + // ... 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); @@ -216,35 +219,36 @@ namespace Batch { return V; } - // Operateur de recherche dans la map - // Cet operateur agit sur les objets CONSTANTS + // 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 + // 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); + // 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 + // Operateur d'affectation Parametre & Parametre::operator =(const Parametre & PM) { - // On ne reaffecte pas l'objet a lui-meme, sinon aie, aie, aie + // On ne reaffecte pas l'objet a lui-meme, sinon aie, aie, aie if (this == &PM) return *this; - // On efface toute la map + // 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 + // 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 + // 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 , @@ -254,26 +258,26 @@ namespace Batch { return *this; } - // Constructeur par recopie + // Constructeur par recopie Parametre::Parametre(const Parametre & PM) { - // inutile car l'objet est vierge : il vient d'etre cree - // On efface toute la map + // inutile car l'objet est vierge : il vient d'etre cree + // On efface toute la map // erase(begin(), end()); - // On recopie la map interne + // 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++) + // 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) - ) ); + make_pair( + (*it).first , + Versatile( (*it).second) + ) ); } // map< string, TypeParam > Parametre::getTypeMap() const diff --git a/src/Batch/Batch_Parametre.hxx b/src/Batch/Batch_Parametre.hxx index f377cc065..8c833416c 100644 --- a/src/Batch/Batch_Parametre.hxx +++ b/src/Batch/Batch_Parametre.hxx @@ -29,6 +29,7 @@ #ifndef _PARAMETRE_H_ #define _PARAMETRE_H_ +using namespace std; #include #include #include "Batch_InvalidKeyException.hxx" @@ -40,70 +41,71 @@ // TODO : remplacer ce mecanisme statique par la lecture // TODO : d'une descrption dans un fichier exterieur (genre XML) -#define def_extern_MapKey(mk) extern const std::string & mk; -#define def_static_MapKey(mk) const std::string Batch::Parametre::mk(#mk); \ - const std::string & mk = Batch::Parametre::mk; +#define def_extern_MapKey(mk) extern const string & mk; +#define def_static_MapKey(mk) const string Batch::Parametre::mk(#mk); \ + const string & mk = Batch::Parametre::mk; namespace Batch { - class Parametre : public std::map< std::string, Versatile > + class Parametre : public map< string, Versatile > { public: // Constructeur standard Parametre(); // Constructeur par recopie - Parametre(const Batch::Parametre & PM); + Parametre::Parametre(const Parametre & PM); // Operateur de recherche dans la map - Versatile & operator [] (const std::string &); - const Versatile & operator [] (const std::string &) const; + Versatile & operator [] (const string &); + const Versatile & operator [] (const string &) const; // Operateur d'affectation - Parametre & operator =(const Batch::Parametre & PM); + 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 string ACCOUNT; + static const string ARGUMENTS; + static const string CHECKPOINT; + static const string CKPTINTERVAL; + static const string CREATIONTIME; + static const string EGROUP; + static const string ELIGIBLETIME; + static const string ENDTIME; + static const string EUSER; + static const string EXECUTABLE; + static const string EXECUTIONHOST; + static const string EXITCODE; + 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 NBPROC; + static const string OUTFILE; + static const string PID; + static const string QUEUE; + static const string QUEUEDTIME; + static const string SERVER; + static const string STARTTIME; + 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; + static const string WORKDIR; protected: - std::map< std::string, TypeParam > TypeMap; // map interne servant a controler le type de la valeur associee a chaque clef + map< string, TypeParam > TypeMap; // map interne servant a controler le type de la valeur associee a chaque clef private: @@ -148,5 +150,6 @@ def_extern_MapKey(USEDDISKSIZE); def_extern_MapKey(USEDRAMSIZE); def_extern_MapKey(USEDWALLTIME); def_extern_MapKey(USER); +def_extern_MapKey(WORKDIR); #endif diff --git a/src/Batch/Makefile.in b/src/Batch/Makefile.am similarity index 55% rename from src/Batch/Makefile.in rename to src/Batch/Makefile.am index 6b83960e3..997083214 100644 --- a/src/Batch/Makefile.in +++ b/src/Batch/Makefile.am @@ -1,3 +1,4 @@ +####################################### library # SALOME Container : implementation of container and engine for Kernel # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, @@ -26,15 +27,10 @@ # Module : SALOME # $Header$ -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl +include $(top_srcdir)/salome_adm/unix/make_common_starter.am - -@COMMENCE@ - -EXPORT_HEADERS = \ +# header files +LIB_INCLUDES = \ Batch_APIInternalFailureException.hxx \ Batch_BatchManager.hxx \ Batch_BatchManagerCatalog.hxx \ @@ -63,13 +59,9 @@ EXPORT_HEADERS = \ Batch_PyVersatile.hxx \ Batch_RunTimeException.hxx \ Batch_StringType.hxx \ - Batch_TypeMismatchException.hxx \ - Batch_Versatile.hxx - + Batch_TypeMismatchException.hxx -# Libraries targets -LIB = libSalomeBatch.la LIB_SRC = \ Batch_APIInternalFailureException.cxx \ Batch_BatchManager.cxx \ @@ -99,45 +91,87 @@ LIB_SRC = \ Batch_PyVersatile.cxx \ Batch_RunTimeException.cxx \ Batch_StringType.cxx \ - Batch_TypeMismatchException.cxx \ - Batch_Versatile.cxx + Batch_TypeMismatchException.cxx + -LIB_SERVER_IDL = +LIB_CPPFLAGS = \ + @PYTHON_INCLUDES@ \ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace +LIB_LIBADD = \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + ../Basics/libSALOMEBasics.la -CPPFLAGS += $(PYTHON_INCLUDES) -CXXFLAGS += $(PYTHON_INCLUDES) -LDFLAGS += -LIBS += -lSALOMELocalTrace +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# 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 + +LIB_CPPFLAGS += -DHAVE_CONFIG_H +endif -# Specialisation pour OpenPBS -ifeq (@WITHOPENPBS@,yes) -EXPORT_HEADERS += \ +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# 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 += \ +LIB_SRC +=\ Batch_BatchManager_PBS.cxx \ Batch_FactBatchManager_PBS.cxx \ Batch_JobInfo_PBS.cxx \ Batch_Job_PBS.cxx -CPPFLAGS += $(OPENPBS_INCLUDES) -CXXFLAGS += $(OPENPBS_INCLUDES) -LDFLAGS += $(OPENPBS_LIBDIR) -LIBS += $(OPENPBS_LIBS) -endif - - +LIB_CPPFLAGS += @OPENPBS_INCLUDES@ +LIB_LIBADD += @OPENPBS_LIBDIR@ @OPENPBS_LIBS@ +endif -# Specialisation pour LSF -ifeq (@WITH_LSF@,yes) -EXPORT_HEADERS += \ +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Special add for lsf batch system +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +if WITH_LSF +LIB_INCLUDES += \ Batch_BatchManager_LSF.hxx \ Batch_FactBatchManager_LSF.hxx \ Batch_JobInfo_LSF.hxx \ @@ -149,11 +183,31 @@ LIB_SRC += \ Batch_JobInfo_LSF.cxx \ Batch_Job_LSF.cxx -CPPFLAGS += $(LSF_INCLUDES) -CXXFLAGS += $(LSF_INCLUDES) -LDFLAGS += $(LSF_LIBDIR) -LIBS += $(LSF_LIBS) +LIB_CPPFLAGS += @LSF_INCLUDES@ +LIB_LIBADD += @LSF_LIBDIR@ @LSF_LIBS@ endif -@CONCLUDE@ + + +salomeinclude_HEADERS = $(LIB_INCLUDES) + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libSalomeBatch.la +libSalomeBatch_la_SOURCES = $(LIB_SRC) +libSalomeBatch_la_CPPFLAGS = \ + @PYTHON_INCLUDES@ \ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(top_builddir)/salome_adm/unix \ + $(LIB_CPPFLAGS) + +libSalomeBatch_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libSalomeBatch_la_LIBADD = \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + ../Basics/libSALOMEBasics.la \ + $(LIB_LIBADD) diff --git a/src/Batch_SWIG/Makefile.am b/src/Batch_SWIG/Makefile.am new file mode 100644 index 000000000..ab62e74e7 --- /dev/null +++ b/src/Batch_SWIG/Makefile.am @@ -0,0 +1,86 @@ +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# 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 + +SWIG_FLAGS = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/../Batch +SWIG_SOURCES = libBatch_Swig.i libBatch_Swig_exception.i libBatch_Swig_typemap.i + +pkgpython_PYTHON = libBatch_Swig.py +pkgpyexec_LTLIBRARIES = _libBatch_Swig.la +_libBatch_Swig_la_SOURCES = $(BUILT_SOURCES) $(SWIG_SOURCES) +_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 : $(SWIG_SOURCES) + $(SWIG) $(SWIG_FLAGS) -o $@ $< + +CLEANFILES = swig_wrap.cpp + + +# +# =============================================================== +# 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 pkgpython_PYTHON. diff --git a/src/CASCatch/CASCatch.hxx b/src/CASCatch/CASCatch.hxx new file mode 100644 index 000000000..a5af66a55 --- /dev/null +++ b/src/CASCatch/CASCatch.hxx @@ -0,0 +1,55 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// + +#ifndef _CASCatch_HeaderFile +#define _CASCatch_HeaderFile + +#include +#include + + +#ifdef try +# undef try +#endif + +#ifdef catch +# undef catch +#endif + +#ifdef NO_CXX_EXCEPTION +# if defined(DO_ABORT) +# define CASCatch_TRY \ + Standard_ErrorHandler _Function; \ + K_SETJMP = 1 ; \ + if(DoesNotAbort(_Function)) +# else //If DO_ABORT is not defined +# define CASCatch_TRY \ + Standard_ErrorHandler _Function; \ + if(DoesNotAbort(_Function)) +# endif //DO_ABORT +# define CASCatch_CATCH(Error) \ + else if(_Function.Catches(STANDARD_TYPE(Error))) +#else +# define CASCatch_TRY try +# define CASCatch_CATCH catch +#endif //NO_CXX_EXCEPTION + + +#endif diff --git a/src/CASCatch/Makefile.am b/src/CASCatch/Makefile.am new file mode 100644 index 000000000..c8c2c673e --- /dev/null +++ b/src/CASCatch/Makefile.am @@ -0,0 +1,9 @@ +# File : Makefile.in +# Author : Sergey RUIN (OCN) +# Module : SALOME + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + + +salomeinclude_HEADERS = CASCatch.hxx + diff --git a/src/CASCatch/Makefile.in b/src/CASCatch/Makefile.in deleted file mode 100644 index f3477a8a5..000000000 --- a/src/CASCatch/Makefile.in +++ /dev/null @@ -1,31 +0,0 @@ -# File : Makefile.in -# Author : Sergey RUIN (OCN) -# Module : SALOME - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_srcdir)/idl - - -@COMMENCE@ - -# header files -EXPORT_HEADERS= CASCatch_Failure.hxx \ - CASCatch_CatchSignals.hxx \ - CASCatch_ErrorHandler.hxx - -# Libraries targets -LIB = libCASCatch.la - -LIB_SRC = CASCatch_Failure.cxx \ - CASCatch_ErrorHandler.cxx \ - CASCatch_CatchSignals.cxx - -CPPFLAGS += $(OCC_INCLUDES) -CXXFLAGS += $(OCC_CXXFLAGS) -LDFLAGS+= $(CAS_KERNEL) $(CAS_MATH) - -@CONCLUDE@ - - diff --git a/src/Communication/Makefile.am b/src/Communication/Makefile.am new file mode 100644 index 000000000..fd20d963a --- /dev/null +++ b/src/Communication/Makefile.am @@ -0,0 +1,78 @@ +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Files to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS = \ + ReceiverFactory.hxx \ + SenderFactory.hxx \ + SALOMEMultiComm.hxx \ + MultiCommException.hxx \ + SALOME_Comm_i.hxx + +# Scripts to be installed + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This local variable defines the list of CPPFLAGS common to all target in this package. +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@ + +# This local variable defines the list of dependant libraries common to all target in this package. +COMMON_LIBS = \ + ../Utils/libOpUtil.la \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la + +# _CS_gbo The need for these flags depends on wether the swig +# interface is generated and if MPI is activated. +OPT_CPPFLAGS = @PYTHON_INCLUDES@ @MPI_INCLUDES@ +OPT_LIBS = @PYTHON_LIBS@ @MPI_LIBS@ +OPT_LDFLAGS = -Xlinker -export-dynamic + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libSalomeCommunication.la +libSalomeCommunication_la_SOURCES =\ + SALOME_Comm_i.cxx \ + SenderFactory.cxx \ + MultiCommException.cxx \ + SALOMEMultiComm.cxx \ + ReceiverFactory.cxx \ + \ + MultiCommException.hxx \ + SALOME_Comm_i.hxx \ + SenderFactory.hxx \ + ReceiverFactory.hxx \ + SALOMEMultiComm.hxx \ + Receivers.hxx \ + Receiver.hxx + +# the following file is needed by an include file (VERY DIRTY!) +EXTRA_DIST = Receivers.cxx + +libSalomeCommunication_la_CPPFLAGS = $(COMMON_CPPFLAGS) $(OPT_CPPFLAGS) +libSalomeCommunication_la_LDFLAGS = -no-undefined -version-info=0:0:0 $(OPT_LDFLAGS) +libSalomeCommunication_la_LIBADD = $(COMMON_LIBS) $(OPT_LIBS) + +# +# =============================================================== +# Executables targets +# =============================================================== +# +# Nothing to build diff --git a/src/Communication/Makefile.in b/src/Communication/Makefile.in deleted file mode 100644 index 15886f867..000000000 --- a/src/Communication/Makefile.in +++ /dev/null @@ -1,36 +0,0 @@ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -EXPORT_PYSCRIPTS = - -EXPORT_HEADERS = \ - ReceiverFactory.hxx \ - SenderFactory.hxx \ - SALOMEMultiComm.hxx \ - MultiCommException.hxx \ - SALOME_Comm_i.hxx - -# Libraries targets - -LIB = libSalomeCommunication.la -LIB_SRC = SALOME_Comm_i.cxx SenderFactory.cxx MultiCommException.cxx SALOMEMultiComm.cxx ReceiverFactory.cxx -LIB_SERVER_IDL = SALOME_Comm.idl SALOME_Exception.idl - -# Executables targets -BIN = -BIN_SRC = -BIN_SERVER_IDL = - -CPPFLAGS+= $(PYTHON_INCLUDES) $(MPI_INCLUDES) - -LDFLAGS+= -lOpUtil -lSALOMELocalTrace - -LIBS += -Xlinker -export-dynamic $(PYTHON_LIBS) $(MPI_LIBS) - -@CONCLUDE@ diff --git a/src/Communication_SWIG/Makefile.am b/src/Communication_SWIG/Makefile.am new file mode 100644 index 000000000..66b72a5a2 --- /dev/null +++ b/src/Communication_SWIG/Makefile.am @@ -0,0 +1,100 @@ +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# 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 +# +# libSALOME_Comm.i -- swig --> swig_wrap.cpp +# libSALOME_Comm.py +# +# Step 2: build the dynamic library from cpp built source files and +# dependant libraries. +# +# swig_wrap.cpp -- gcc --> swig_wrap.o |-- link --> _libSALOME_Comm.la +# + | +# dependant libs | +# +# The file libSALOME_Comm.py will be installed in +# /lib/python/site-package/salome. +# The library will be installed in the common place. +# + +BUILT_SOURCES = swig_wrap.cpp + +SWIG_FLAGS = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/../Communication +SWIG_SOURCES = libSALOME_Comm.i + + +pkgpython_PYTHON = libSALOME_Comm.py +pkgpyexec_LTLIBRARIES = _libSALOME_Comm.la +_libSALOME_Comm_la_SOURCES = $(BUILT_SOURCES) $(SWIG_SOURCES) +_libSALOME_Comm_la_CPPFLAGS =\ + @PYTHON_INCLUDES@ \ + -I$(srcdir) -I$(srcdir)/../Communication \ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../Utils \ + -I$(top_builddir)/salome_adm/unix \ + -I$(top_builddir)/idl \ + @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ + +_libSALOME_Comm_la_LDFLAGS = -module +_libSALOME_Comm_la_LIBADD = \ + ../Communication/libSalomeCommunication.la \ + @PYTHON_LIBS@ + +# _CS_gbo Actually, there's no need to get these flags optional. If +# the check mpi is not ok, the variables will be simply null. +if MPI_IS_OK +_libSALOME_Comm_la_CPPFLAGS+=@MPI_INCLUDES@ +_libSALOME_Comm_la_LIBADD+=@MPI_LIBS@ +endif + + +swig_wrap.cpp : $(SWIG_SOURCES) + $(SWIG) $(SWIG_FLAGS) -o $@ $< + +CLEANFILES = swig_wrap.cpp + + +# +# =============================================================== +# Files to be installed +# =============================================================== +# + +# (see LifeCycleCORBA_SWIG for an example) + +# It's not needed to specify libSALOME_Comm.py. It is +# automaticaly installed through the swig target pkgpython_PYTHON. diff --git a/src/Communication_SWIG/Makefile.in b/src/Communication_SWIG/Makefile.in deleted file mode 100644 index 42f8f3fdd..000000000 --- a/src/Communication_SWIG/Makefile.in +++ /dev/null @@ -1,24 +0,0 @@ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - -@COMMENCE@ - -# header files -EXPORT_HEADERS= libSALOME_Comm.i - -# Libraries targets - -LIB = libSALOME_Commcmodule.la -LIB_SERVER_IDL = SALOME_Exception.idl - -SWIG_DEF = libSALOME_Comm.i -EXPORT_PYSCRIPTS = libSALOME_Comm.py - -CPPFLAGS+=$(PYTHON_INCLUDES) $(MPI_INCLUDES) -I$(top_srcdir)/src/Communication/src -LIBS+= $(PYTHON_LIBS) -LDFLAGS+= -lSalomeCommunication - -@CONCLUDE@ diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index 48b3ac787..0af3362a3 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -27,20 +27,10 @@ // $Header$ //#define private public -#include -#ifndef WNT -#include CORBA_SERVER_HEADER(SALOME_Component) -#else -#include -#endif -#include // must be before Python.h ! -#include -#include "SALOME_Container_i.hxx" -#include "SALOME_Component_i.hxx" -#include "SALOME_NamingService.hxx" -#include "OpUtil.hxx" #include #include +#include +#include #ifndef WNT #include #include @@ -50,9 +40,23 @@ #include int SIGUSR1 = 1000; #endif -#include "Container_init_python.hxx" #include "utilities.h" +#include +#ifndef WNT +#include CORBA_SERVER_HEADER(SALOME_Component) +#else +#include +#endif +#include // must be before Python.h ! +#include "SALOME_Container_i.hxx" +#include "SALOME_Component_i.hxx" +#include "SALOME_NamingService.hxx" +#include "OpUtil.hxx" + +#include +#include "Container_init_python.hxx" + using namespace std; bool _Sleeping = false ; @@ -96,7 +100,7 @@ Engines_Container_i::Engines_Container_i () : //============================================================================= Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, + PortableServer::POA_var poa, char *containerName , int argc , char* argv[], bool activAndRegist, @@ -307,10 +311,12 @@ Engines_Container_i::load_component_Library(const char* componentName) } void* handle; -#ifndef WNT - handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ; -#else +#if defined( WNT ) handle = dlopen( impl_name.c_str() , 0 ) ; +//#elif defined( __osf1__ ) +// handle = dlopen( impl_name.c_str() , RTLD_NOW ) ; +#else + handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ; #endif if ( handle ) { @@ -417,8 +423,11 @@ Engines_Container_i::create_component_instance(const char*genericRegisterName, SCRUTE(iors); Py_RELEASE_NEW_THREAD; - CORBA::Object_var obj = _orb->string_to_object(iors.c_str()); - iobject = Engines::Component::_narrow( obj ) ; + if( iors!="" ) + { + CORBA::Object_var obj = _orb->string_to_object(iors.c_str()); + iobject = Engines::Component::_narrow( obj ) ; + } return iobject._retn(); } diff --git a/src/Container/Container_init_python.cxx b/src/Container/Container_init_python.cxx index 7a4e58527..427d03ec4 100644 --- a/src/Container/Container_init_python.cxx +++ b/src/Container/Container_init_python.cxx @@ -26,9 +26,13 @@ // Module : KERNEL // $Header$ -#include "Container_init_python.hxx" +#include +#include #include "utilities.h" + +#include "Container_init_python.hxx" + using namespace std; PyThreadState *KERNEL_PYTHON::_gtstate = 0; diff --git a/src/Container/Makefile.am b/src/Container/Makefile.am new file mode 100644 index 000000000..df8f5b8f2 --- /dev/null +++ b/src/Container/Makefile.am @@ -0,0 +1,142 @@ +# SALOME Container : implementation of container and engine for Kernel +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL +# $Header$ + + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Header to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS = \ + SALOME_Component_i.hxx \ + SALOME_Container_i.hxx \ + SALOME_ContainerManager.hxx \ + Container_init_python.hxx + +# Scripts to be installed +dist_salomescript_DATA =\ + SALOME_ComponentPy.py \ + SALOME_Container.py + +# These files are executable scripts +dist_salomescript_SCRIPTS=\ + SALOME_ContainerPy.py + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This local variable defines the list of CPPFLAGS common to all target in this package. +COMMON_CPPFLAGS=\ + @PYTHON_INCLUDES@ \ + @MPI_INCLUDES@ \ + @CAS_CPPFLAGS@ @CAS_CXXFLAGS@ \ + @QT_MT_INCLUDES@ \ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../NamingService \ + -I$(srcdir)/../Utils \ + -I$(srcdir)/../Registry \ + -I$(srcdir)/../Notification \ + -I$(srcdir)/../ResourcesManager \ + -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 =\ + ../Registry/libRegistry.la \ + ../Notification/libSalomeNotification.la \ + ../ResourcesManager/libSalomeResourcesManager.la \ + ../NamingService/libSalomeNS.la \ + ../Utils/libOpUtil.la \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + ../Basics/libSALOMEBasics.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la\ + @PYTHON_LIBS@ \ + @MPI_LIBS@ \ + @CORBA_LIBS@ + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libSalomeContainer.la +libSalomeContainer_la_SOURCES=\ + Component_i.cxx \ + Container_i.cxx \ + SALOME_ContainerManager.cxx \ + Container_init_python.cxx + +libSalomeContainer_la_CPPFLAGS =\ + $(COMMON_CPPFLAGS) + +libSalomeContainer_la_LDFLAGS =\ + -no-undefined -version-info=0:0:0 \ + @LDEXPDYNFLAGS@ + +libSalomeContainer_la_LIBADD =\ + $(COMMON_LIBS) + + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = SALOME_Container SALOME_ContainerManagerServer +SALOME_Container_SOURCES =\ + SALOME_Container.cxx \ + SALOME_Container_SignalsHandler.cxx + +SALOME_Container_CPPFLAGS =\ + $(COMMON_CPPFLAGS) + + +SALOME_Container_LDADD =\ + libSalomeContainer.la \ + $(COMMON_LIBS) \ + ../Basics/libSALOMEBasics.la + + +SALOME_ContainerManagerServer_SOURCES =\ + SALOME_ContainerManagerServer.cxx + +SALOME_ContainerManagerServer_CPPFLAGS=\ + $(COMMON_CPPFLAGS) + +SALOME_ContainerManagerServer_LDADD =\ + libSalomeContainer.la \ + $(COMMON_LIBS) \ + ../Basics/libSALOMEBasics.la diff --git a/src/Container/Makefile.in b/src/Container/Makefile.in deleted file mode 100644 index cb00f685f..000000000 --- a/src/Container/Makefile.in +++ /dev/null @@ -1,72 +0,0 @@ -# SALOME Container : implementation of container and engine for Kernel -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE, EDF -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -EXPORT_PYSCRIPTS = SALOME_ComponentPy.py \ - SALOME_ContainerPy.py \ - SALOME_Container.py - -EXPORT_HEADERS = \ - SALOME_Component_i.hxx \ - SALOME_Container_i.hxx \ - SALOME_ContainerManager.hxx \ - Container_init_python.hxx - -# Libraries targets - -LIB = libSalomeContainer.la -LIB_SRC = Component_i.cxx \ - Container_i.cxx \ - SALOME_ContainerManager.cxx \ - Container_init_python.cxx - -LIB_SERVER_IDL = SALOME_Registry.idl SALOME_Component.idl SALOME_ContainerManager.idl SALOME_Exception.idl -LIB_CLIENT_IDL = - -# Executables targets -BIN = SALOME_Container SALOME_ContainerManagerServer -BIN_SRC = SALOME_Container_SignalsHandler.cxx -BIN_SERVER_IDL = SALOME_Component.idl SALOME_ContainerManager.idl - -CPPFLAGS+= $(PYTHON_INCLUDES) $(MPI_INCLUDES) $(OCC_INCLUDES) $(QT_MT_INCLUDES) -CXXFLAGS+=$(OCC_CXXFLAGS) - -LDFLAGS+= $(QT_MT_LIBS) -lSalomeNS -lRegistry -lOpUtil -lSalomeNotification -lSALOMELocalTrace -lSalomeResourcesManager - -LIBS += @LDEXPDYNFLAGS@ $(PYTHON_LIBS) $(MPI_LIBS) - -LDFLAGSFORBIN= $(LDFLAGS) -lSALOMEBasics -LIBSFORBIN= $(LIBS) -@CONCLUDE@ diff --git a/src/Container/SALOME_Container.cxx b/src/Container/SALOME_Container.cxx index a97bb39dc..2639ef800 100644 --- a/src/Container/SALOME_Container.cxx +++ b/src/Container/SALOME_Container.cxx @@ -31,8 +31,12 @@ #endif #include +#include #include #include +#include +#include +#include #ifndef WNT #include @@ -43,7 +47,6 @@ #include "utilities.h" #include "Utils_ORB_INIT.hxx" #include "Utils_SINGLETON.hxx" -#include "SALOMETraceCollector.hxx" #include "OpUtil.hxx" #ifdef CHECKTIME @@ -67,7 +70,7 @@ int main(int argc, char* argv[]) //CORBA::ORB_var orb = CORBA::ORB_init( argc , argv ) ; ORB_INIT &init = *SINGLETON_::Instance() ; ASSERT(SINGLETON_::IsAlreadyExisting()); - CORBA::ORB_var orb = init(0 , 0 ) ; + CORBA::ORB_ptr orb = init(0 , 0 ) ; // LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb); INFOS_COMPILATION; @@ -106,9 +109,9 @@ int main(int argc, char* argv[]) // add new container to the kill list #ifndef WNT - char aCommand[40]; - sprintf(aCommand, "addToKillList.py %d SALOME_Container", getpid()); - system(aCommand); + ostrstream aCommand ; + aCommand << "addToKillList.py " << getpid() << " SALOME_Container" << ends ; + system(aCommand.str()); #endif Engines_Container_i * myContainer @@ -120,10 +123,9 @@ int main(int argc, char* argv[]) Utils_Timer timer; timer.Start(); timer.Stop(); - MESSAGE("SALOME_Registry_Server.cxx - orb->run()"); timer.ShowAbsolute(); #endif - + HandleServerSideSignals(orb); } diff --git a/src/Container/SALOME_ContainerManagerServer.cxx b/src/Container/SALOME_ContainerManagerServer.cxx index 5d3f13102..0faa4f1d3 100644 --- a/src/Container/SALOME_ContainerManagerServer.cxx +++ b/src/Container/SALOME_ContainerManagerServer.cxx @@ -18,7 +18,6 @@ // See http://www.salome-platform.org/ // #include "SALOME_ContainerManager.hxx" -#include "SALOMETraceCollector.hxx" #include "utilities.h" int main(int argc, char* argv[]) @@ -27,7 +26,7 @@ int main(int argc, char* argv[]) PortableServer::POAManager_var pman; CORBA::Object_var obj; - CORBA::ORB_var orb = CORBA::ORB_init( argc , argv ) ; + CORBA::ORB_ptr orb = CORBA::ORB_init( argc , argv ) ; // LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb); INFOS_COMPILATION; BEGIN_OF(argv[0]); diff --git a/src/Container/SALOME_Container_i.hxx b/src/Container/SALOME_Container_i.hxx index be21173b0..b3b6db4f3 100644 --- a/src/Container/SALOME_Container_i.hxx +++ b/src/Container/SALOME_Container_i.hxx @@ -67,7 +67,7 @@ class CONTAINER_EXPORT Engines_Container_i: public: Engines_Container_i(); Engines_Container_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, + PortableServer::POA_var poa, char * containerName , int argc, char* argv[], bool activAndRegist = true, diff --git a/src/DataTypeCatalog/Makefile.am b/src/DataTypeCatalog/Makefile.am new file mode 100644 index 000000000..cdbcb7d53 --- /dev/null +++ b/src/DataTypeCatalog/Makefile.am @@ -0,0 +1,113 @@ +# SALOME DataTypeCatalog : catalog of data types +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : SALOME +# $Header$ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Header to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS = \ + SALOME_DataTypeCatalog_impl.hxx \ + SALOME_DataTypeCatalog_Parser.hxx \ + SALOME_DataTypeCatalog_Handler.hxx + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This local variable defines the list of CPPFLAGS common to all target in this package. +COMMON_CPPFLAGS=\ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../NamingService \ + -I$(srcdir)/../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 =\ + ../NamingService/libSalomeNS.la \ + ../Utils/libOpUtil.la \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + ../Basics/libSALOMEBasics.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la + +# +# =============================================================== +# Libraries targets +# =============================================================== +# + +lib_LTLIBRARIES = libSalomeDataTypeCatalog.la +libSalomeDataTypeCatalog_la_SOURCES=\ + SALOME_DataTypeCatalog_Handler.cxx \ + SALOME_DataTypeCatalog_impl.cxx + +libSalomeDataTypeCatalog_la_CPPFLAGS =\ + $(COMMON_CPPFLAGS) \ + @QT_MT_INCLUDES@ + +libSalomeDataTypeCatalog_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libSalomeDataTypeCatalog_la_LIBADD =\ + $(COMMON_LIBS) \ + @QT_MT_LIBS@ + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = SALOME_DataTypeCatalog_Server SALOME_DataTypeCatalog_Client + +#SALOME_DataTypeCatalog_Server +SALOME_DataTypeCatalog_Server_SOURCES = SALOME_DataTypeCatalog_Server.cxx +SALOME_DataTypeCatalog_Server_CPPFLAGS =\ + $(COMMON_CPPFLAGS) \ + @QT_MT_INCLUDES@ + +SALOME_DataTypeCatalog_Server_LDADD =\ + libSalomeDataTypeCatalog.la \ + $(COMMON_LIBS) \ + @CORBA_LIBS@ + +#SALOME_DataTypeCatalog_Client +SALOME_DataTypeCatalog_Client_SOURCES = SALOME_DataTypeCatalog_Client.cxx +SALOME_DataTypeCatalog_Client_CPPFLAGS =\ + $(COMMON_CPPFLAGS) \ + @QT_MT_INCLUDES@ + +SALOME_DataTypeCatalog_Client_LDADD =\ + libSalomeDataTypeCatalog.la \ + $(COMMON_LIBS) \ + @CORBA_LIBS@ diff --git a/src/DataTypeCatalog/Makefile.in b/src/DataTypeCatalog/Makefile.in deleted file mode 100644 index d0ed574a6..000000000 --- a/src/DataTypeCatalog/Makefile.in +++ /dev/null @@ -1,59 +0,0 @@ -# SALOME DataTypeCatalog : catalog of data types -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE, EDF -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -EXPORT_HEADERS = \ - SALOME_DataTypeCatalog_impl.hxx \ - SALOME_DataTypeCatalog_Parser.hxx \ - SALOME_DataTypeCatalog_Handler.hxx - -# Libraries targets -LIB = libSalomeDataTypeCatalog.la -LIB_SRC = \ - SALOME_DataTypeCatalog_Handler.cxx \ - SALOME_DataTypeCatalog_impl.cxx - -# Executables targets -# trouble we have client and serveur and build don't known about this with rule -# in fact client is a test ! So it may go away BIN ! -BIN = SALOME_DataTypeCatalog_Server SALOME_DataTypeCatalog_Client -BIN_SRC = -BIN_SERVER_IDL = SALOME_DataTypeCatalog.idl SALOME_Exception.idl - -CPPFLAGS+= $(QT_MT_INCLUDES) -CXXFLAGS+= -LDFLAGS+= $(QT_MT_LIBS) $(OGL_LIBS) -lSalomeNS -lOpUtil -lSALOMELocalTrace -LDFLAGSFORBIN+= -lSalomeNS -lOpUtil -lSALOMELocalTrace -lSALOMEBasics -@CONCLUDE@ diff --git a/src/DataTypeCatalog/SALOME_DataTypeCatalog_Server.cxx b/src/DataTypeCatalog/SALOME_DataTypeCatalog_Server.cxx index 72712de82..a78e0f80e 100644 --- a/src/DataTypeCatalog/SALOME_DataTypeCatalog_Server.cxx +++ b/src/DataTypeCatalog/SALOME_DataTypeCatalog_Server.cxx @@ -30,7 +30,6 @@ #include "SALOME_NamingService.hxx" #include "SALOME_DataTypeCatalog_impl.hxx" #include "utilities.h" -#include "SALOMETraceCollector.hxx" #include "Utils_SINGLETON.hxx" using namespace std; @@ -38,7 +37,6 @@ int main(int argc,char **argv) { // initialize the ORB CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv); - // LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb); try { CosNaming::NamingContext_var _rootContext, catalogContext; diff --git a/src/GenericObj/Makefile.am b/src/GenericObj/Makefile.am new file mode 100644 index 000000000..22cba819c --- /dev/null +++ b/src/GenericObj/Makefile.am @@ -0,0 +1,27 @@ +# Copyright (C) 2003 CEA/DEN, EDF R&D +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL +# $Header$ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# header files +salomeinclude_HEADERS =\ + SALOME_GenericObj_i.hh + +# Libraries targets +lib_LTLIBRARIES = libSalomeGenericObj.la +libSalomeGenericObj_la_SOURCES =\ + SALOME_GenericObj_i.cc + +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 = \ + $(top_builddir)/idl/libSalomeIDLKernel.la diff --git a/src/GenericObj/Makefile.in b/src/GenericObj/Makefile.in deleted file mode 100644 index 5839dfaee..000000000 --- a/src/GenericObj/Makefile.in +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (C) 2003 CEA/DEN, EDF R&D -# -# -# -# File : Makefile.in -# Author : Alexey Petrov -# Module : VISU -# $Header: - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -# Libraries targets -LIB = libSalomeGenericObj.la -LIB_SRC = SALOME_GenericObj_i.cc - -LIB_SERVER_IDL = SALOME_GenericObj.idl -LIB_CLIENT_IDL = - -# Executables targets -BIN = -BIN_SRC = - -BIN_CLIENT_IDL = -BIN_SERVER_IDL = - -EXPORT_HEADERS = SALOME_GenericObj_i.hh - -# additionnal information to compil and link file -CPPFLAGS += - -LDFLAGS += - -LIBS += - -# additional file to be cleaned -MOSTLYCLEAN += -CLEAN += -DISTCLEAN += - -@CONCLUDE@ \ No newline at end of file diff --git a/src/HDFPersist/HDFdataset.cc b/src/HDFPersist/HDFdataset.cc index 789f6e1a6..f4e7caf5c 100644 --- a/src/HDFPersist/HDFdataset.cc +++ b/src/HDFPersist/HDFdataset.cc @@ -159,7 +159,7 @@ void HDFdataset::GetDim(hdf_size dim[]) else ndim = _ndim; _dim = new hdf_size[ndim]; - if ((ret == HDFdatasetGetDim(_id,_dim)) < 0) + if ((ret = HDFdatasetGetDim(_id,_dim)) < 0) throw HDFexception("Can't determine the size dimensions of the dataset "); } diff --git a/src/HDFPersist/Makefile.in b/src/HDFPersist/Makefile.am similarity index 76% rename from src/HDFPersist/Makefile.in rename to src/HDFPersist/Makefile.am index b3d95e0c3..372fdd504 100644 --- a/src/HDFPersist/Makefile.in +++ b/src/HDFPersist/Makefile.am @@ -26,15 +26,9 @@ # Module : SALOME # $Header$ -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl +include $(top_srcdir)/salome_adm/unix/make_common_starter.am - -@COMMENCE@ - -EXPORT_HEADERS = \ +salomeinclude_HEADERS = \ HDFattribute.hxx \ HDFcontainerObject.hxx \ HDFdataset.hxx \ @@ -51,9 +45,8 @@ EXPORT_HEADERS = \ HDFascii.hxx # Libraries targets - -LIB = libSalomeHDFPersist.la -LIB_SRC = \ +lib_LTLIBRARIES = libSalomeHDFPersist.la +libSalomeHDFPersist_la_SOURCES =\ HDFfileCreate.c \ HDFfileClose.c \ HDFfileOpen.c \ @@ -94,9 +87,20 @@ LIB_SRC = \ HDFconvert.cc \ HDFascii.cc -#BIN = test9 test8 +libSalomeHDFPersist_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libSalomeHDFPersist_la_CPPFLAGS = @CAS_CPPFLAGS@ @HDF5_INCLUDES@ -DPCLINUX \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../Basics +libSalomeHDFPersist_la_LIBADD = @CAS_KERNEL@ @HDF5_LIBS@ -CPPFLAGS+=$(OCC_INCLUDES) $(HDF5_INCLUDES) -DPCLINUX -LDFLAGS+= $(CAS_KERNEL) $(HDF5_LIBS) -@CONCLUDE@ +EXTRA_DIST = \ + test1.c \ + test2.c \ + test3.cxx \ + test4.cxx \ + test5.cxx \ + test6.cxx \ + test7.cxx \ + test8.cxx \ + test9.cxx diff --git a/src/Batch_SWIG/Makefile.in b/src/KERNEL_PY/Makefile.am old mode 100644 new mode 100755 similarity index 63% rename from src/Batch_SWIG/Makefile.in rename to src/KERNEL_PY/Makefile.am index 89d6c9731..e4ee6443f --- a/src/Batch_SWIG/Makefile.in +++ b/src/KERNEL_PY/Makefile.am @@ -19,31 +19,27 @@ # # # -# File : Makefile.in -# Author : Paul RASCLE, EDF -# Module : SALOME -# $Header$ +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# Scripts to be installed (pkgpython is an automake keyword for python targets) +pkgpython_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 + +sharedpkgpython_PYTHON = kernel_shared_modules.py -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -# Libraries targets - -LIB = libBatch_Swigcmodule.la -LIB_SRC = - -SWIG_DEF = libBatch_Swig.i -EXPORT_PYSCRIPTS = libBatch_Swig.py Batch_test.py - -CPPFLAGS += $(PYTHON_INCLUDES) $(OPENPBS_INCLUDES) - -LDFLAGS += $(OPENPBS_LIBDIR) - -LIBS += $(PYTHON_LIBS) $(OPENPBS_LIBS) -lSalomeBatch - -@CONCLUDE@ diff --git a/src/KERNEL_PY/Makefile.in b/src/KERNEL_PY/Makefile.in deleted file mode 100755 index f5f079c20..000000000 --- a/src/KERNEL_PY/Makefile.in +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Sergey RUIN, OCC -# Module : SALOME - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -EXPORT_PYSCRIPTS = 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 - -EXPORT_SHAREDPYSCRIPTS=kernel_shared_modules.py - -@CONCLUDE@ diff --git a/src/KERNEL_PY/iparameters.py b/src/KERNEL_PY/iparameters.py new file mode 100755 index 000000000..96abfbedc --- /dev/null +++ b/src/KERNEL_PY/iparameters.py @@ -0,0 +1,199 @@ +import salome +import string +import SALOME +import SALOMEDS +import SALOME_Session_idl + +PT_INTEGER = 0 +PT_REAL = 1 +PT_BOOLEAN = 2 +PT_STRING = 3 +PT_REALARRAY = 4 +PT_INTARRAY = 5 +PT_STRARRAY = 6 + +_AP_LISTS_LIST_ = "AP_LISTS_LIST" +_AP_ENTRIES_LIST_ = "AP_ENTRIES_LIST" +_AP_PROPERTIES_LIST_ = "AP_PROPERTIES_LIST" +_AP_DUMP_PYTHON_ = "AP_DUMP_PYTHON" + +vp_session = None + +def getSession(): + global vp_session + if vp_session is None: + vp_session = salome.naming_service.Resolve("/Kernel/Session") + vp_session = vp_session._narrow(SALOME.Session) + pass + return vp_session + +class IParameters: + def __init__(self, attributeParameter): + """Initializes the instance""" + self._ap = attributeParameter + pass + + def append(self, listName, value): + """Appends a value to the named list""" + if self._ap is None: return -1 + v = [] + if self._ap.IsSet(listName, PT_STRARRAY) == 0: + if self._ap.IsSet(_AP_LISTS_LIST_, PT_STRARRAY) == 0: self._ap.SetStrArray(_AP_LISTS_LIST_, v); + if listName != _AP_ENTRIES_LIST_ and listName != _AP_PROPERTIES_LIST_: + self.append(_AP_LISTS_LIST_, listName) + pass + self._ap.SetStrArray(listName, v) + pass + + v = self._ap.GetStrArray(listName) + v.append(value) + self._ap.SetStrArray(listName, v) + return (len(v)-1) + + def nbValues(self, listName): + """Returns a number of values in the named list""" + if self._ap is None: return -1 + if self._ap.IsSet(listName, PT_STRARRAY) == 0: return 0 + v = self._ap.GetStrArray(listName) + return len(v) + + def getValues(self, listName): + """Returns a list of values in the named list""" + v = [] + if self._ap is None: return v + if self._ap.IsSet(listName, PT_STRARRAY) == 0: return v + return self._ap.GetStrArray(listName) + + def getLists(self): + """Returns a list of named lists' names""" + v = [] + if self._ap is None: return v + if self._ap.IsSet(_AP_LISTS_LIST_, PT_STRARRAY) == 0: return v + return self._ap.GetStrArray(_AP_LISTS_LIST_) + + def setParameter(self, entry, parameterName, value): + """Sets a value of the named parameter for the entry""" + if self._ap is None: return + v = [] + if self._ap.IsSet(entry, PT_STRARRAY) ==0: + self.append(_AP_ENTRIES_LIST_, entry) #Add the entry to the internal list of entries + self._ap.SetStrArray(entry, v) + pass + + v = self._ap.GetStrArray(entry) + v.append(parameterName) + v.append(value) + self._ap.SetStrArray(entry, v) + pass + + def getParameter(self, entry, parameterName): + """Returns a value of the named parameter for the entry""" + if self._ap is None: return "" + if self._ap.IsSet(entry, PT_STRARRAY) == 0: return "" + v = self._ap.GetStrArray(entry) + length = len(v); + i = 0 + while i + +#include +#include + #include "utilities.h" +#include + using namespace std; static int Launchers_IsLoaded = 0; diff --git a/src/LifeCycleCORBA/Makefile.am b/src/LifeCycleCORBA/Makefile.am new file mode 100644 index 000000000..2b48a6be2 --- /dev/null +++ b/src/LifeCycleCORBA/Makefile.am @@ -0,0 +1,119 @@ +# SALOME LifeCycleCORBA : implementation of containers and engines life cycle both in Python and C++ +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant +# Module : KERNEL +# $Header$ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Files to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS = \ + SALOME_LifeCycleCORBA.hxx + +# Scripts to be installed +dist_salomescript_DATA =\ + Launchers.py + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This local variable defines the list of CPPFLAGS common to all target in this package. +COMMON_CPPFLAGS=\ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../SALOMETraceCollector \ + -I$(srcdir)/../NamingService \ + -I$(srcdir)/../Utils \ + -I$(srcdir)/../ResourcesManager \ + -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 =\ + ../Container/libSalomeContainer.la \ + ../ResourcesManager/libSalomeResourcesManager.la \ + ../NamingService/libSalomeNS.la \ + ../Utils/libOpUtil.la \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + ../Basics/libSALOMEBasics.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libSalomeLifeCycleCORBA.la +libSalomeLifeCycleCORBA_la_SOURCES = \ + SALOME_LifeCycleCORBA.cxx \ + Launchers.cxx \ + Launchers.hxx +libSalomeLifeCycleCORBA_la_CPPFLAGS = \ + $(COMMON_CPPFLAGS) \ + @PYTHON_INCLUDES@ \ + @QT_MT_INCLUDES@ \ + -I$(srcdir)/../Container \ + -I$(srcdir)/../Notification + +libSalomeLifeCycleCORBA_la_LIBADD = $(COMMON_LIBS) +# _CS_gbo Check whether Python lib or Qt lib is not required here. +# For better understanding, it could be better to specified +# explicitely all libraries even those that are implicitly given +# throught a library mentionned in COMMON_LIBS. + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = Test_LifeCycleCORBA +Test_LifeCycleCORBA_SOURCES = Test_LifeCycleCORBA.cxx +Test_LifeCycleCORBA_CPPFLAGS =\ + -I$(srcdir)/../Registry \ + -I$(srcdir)/../Notification \ + $(COMMON_CPPFLAGS) + +Test_LifeCycleCORBA_LDADD = \ + libSalomeLifeCycleCORBA.la \ + ../Registry/libRegistry.la \ + ../Notification/libSalomeNotification.la \ + ../Container/libSalomeContainer.la \ + $(COMMON_LIBS) \ + @CORBA_LIBS@ + +#CPPFLAGS += $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) + +#LDFLAGS += -lSalomeNS -lOpUtil -lSALOMELocalTrace -lSalomeContainer -lSalomeResourcesManager +#LDFLAGSFORBIN= $(LDFLAGS) -lRegistry -lSalomeNotification -lSALOMEBasics +#LIBS += $(PYTHON_LIBS) diff --git a/src/LifeCycleCORBA/Makefile.in b/src/LifeCycleCORBA/Makefile.in deleted file mode 100644 index d5b514cf4..000000000 --- a/src/LifeCycleCORBA/Makefile.in +++ /dev/null @@ -1,61 +0,0 @@ -# SALOME LifeCycleCORBA : implementation of containers and engines life cycle both in Python and C++ -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE, EDF - Marc Tajchman, CEA -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -EXPORT_HEADERS = SALOME_LifeCycleCORBA.hxx - -EXPORT_PYSCRIPTS = Launchers.py - -# Libraries targets - -LIB = libSalomeLifeCycleCORBA.la -LIB_SRC = SALOME_LifeCycleCORBA.cxx Launchers.cxx -LIB_CLIENT_IDL = SALOME_Component.idl SALOME_TestComponent.idl \ - SALOME_ModuleCatalog.idl SALOME_ContainerManager.idl SALOME_Exception.idl - -# Executables targets -BIN = Test_LifeCycleCORBA -BIN_SRC = -BIN_CLIENT_IDL = SALOME_Component.idl SALOME_TestComponent.idl \ - SALOME_ModuleCatalog.idl SALOME_ContainerManager.idl - -CPPFLAGS += $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) - -LDFLAGS += -lSalomeNS -lOpUtil -lSALOMELocalTrace -lSalomeContainer -lSalomeResourcesManager -LDFLAGSFORBIN= $(LDFLAGS) -lRegistry -lSalomeNotification -lSALOMEBasics -LIBS += $(PYTHON_LIBS) - -@CONCLUDE@ - diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx index 439d10fb5..60e22e909 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx @@ -31,14 +31,15 @@ #include #include +#include +#include + #include "OpUtil.hxx" #include "utilities.h" -#include "Launchers.hxx" #include #include "SALOME_LifeCycleCORBA.hxx" -#include "SALOMETraceCollector.hxx" #ifndef WNT #include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog) #else @@ -47,6 +48,8 @@ #include "SALOME_ContainerManager.hxx" #include "SALOME_Component_i.hxx" #include "SALOME_NamingService.hxx" +#include "Launchers.hxx" + using namespace std; IncompatibleComponent::IncompatibleComponent( void ): diff --git a/src/LifeCycleCORBA/Test/Makefile.am b/src/LifeCycleCORBA/Test/Makefile.am new file mode 100644 index 000000000..c5498d82b --- /dev/null +++ b/src/LifeCycleCORBA/Test/Makefile.am @@ -0,0 +1,103 @@ +####################################### library +# SALOMELocalTrace : log on local machine +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL +# $Header$ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Files to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS= LifeCycleCORBATest.hxx + +# Scripts to be installed +dist_salomescript_SCRIPTS = TestLifeCycleCORBA.py + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This directory defines the subdirectory src in the top source directory. +RPATH=../.. + +# This local variable defines the list of CPPFLAGS common to all target in this package. +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$(srcdir)/$(RPATH)/SALOMETraceCollector/Test \ + -I$(srcdir)/$(RPATH)/NamingService -I$(srcdir)/$(RPATH)/NamingService/Test \ + -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@ + +# This local variable defines the list of dependant libraries common to all target in this package. +COMMON_LIBS =\ + @CPPUNIT_LIBS@ \ + $(RPATH)/Basics/libSALOMEBasics.la \ + $(RPATH)/ResourcesManager/libSalomeResourcesManager.la \ + $(RPATH)/Container/libSalomeContainer.la \ + $(RPATH)/NamingService/libSalomeNS.la \ + $(RPATH)/Registry/libRegistry.la \ + $(RPATH)/Notification/libSalomeNotification.la \ + $(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 + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libLifeCycleCORBATest.la +libLifeCycleCORBATest_la_SOURCES = LifeCycleCORBATest.cxx +libLifeCycleCORBATest_la_CPPFLAGS = $(COMMON_CPPFLAGS) +libLifeCycleCORBATest_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libLifeCycleCORBATest_la_LIBADD = $(COMMON_LIBS) + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = TestLifeCycleCORBA +TestLifeCycleCORBA_SOURCES = TestLifeCycleCORBA.cxx +TestLifeCycleCORBA_CPPFLAGS = $(COMMON_CPPFLAGS) +TestLifeCycleCORBA_LDADD = \ + libLifeCycleCORBATest.la ../libSalomeLifeCycleCORBA.la \ + $(RPATH)/NamingService/Test/libNamingServiceTest.la \ + $(COMMON_LIBS) + diff --git a/src/LifeCycleCORBA/Test/Makefile.in b/src/LifeCycleCORBA/Test/Makefile.in deleted file mode 100644 index cf8d73628..000000000 --- a/src/LifeCycleCORBA/Test/Makefile.in +++ /dev/null @@ -1,71 +0,0 @@ -# SALOMELocalTrace : log on local machine -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE (EDF) -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -# header files -EXPORT_HEADERS= LifeCycleCORBATest.hxx - -EXPORT_PYSCRIPTS = TestLifeCycleCORBA.py - -# Libraries targets - -LIB = libLifeCycleCORBATest.la -LIB_SRC = LifeCycleCORBATest.cxx -LIB_CLIENT_IDL = SALOME_Component.idl SALOME_TestComponent.idl \ - SALOME_Exception.idl nstest.idl - -# Executables targets - -BIN = TestLifeCycleCORBA -BIN_SRC = - -CXXFLAGS += @CPPUNIT_INCLUDES@ -CPPFLAGS += @CPPUNIT_INCLUDES@ - -LIBS= @LIBS@ @CPPUNIT_LIBS@ - -LDFLAGS+= - -LDFLAGSFORBIN+= \ - -lSALOMELocalTraceTest -lSALOMELocalTrace -lSALOMEBasics \ - -lSALOMETraceCollectorTest \ - -lUtilsTest -lOpUtil \ - -lNamingServiceTest -lSalomeNS \ - -lSalomeContainer -lSalomeResourcesManager \ - -lRegistry -lSalomeNotification \ - -lLifeCycleCORBATest -lSalomeLifeCycleCORBA - - -@CONCLUDE@ diff --git a/src/LifeCycleCORBA/Test_LifeCycleCORBA.cxx b/src/LifeCycleCORBA/Test_LifeCycleCORBA.cxx index 050cd194d..d4247492d 100644 --- a/src/LifeCycleCORBA/Test_LifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/Test_LifeCycleCORBA.cxx @@ -41,7 +41,6 @@ #include "SALOME_NamingService.hxx" #include "SALOME_LifeCycleCORBA.hxx" #include "utilities.h" -#include "SALOMETraceCollector.hxx" #include using namespace std; diff --git a/src/LifeCycleCORBA_SWIG/Makefile.am b/src/LifeCycleCORBA_SWIG/Makefile.am new file mode 100644 index 000000000..e81652376 --- /dev/null +++ b/src/LifeCycleCORBA_SWIG/Makefile.am @@ -0,0 +1,94 @@ +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# 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 +# +# libSALOME_LifeCycleCORBA.i -- swig --> swig_wrap.cpp +# libSALOME_LifeCycleCORBA.py +# +# Step 2: build the dynamic library from cpp built source files and +# dependant libraries. +# +# swig_wrap.cpp -- gcc --> swig_wrap.o |-- link --> _libSALOME_LifeCycleCORBA.la +# + | +# dependant libs | +# +# The file libSALOME_LifeCycleCORBA.py will be installed in +# /lib/python/site-package/salome. +# The library will be installed in the same place. +# + +BUILT_SOURCES = swig_wrap.cpp + +SWIG_FLAGS = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/../LifeCycleCORBA +SWIG_SOURCES = libSALOME_LifeCycleCORBA.i + +pkgpython_PYTHON = libSALOME_LifeCycleCORBA.py +pkgpyexec_LTLIBRARIES = _libSALOME_LifeCycleCORBA.la +_libSALOME_LifeCycleCORBA_la_SOURCES = $(BUILT_SOURCES) $(SWIG_SOURCES) +_libSALOME_LifeCycleCORBA_la_CPPFLAGS =\ + @PYTHON_INCLUDES@ \ + -I$(srcdir) -I$(srcdir)/../LifeCycleCORBA \ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../Utils \ + -I$(top_builddir)/salome_adm/unix \ + -I$(top_builddir)/idl \ + @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ + +_libSALOME_LifeCycleCORBA_la_LDFLAGS = -module +_libSALOME_LifeCycleCORBA_la_LIBADD = \ + ../LifeCycleCORBA/libSalomeLifeCycleCORBA.la \ + @PYTHON_LIBS@ + +swig_wrap.cpp : $(SWIG_SOURCES) + $(SWIG) $(SWIG_FLAGS) -o $@ $< + +CLEANFILES = swig_wrap.cpp + + +# +# =============================================================== +# Files to be installed +# =============================================================== +# + +# Scripts to be installed. +dist_salomescript_DATA =\ + LifeCycleCORBA.py \ + TestLifeCycleCORBA.py + +# It's not needed to specify libSALOME_LifeCycleCORBA.py. It is +# automaticaly installed through the swig target pkgpython_PYTHON. diff --git a/src/LifeCycleCORBA_SWIG/Makefile.in b/src/LifeCycleCORBA_SWIG/Makefile.in deleted file mode 100644 index 20b6d6459..000000000 --- a/src/LifeCycleCORBA_SWIG/Makefile.in +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE, EDF -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -# Libraries targets - -LIB = libSALOME_LifeCycleCORBAcmodule.la -LIB_SRC = - -LIB_CLIENT_IDL = SALOME_Component.idl SALOME_ContainerManager.idl SALOME_Exception.idl - -SWIG_DEF = libSALOME_LifeCycleCORBA.i - -EXPORT_PYSCRIPTS = libSALOME_LifeCycleCORBA.py LifeCycleCORBA.py TestLifeCycleCORBA.py - -CPPFLAGS+= $(PYTHON_INCLUDES) - -LIBS+= $(PYTHON_LIBS) -lSalomeLifeCycleCORBA - -LDFLAGS+= -lSalomeLifeCycleCORBA - -@CONCLUDE@ diff --git a/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py b/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py index 147e072d4..a03a556be 100644 --- a/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py +++ b/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py @@ -1,18 +1,65 @@ +#from TestLifeCycleCORBA import * + +import os import Engines import LifeCycleCORBA +host = os.getenv( 'HOST' ) + lcc = LifeCycleCORBA.LifeCycleCORBA() -#obj=lcc.FindOrLoad_Component("FactoryServer","SalomeTestComponent") -#comp=obj._narrow(Engines.TestComponent) -#comp.Coucou(1) +try : + obj=lcc.FindOrLoad_Component("FactoryServer","SalomeTestComponent") + comp=obj._narrow(Engines.TestComponent) + comp.Coucou(1) + param={} + #param['hostname']='cli76cc' + param['hostname']=host + param['container_name']='FactoryServer' + comp=lcc.FindOrLoad_Component(param,'SalomeTestComponent') + engine=lcc.FindComponent(param,'SalomeTestComponent') + engine.Coucou(1) +except : + print 'lcc.FindOrLoad_Component("FactoryServer","SalomeTestComponent") failed' + +import sys +import CORBA +import CosNaming +orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) +obj = orb.resolve_initial_references("NameService") +rootContext = obj._narrow(CosNaming.NamingContext) +context_name=[] +context_name.append(CosNaming.NameComponent( 'ContainerManager' , 'object' ) ) +ContainerManager = rootContext.resolve( context_name ) + +try : + myContainerparamsCPP = Engines.MachineParameters( 'myContainer' , host , 'osf' , 0 , 0 , 0 , 0 , 0 ) + computerlistCPP = [host] + containerCPP = ContainerManager.FindOrStartContainer( myContainerparamsCPP , computerlistCPP ) + containerCPP.ping() + ComponentparamsCPP={} + ComponentparamsCPP['hostname']=host + ComponentparamsCPP['container_name']='myContainer' + compCPP=lcc.FindOrLoad_Component(ComponentparamsCPP,'SalomeTestComponent') + compCPP.Coucou(1) + engineCPP=lcc.FindComponent(ComponentparamsCPP,'SalomeTestComponent') + engineCPP.Coucou(1) +except : + print 'ContainerManager.FindOrStartContainer( myContainerparams , computerlist ) C++ failed' -param={} -param['hostname']='cli76cc' -param['container_name']='myContainer' -smesh=lcc.FindOrLoad_Component(param,'PYHELLO') +try : + myContainerparamsPy = Engines.MachineParameters( 'myContainerPy' , host , 'osf' , 0 , 0 , 0 , 0 , 0 ) + computerlistPy = [host] + containerPy = ContainerManager.FindOrStartContainer( myContainerparamsPy , computerlistPy ) + containerPy.ping() + ComponentparamsPy={} + ComponentparamsPy['hostname']=host + ComponentparamsPy['container_name']='myContainerPy' + compPy=lcc.FindOrLoad_Component(ComponentparamsPy,'SALOME_TestComponentPy') + compPy.Coucou(1) + enginePy=lcc.FindComponent(ComponentparamsPy,'SALOME_TestComponentPy') + enginePy.Coucou(1) +except : + print 'ContainerManager.FindOrStartContainer( myContainerparams , computerlist ) Python failed' -container=lcc.FindContainer('myContainer') -engine=lcc.FindComponent(param,'HELLO') -geom=lcc.LoadComponent(param,'GEOM') diff --git a/src/Logger/Makefile.am b/src/Logger/Makefile.am new file mode 100644 index 000000000..8dc235bcb --- /dev/null +++ b/src/Logger/Makefile.am @@ -0,0 +1,51 @@ +# SALOME Logger : CORBA server managing trace output +# +# Copyright (C) 2003 CEA/DEN, EDF R&D +# +# File : Makefile.am +# Author : Guillaume BOULANT, CSSI +# Module : KERNEL +# $Header$ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# header files +salomeinclude_HEADERS = \ + SALOME_Trace.hxx + +# +# This makefile defines a executable target (SALOME_Logger_Server) and +# a library target (libSalomeLoggerServer.la). The executable depends +# on the library. +# + +# Program files +bin_PROGRAMS = SALOME_Logger_Server +SALOME_Logger_Server_SOURCES = \ + SALOME_Logger_Server_main.cxx \ + SALOME_Logger_Server.hxx + +SALOME_Logger_Server_LDADD = libSalomeLoggerServer.la +SALOME_Logger_Server_CPPFLAGS =\ + -I$(top_builddir)/salome_adm/unix \ + -I$(top_builddir)/idl \ + @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ + +# Libraries targets +lib_LTLIBRARIES = libSalomeLoggerServer.la +libSalomeLoggerServer_la_SOURCES =\ + SALOME_Trace.cxx \ + 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 + +libSalomeLoggerServer_la_LIBADD = \ + $(top_builddir)/idl/libSalomeIDLKernel.la\ + @CORBA_LIBS@ + +# Scripts target +dist_salomescript_DATA = SALOME_Trace.py diff --git a/src/Logger/Makefile.in b/src/Logger/Makefile.in deleted file mode 100644 index f03c9adde..000000000 --- a/src/Logger/Makefile.in +++ /dev/null @@ -1,40 +0,0 @@ -# SALOME Logger : CORBA server managing trace output -# -# Copyright (C) 2003 CEA/DEN, EDF R&D -# -# -# -# File : Makefile.in -# Author : Paul RASCLE, EDF -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -# header files -EXPORT_HEADERS= \ - SALOME_Trace.hxx - -# Libraries targets -LIB = libSalomeLoggerServer.la -LIB_SRC=\ - SALOME_Trace.cxx \ - SALOME_Logger_Server.cxx -LIB_SERVER_IDL = Logger.idl - -EXPORT_PYSCRIPTS = SALOME_Trace.py - -# Executables targets -BIN = SALOME_Logger_Server -BIN_SRC = -BIN_SERVER_IDL = Logger.idl -BIN_CLIENT_IDL = Logger.idl - -@CONCLUDE@ - diff --git a/src/Logger/SALOME_Logger_Server.cxx b/src/Logger/SALOME_Logger_Server.cxx index 4464c835b..507118237 100644 --- a/src/Logger/SALOME_Logger_Server.cxx +++ b/src/Logger/SALOME_Logger_Server.cxx @@ -62,107 +62,3 @@ void Logger::ping() { //cout<<" Logger::ping() pid "<< getpid()< 2) - { - std::cout << "usage: SALOME_Logger_Server [output_file]" << std::endl; - exit(1); - } - try - { - //Initialize the ORB - const long TIMESleep = 250000000; - const int NumberOfTries = 40; - int i; - timespec ts_req = {0, TIMESleep}; - timespec ts_rem = {0, 0}; - CosNaming::NamingContext_var inc; - SALOME_Logger::Logger_var myLoggerRef; - CORBA::Object_var theObj; - Logger* myLogger; - CORBA::Object_var obj; - PortableServer::POA_var poa; - PortableServer::POAManager_var pman; - - CORBA::ORB_var orb = CORBA::ORB_init(argc, argv) ; - - for (i = 1; i <= NumberOfTries; i++) - { -#ifndef WNT - if (i != 1) nanosleep(&ts_req, &ts_rem); -#else - 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"<_this(); - CosNaming::Name name; - name.length(1); - name[0].id = CORBA::string_dup("Logger"); - inc->bind(name,myLoggerRef); - myLogger->_remove_ref(); - pman->activate(); - orb->run() ; - orb->destroy() ; - } - catch(CORBA::COMM_FAILURE& ex) - { - std::cerr << "Caught system exception COMM_FAILURE -- unable to contact the " - << "object." << std::endl; - } - catch(CORBA::SystemException&) - { - std::cerr << "Caught CORBA::SystemException." << std::endl; - } - catch(CORBA::Exception&) - { - std::cerr << "Caught CORBA::Exception." << std::endl; - } - catch(omniORB::fatalException& fe) - { - std::cerr << "Caught omniORB::fatalException:" << std::endl; - std::cerr << " file: " << fe.file() << std::endl; - std::cerr << " line: " << fe.line() << std::endl; - std::cerr << " mesg: " << fe.errmsg() << std::endl; - } - catch(...) - { - std::cerr << "Caught unknown exception." << std::endl; - } - return 0; -} diff --git a/src/Logger/SALOME_Logger_Server_main.cxx b/src/Logger/SALOME_Logger_Server_main.cxx new file mode 100644 index 000000000..c6a5aa6be --- /dev/null +++ b/src/Logger/SALOME_Logger_Server_main.cxx @@ -0,0 +1,121 @@ +// SALOME Logger : CORBA server managing trace output +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : SALOME_Logger_Server.cxx +// Author : Vasily Rusyaev +// Module : SALOME + +#include +#include "SALOME_Logger_Server.hxx" +#include +#include +#ifndef __WIN32__ +# include +#endif + +int main(int argc, char **argv) +{ + if (argc > 2) + { + std::cout << "usage: SALOME_Logger_Server [output_file]" << std::endl; + exit(1); + } + try + { + //Initialize the ORB + const long TIMESleep = 250000000; + const int NumberOfTries = 40; + int i; + timespec ts_req = {0, TIMESleep}; + timespec ts_rem = {0, 0}; + CosNaming::NamingContext_var inc; + SALOME_Logger::Logger_var myLoggerRef; + CORBA::Object_var theObj; + Logger* myLogger; + CORBA::Object_var obj; + PortableServer::POA_var poa; + PortableServer::POAManager_var pman; + + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv) ; + + for (i = 1; i <= NumberOfTries; i++) + { +#ifndef WNT + if (i != 1) nanosleep(&ts_req, &ts_rem); +#else + 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"<_this(); + CosNaming::Name name; + name.length(1); + name[0].id = CORBA::string_dup("Logger"); + inc->bind(name,myLoggerRef); + myLogger->_remove_ref(); + pman->activate(); + orb->run() ; + orb->destroy() ; + } + catch(CORBA::COMM_FAILURE& ex) + { + std::cerr << "Caught system exception COMM_FAILURE -- unable to contact the " + << "object." << std::endl; + } + catch(CORBA::SystemException&) + { + std::cerr << "Caught CORBA::SystemException." << std::endl; + } + catch(CORBA::Exception&) + { + std::cerr << "Caught CORBA::Exception." << std::endl; + } + catch(omniORB::fatalException& fe) + { + std::cerr << "Caught omniORB::fatalException:" << std::endl; + std::cerr << " file: " << fe.file() << std::endl; + std::cerr << " line: " << fe.line() << std::endl; + std::cerr << " mesg: " << fe.errmsg() << std::endl; + } + catch(...) + { + std::cerr << "Caught unknown exception." << std::endl; + } + return 0; +} diff --git a/src/Logger/Test/Makefile.in b/src/Logger/Test/Makefile.am similarity index 67% rename from src/Logger/Test/Makefile.in rename to src/Logger/Test/Makefile.am index 2ff5e398b..1375410c6 100644 --- a/src/Logger/Test/Makefile.in +++ b/src/Logger/Test/Makefile.am @@ -21,41 +21,19 @@ # # # -# File : Makefile.in -# Author : Paul RASCLE (EDF) -# Module : SALOME +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL # $Header$ -top_srcdir=@top_srcdir@ -top_builddir=../../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl +include $(top_srcdir)/salome_adm/unix/make_common_starter.am -@COMMENCE@ - -# header files -EXPORT_HEADERS= - -EXPORT_PYSCRIPTS = TestKiller.py - -# Libraries targets - -LIB = -LIB_SRC = - -# Executables targets - -BIN = -BIN_SRC = - -CXXFLAGS += @CPPUNIT_INCLUDES@ -CPPFLAGS += @CPPUNIT_INCLUDES@ - -LIBS= @LIBS@ @CPPUNIT_LIBS@ - -LDFLAGS+= - -LDFLAGSFORBIN+= +# +# =============================================================== +# Files to be installed +# =============================================================== +# -@CONCLUDE@ +# Executable scripts to be installed +dist_salomescript_SCRIPTS = TestKiller.py diff --git a/src/MPIContainer/MPIContainer_i.cxx b/src/MPIContainer/MPIContainer_i.cxx index dfeb178e1..1acd943e3 100644 --- a/src/MPIContainer/MPIContainer_i.cxx +++ b/src/MPIContainer/MPIContainer_i.cxx @@ -33,6 +33,8 @@ #include "Utils_SINGLETON.hxx" #include "OpUtil.hxx" #include "utilities.h" +#include +#include #include // must be before Python.h ! #include #include "Container_init_python.hxx" diff --git a/src/MPIContainer/Makefile.am b/src/MPIContainer/Makefile.am new file mode 100644 index 000000000..564f7ff6b --- /dev/null +++ b/src/MPIContainer/Makefile.am @@ -0,0 +1,109 @@ +# SALOME MPIContainer : implemenation of container based on MPI libraries +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : SALOME +# $Header$ + + + +# +# =============================================================== +# _CS_gbo Caution !! This package may not work. I didn't test it +# because no mpi soft is installed on my computer. To be checked. +# =============================================================== +# + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Header to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS = \ + MPIObject_i.hxx \ + MPIContainer_i.hxx + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This local variable defines the list of CPPFLAGS common to all target in this package. +# _CS_gbo See wether it can be shared by all packages in a common include!! +COMMON_CPPFLAGS=\ + @PYTHON_INCLUDES@ \ + @MPI_INCLUDES@ \ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../NamingService \ + -I$(srcdir)/../Utils \ + -I$(srcdir)/../Registry \ + -I$(srcdir)/../Notification \ + -I$(srcdir)/../ResourcesManager \ + -I$(srcdir)/../Container \ + -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 =\ + ../Registry/libRegistry.la \ + ../Notification/libSalomeNotification.la \ + ../ResourcesManager/libSalomeResourcesManager.la \ + ../NamingService/libSalomeNS.la \ + ../Utils/libOpUtil.la \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + ../Basics/libSALOMEBasics.la \ + ../Container/libSalomeContainer.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la\ + @CORBA_LIBS@ + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libSalomeMPIContainer.la +libSalomeMPIContainer_la_SOURCES = MPIObject_i.cxx MPIContainer_i.cxx +libSalomeMPIContainer_la_CPPFLAGS = $(COMMON_CPPFLAGS) +libSalomeMPIContainer_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libSalomeMPIContainer_la_LIBADD = $(COMMON_LIBS) + + + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = SALOME_MPIContainer +SALOME_MPIContainer_SOURCES = SALOME_MPIContainer.cxx +SALOME_MPIContainer_LDADD = libSalomeMPIContainer.la @PYTHON_LIBS@ @MPI_LIBS@ +SALOME_MPIContainer_CPPFLAGS = $(COMMON_CPPFLAGS) + + diff --git a/src/MPIContainer/Makefile.in b/src/MPIContainer/Makefile.in deleted file mode 100644 index 808e9a422..000000000 --- a/src/MPIContainer/Makefile.in +++ /dev/null @@ -1,66 +0,0 @@ -# SALOME MPIContainer : implemenation of container based on MPI libraries -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE, EDF -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -EXPORT_PYSCRIPTS = - -EXPORT_HEADERS = \ - MPIObject_i.hxx \ - MPIContainer_i.hxx - -# Libraries targets - -LIB = libSalomeMPIContainer.la -LIB_SRC = MPIObject_i.cxx MPIContainer_i.cxx -LIB_CLIENT_IDL = SALOME_Component.idl -LIB_SERVER_IDL = SALOME_MPIObject.idl SALOME_MPIContainer.idl - -# Executables targets -BIN = SALOME_MPIContainer -BIN_SRC = -BIN_SERVER_IDL = SALOME_MPIObject.idl SALOME_MPIContainer.idl SALOME_Exception.idl - -CPPFLAGS+= $(PYTHON_INCLUDES) -LDFLAGS+= -lSalomeContainer -lSalomeNS -lRegistry -lOpUtil -lSalomeNotification -lSALOMELocalTrace -lSalomeResourcesManager - -ifeq (@WITHMPI@,yes) - LIBS += $(PYTHON_LIBS) $(MPI_LIBS) - CXXFLAGS+=${MPI_INCLUDES} - CXX_DEPEND_FLAG+=${MPI_INCLUDES} - LDFLAGSFORBIN= $(LDFLAGS) -lSALOMEBasics - LIBSFORBIN= $(LIBS) -endif - -@CONCLUDE@ diff --git a/src/MPIContainer/SALOME_MPIContainer.cxx b/src/MPIContainer/SALOME_MPIContainer.cxx index 615f27f84..f8692c65f 100644 --- a/src/MPIContainer/SALOME_MPIContainer.cxx +++ b/src/MPIContainer/SALOME_MPIContainer.cxx @@ -23,7 +23,6 @@ #include "Utils_ORB_INIT.hxx" #include "Utils_SINGLETON.hxx" #include "utilities.h" -#include "SALOMETraceCollector.hxx" using namespace std; int main(int argc, char* argv[]) diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 000000000..3b43eb7e1 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,116 @@ +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL +# $Header$ + +SUBDIR_BASE = \ + Basics \ + SALOMELocalTrace \ + CASCatch \ + HDFPersist + +SUBDIR_CORBA = \ + Logger \ + SALOMETraceCollector \ + Utils \ + NamingService \ + GenericObj \ + Registry \ + ModuleCatalog \ + DataTypeCatalog \ + RessourcesCatalog \ + ResourcesManager \ + Notification \ + NOTIFICATION_SWIG \ + Container \ + TestContainer \ + LifeCycleCORBA \ + LifeCycleCORBA_SWIG \ + SALOMEDSClient \ + TOOLSDS \ + SALOMEDSImpl \ + SALOMEDS \ + KERNEL_PY \ + ModuleGenerator \ + Communication \ + Communication_SWIG + +SUBDIR_CPPUNIT_BASE= \ + Basics/Test \ + SALOMELocalTrace/Test + +SUBDIR_CPPUNIT_CORBA = \ + Logger/Test \ + SALOMETraceCollector/Test \ + Utils/Test \ + NamingService/Test \ + LifeCycleCORBA/Test \ + SALOMEDSImpl/Test \ + SALOMEDS/Test + +SUBDIR_CPPUNIT_GENERAL = \ + UnitTests + +SUBDIR_MPI = \ + MPIContainer \ + TestMPIContainer + +SUBDIR_BATCH= \ + Batch \ + Batch_SWIG + +DIST_SUBDIRS = \ + $(SUBDIR_BASE) \ + $(SUBDIR_CORBA) \ + $(SUBDIR_MPI) \ + $(SUBDIR_BATCH) \ + $(SUBDIR_CPPUNIT_BASE) \ + $(SUBDIR_CPPUNIT_CORBA) \ + $(SUBDIR_CPPUNIT_GENERAL) + +# +# The following packages are built under conditions. +# A condition is defined using the macro AM_CONDITIONAL (see the +# check_cppunit for example with CPPUNIT_IS_OK. +# + +SUBDIRS = $(SUBDIR_BASE) + +if CORBA_GEN + SUBDIRS += $(SUBDIR_CORBA) +endif + +if MPI_IS_OK + SUBDIRS += $(SUBDIR_MPI) +endif + +if WITH_BATCH + SUBDIRS += $(SUBDIR_BATCH) +endif + +if CPPUNIT_IS_OK + SUBDIRS += $(SUBDIR_CPPUNIT_BASE) + SUBDIRS += $(SUBDIR_CPPUNIT_CORBA) + SUBDIRS += $(SUBDIR_CPPUNIT_GENERAL) +endif diff --git a/src/Makefile.in b/src/Makefile.in deleted file mode 100644 index 2830eaca5..000000000 --- a/src/Makefile.in +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Patrick GOLDBRONN (CEA) -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=.. -srcdir=@srcdir@ -VPATH=.:@srcdir@ - - -@COMMENCE@ - -SUBDIRS = \ - Basics \ - SALOMELocalTrace \ - CASCatch \ - HDFPersist \ - Logger \ - SALOMETraceCollector \ - Utils \ - NamingService \ - GenericObj \ - Registry \ - ModuleCatalog \ - DataTypeCatalog \ - RessourcesCatalog \ - ResourcesManager \ - Notification \ - NOTIFICATION_SWIG \ - Container \ - TestContainer \ - LifeCycleCORBA \ - LifeCycleCORBA_SWIG \ - SALOMEDSClient \ - TOOLSDS \ - SALOMEDSImpl \ - SALOMEDS \ - KERNEL_PY \ - ModuleGenerator \ - Communication \ - Communication_SWIG - -ifeq (@mpi_ok@,yes) - SUBDIRS+= MPIContainer TestMPIContainer -endif - -ifeq (@WITH_BATCH@,yes) - SUBDIRS += Batch Batch_SWIG -endif - -ifeq (@cppunit_ok@,yes) - SUBDIRS+= \ - Basics/Test \ - SALOMELocalTrace/Test \ - Logger/Test \ - SALOMETraceCollector/Test \ - Utils/Test \ - NamingService/Test \ - LifeCycleCORBA/Test \ - UnitTests -endif - -@MODULE@ - diff --git a/src/ModuleCatalog/Makefile.am b/src/ModuleCatalog/Makefile.am new file mode 100644 index 000000000..5a810d794 --- /dev/null +++ b/src/ModuleCatalog/Makefile.am @@ -0,0 +1,116 @@ +# SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : SALOME +# $Header$ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Header an scripts to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS = \ + SALOME_ModuleCatalog_impl.hxx \ + SALOME_ModuleCatalog_Acomponent_impl.hxx \ + PathPrefix.hxx \ + SALOME_ModuleCatalog_Parser.hxx \ + SALOME_ModuleCatalog_Parser_IO.hxx \ + SALOME_ModuleCatalog_Handler.hxx + +# Scripts to be installed +dist_salomescript_DATA = SALOME_TestModuleCatalog.py + + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libSalomeCatalog.la + +# This local variable defines the list of CPPFLAGS common to all target in this package. +COMMON_CPPFLAGS=\ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../NamingService \ + -I$(srcdir)/../Utils \ + -I$(top_builddir)/salome_adm/unix \ + -I$(top_builddir)/idl \ + @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ \ + @QT_MT_INCLUDES@ + +# This local variable defines the list of dependant libraries common to all target in this package. +COMMON_LIBS =\ + ../NamingService/libSalomeNS.la \ + ../Utils/libOpUtil.la \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + ../Basics/libSALOMEBasics.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la + +libSalomeCatalog_la_SOURCES =\ + SALOME_ModuleCatalog_Handler.cxx \ + SALOME_ModuleCatalog_Parser_IO.cxx \ + SALOME_ModuleCatalog_impl.cxx \ + SALOME_ModuleCatalog_Acomponent_impl.cxx + +libSalomeCatalog_la_CPPFLAGS =\ + $(COMMON_CPPFLAGS) + +libSalomeCatalog_la_LDFLAGS = -no-undefined -version-info=0:0:0 + +libSalomeCatalog_la_LIBADD =\ + $(COMMON_LIBS) \ + @QT_MT_LIBS@ + + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Client + +# SALOME_ModuleCatalog_Server +SALOME_ModuleCatalog_Server_SOURCES = SALOME_ModuleCatalog_Server.cxx +SALOME_ModuleCatalog_Server_CPPFLAGS =\ + $(COMMON_CPPFLAGS) + +SALOME_ModuleCatalog_Server_LDADD =\ + libSalomeCatalog.la \ + $(COMMON_LIBS) \ + @CORBA_LIBS@ + +# SALOME_ModuleCatalog_Client +SALOME_ModuleCatalog_Client_SOURCES = SALOME_ModuleCatalog_Client.cxx +SALOME_ModuleCatalog_Client_CPPFLAGS =\ + $(COMMON_CPPFLAGS) + +SALOME_ModuleCatalog_Client_LDADD =\ + libSalomeCatalog.la \ + $(COMMON_LIBS) \ + @CORBA_LIBS@ diff --git a/src/ModuleCatalog/Makefile.in b/src/ModuleCatalog/Makefile.in deleted file mode 100644 index 65f688f97..000000000 --- a/src/ModuleCatalog/Makefile.in +++ /dev/null @@ -1,72 +0,0 @@ -# SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE, EDF -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -EXPORT_PYSCRIPTS = SALOME_TestModuleCatalog.py -EXPORT_HEADERS = \ - SALOME_ModuleCatalog_impl.hxx \ - SALOME_ModuleCatalog_Acomponent_impl.hxx \ - PathPrefix.hxx \ - SALOME_ModuleCatalog_Parser.hxx \ - SALOME_ModuleCatalog_Parser_IO.hxx \ - SALOME_ModuleCatalog_Handler.hxx - -# Libraries targets -LIB = libSalomeCatalog.la -LIB_SRC = \ - SALOME_ModuleCatalog_Handler.cxx \ - SALOME_ModuleCatalog_Parser_IO.cxx \ - SALOME_ModuleCatalog_impl.cxx \ - SALOME_ModuleCatalog_Acomponent_impl.cxx - -LIB_SERVER_IDL = SALOME_ModuleCatalog.idl SALOME_Exception.idl - -CXXFLAGS+=-ftemplate-depth-32 - -# Executables targets -# trouble we have client and serveur and build don't known about this with rule -# in fact client is a test ! So it may go away BIN ! - -BIN = SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Client -BIN_SRC = -BIN_SERVER_IDL = SALOME_ModuleCatalog.idl SALOME_Exception.idl - -CPPFLAGS+= $(QT_MT_INCLUDES) -LDFLAGS+= $(QT_MT_LIBS) -lSalomeNS -lSALOMELocalTrace -lOpUtil -lSALOMEBasics - -LDFLAGSFORBIN+= -lSalomeNS -lSALOMELocalTrace -lOpUtil -lSALOMEBasics - - -@CONCLUDE@ diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx index 274de28a1..f01ba2d1e 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx @@ -29,7 +29,6 @@ #include "SALOME_NamingService.hxx" #include "SALOME_ModuleCatalog_impl.hxx" #include "utilities.h" -#include "SALOMETraceCollector.hxx" #include "Utils_SINGLETON.hxx" #ifdef CHECKTIME diff --git a/src/ModuleGenerator/Makefile.in b/src/ModuleGenerator/Makefile.am similarity index 81% rename from src/ModuleGenerator/Makefile.in rename to src/ModuleGenerator/Makefile.am index 5abeb5270..afdb659f1 100644 --- a/src/ModuleGenerator/Makefile.in +++ b/src/ModuleGenerator/Makefile.am @@ -19,19 +19,11 @@ # # # -# File : Makefile.in -# Author : Marc Tajchman -# Module : SALOME +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL # $Header$ -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl +include $(top_srcdir)/salome_adm/unix/make_common_starter.am - -@COMMENCE@ - -EXPORT_PYSCRIPTS = IDLparser.py - -@CONCLUDE@ +dist_salomescript_DATA = IDLparser.py diff --git a/src/ModuleGenerator/testIDLparser.in b/src/ModuleGenerator/testIDLparser.in index 94eccf70c..64709e7ac 100755 --- a/src/ModuleGenerator/testIDLparser.in +++ b/src/ModuleGenerator/testIDLparser.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ROOT_SRCDIR=@ROOT_SRCDIR@ export ROOT_SRCDIR diff --git a/src/ModuleGenerator/tests/test1.sh b/src/ModuleGenerator/tests/test1.sh index 6b659696e..2fbd7754c 100755 --- a/src/ModuleGenerator/tests/test1.sh +++ b/src/ModuleGenerator/tests/test1.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/src/ModuleGenerator/tests/test1b.sh b/src/ModuleGenerator/tests/test1b.sh index e3e41193d..ad837a02c 100755 --- a/src/ModuleGenerator/tests/test1b.sh +++ b/src/ModuleGenerator/tests/test1b.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/src/ModuleGenerator/tests/test2.sh b/src/ModuleGenerator/tests/test2.sh index d534140fb..0a61ddef3 100755 --- a/src/ModuleGenerator/tests/test2.sh +++ b/src/ModuleGenerator/tests/test2.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/src/ModuleGenerator/tests/test3.sh b/src/ModuleGenerator/tests/test3.sh index 3689eb162..fe726682e 100755 --- a/src/ModuleGenerator/tests/test3.sh +++ b/src/ModuleGenerator/tests/test3.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/src/ModuleGenerator/tests/test4.sh b/src/ModuleGenerator/tests/test4.sh index d7a0bb83d..c6314373c 100755 --- a/src/ModuleGenerator/tests/test4.sh +++ b/src/ModuleGenerator/tests/test4.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/src/ModuleGenerator/tests/test5.sh b/src/ModuleGenerator/tests/test5.sh index 41b76c091..69a2a20dc 100755 --- a/src/ModuleGenerator/tests/test5.sh +++ b/src/ModuleGenerator/tests/test5.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/src/NOTIFICATION_SWIG/Makefile.am b/src/NOTIFICATION_SWIG/Makefile.am new file mode 100644 index 000000000..a904cf47e --- /dev/null +++ b/src/NOTIFICATION_SWIG/Makefile.am @@ -0,0 +1,62 @@ +# SALOME NOTIFICATION_SWIG : wrapping of Notification sevices in order to be available in Python +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# 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) +# see also LifeCycleCORBA_SWIG +# +BUILT_SOURCES = swig_wrap.cpp + +SWIG_FLAGS = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/../Notification +SWIG_SOURCES = NOTIFICATION.i + +pkgpython_PYTHON = libNOTIFICATION.py +pkgpyexec_LTLIBRARIES = _libNOTIFICATION.la +_libNOTIFICATION_la_SOURCES = $(BUILT_SOURCES) $(SWIG_SOURCES) \ + NOTIFICATION_Swig.cxx NOTIFICATION_Swig.hxx +_libNOTIFICATION_la_CPPFLAGS =\ + @PYTHON_INCLUDES@ -DHAVE_CONFIG_H \ + -I$(srcdir)/../Notification \ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ + + +_libNOTIFICATION_la_LDFLAGS = -module +_libNOTIFICATION_la_LIBADD = ../Notification/libSalomeNotification.la \ + @PYTHON_LIBS@ + +swig_wrap.cpp : $(SWIG_SOURCES) + $(SWIG) $(SWIG_FLAGS) -o $@ $< + +CLEANFILES = swig_wrap.cpp diff --git a/src/NOTIFICATION_SWIG/Makefile.in b/src/NOTIFICATION_SWIG/Makefile.in deleted file mode 100644 index c6d707116..000000000 --- a/src/NOTIFICATION_SWIG/Makefile.in +++ /dev/null @@ -1,51 +0,0 @@ -# SALOME NOTIFICATION_SWIG : wrapping of Notification sevices in order to be available in Python -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE, EDF -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - -@COMMENCE@ - -# Libraries targets - -EXPORT_HEADERS = - -LIB = libNOTIFICATIONcmodule.la -LIB_SRC = NOTIFICATION_Swig.cxx - -SWIG_DEF = NOTIFICATION.i -EXPORT_PYSCRIPTS = libNOTIFICATION.py -SWIG_FLAGS += -I$(srcdir) - -CPPFLAGS+=$(PYTHON_INCLUDES) -DHAVE_CONFIG_H -LIBS+= $(PYTHON_LIBS) -LDFLAGS+= -lSalomeNotification - -@CONCLUDE@ diff --git a/src/NamingService/Makefile.in b/src/NamingService/Makefile.am similarity index 65% rename from src/NamingService/Makefile.in rename to src/NamingService/Makefile.am index 13281780c..996a727e1 100644 --- a/src/NamingService/Makefile.in +++ b/src/NamingService/Makefile.am @@ -21,35 +21,39 @@ # # # -# File : Makefile.in -# Author : Paul RASCLE, EDF -# Module : SALOME +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL # $Header$ -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl +include $(top_srcdir)/salome_adm/unix/make_common_starter.am - -@COMMENCE@ - -EXPORT_PYSCRIPTS = SALOME_NamingServicePy.py - -EXPORT_HEADERS = \ +# header files +salomeinclude_HEADERS =\ SALOME_NamingService.hxx \ ServiceUnreachable.hxx \ NamingService_WaitForServerReadiness.hxx -# Libraries targets +# Scripts to be exported +dist_salomescript_DATA =\ + SALOME_NamingServicePy.py -LIB = libSalomeNS.la -LIB_SRC = \ + +# Libraries targets +lib_LTLIBRARIES = libSalomeNS.la +libSalomeNS_la_SOURCES =\ SALOME_NamingService.cxx \ ServiceUnreachable.cxx \ NamingService_WaitForServerReadiness.cxx -LIB_SERVER_IDL = SALOME_Exception.idl -LDFLAGS+= -lOpUtil +libSalomeNS_la_LDFLAGS = -no-undefined -version-info=0:0:0 + +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@ -@CONCLUDE@ +libSalomeNS_la_LIBADD = ../Utils/libOpUtil.la diff --git a/src/NamingService/SALOME_NamingService.cxx b/src/NamingService/SALOME_NamingService.cxx index 0c046c9ea..783f6bae0 100644 --- a/src/NamingService/SALOME_NamingService.cxx +++ b/src/NamingService/SALOME_NamingService.cxx @@ -642,9 +642,9 @@ SALOME_NamingService::ContainerName(const Engines::MachineParameters& params) * \param params struct from which we get container name (may be * empty), number of nodes and number of processor * per node. - * /param hostname name of the host of the container, without domain names. - * /return the path under the form /Containers/hostname/containerName - * /sa ContainerName(const Engines::MachineParameters& params) + * \param hostname name of the host of the container, without domain names. + * \return the path under the form /Containers/hostname/containerName + * \sa ContainerName(const Engines::MachineParameters& params) */ // ============================================================================ @@ -664,10 +664,10 @@ string SALOME_NamingService::BuildContainerNameForNS(const char *containerName, * * Build a string representing the absolute pathname of a container in * SALOME_NamingService. - * /param params used as it is, or replaced by FactoryServer if empty. - * /param hostname name of the host of the container, without domain names. - * /return the path under the form /Containers/hostname/containerName - * /sa ContainerName(const char *containerName) + * \param params used as it is, or replaced by FactoryServer if empty. + * \param hostname name of the host of the container, without domain names. + * \return the path under the form /Containers/hostname/containerName + * \sa ContainerName(const char *containerName) */ // ============================================================================ @@ -1759,14 +1759,12 @@ _current_directory(vector& splitPath, * get a list of all the objects in the current directory, with recursion * on the subdirectories. Only the objects are listed, not the directories. * If the NamingService is out, the exception ServiceUnreachable is thrown. - * \param myList the list of objects - * \ -Function :_list_directory_recurs. - * Purpose : method to list recursively all the objects contained in the tree of absCurDirectory/relativeSubDir. - * \param myList The list that will be filled. - * \param relativeSubDir The directory from absCurDirectory in which the objects are found. - * \param absCurDirectory The directory in ABSOLUTE form. * _current_context must refer to absCurDirectory. + * + * \param myList The list that will be filled. + * \param relativeSubDir The directory relative to absCurDirectory in which + * the objects are found. + * \param absCurDirectory The current directory, absolute path */ // ============================================================================ diff --git a/src/NamingService/Test/Makefile.am b/src/NamingService/Test/Makefile.am new file mode 100644 index 000000000..af7d1a4c9 --- /dev/null +++ b/src/NamingService/Test/Makefile.am @@ -0,0 +1,95 @@ +# SALOMELocalTrace : log on local machine +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume BOULANT (CSSI) +# Module : SALOME +# $Header$ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Files to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS= NamingServiceTest.hxx + +# Scripts to be installed +dist_salomescript_SCRIPTS = TestNamingService.py + + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This directory defines the subdirectory src in the top source directory. +RPATH=../.. + +# This local variable defines the list of CPPFLAGS common to all target in this package. +COMMON_CPPFLAGS=\ + @CPPUNIT_INCLUDES@ -I$(srcdir)/$(RPATH)/NamingService \ + -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@ + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +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@ + + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = TestNamingService +TestNamingService_SOURCES = TestNamingService.cxx +TestNamingService_CPPFLAGS = \ + $(COMMON_CPPFLAGS) \ + -I$(srcdir)/$(RPATH)/SALOMELocalTrace/Test \ + -I$(srcdir)/$(RPATH)/SALOMETraceCollector/Test \ + -I$(srcdir)/$(RPATH)/Utils/Test \ + -I$(srcdir)/$(RPATH)/Basics/Test + + +TestNamingService_LDADD = \ + libNamingServiceTest.la ../libSalomeNS.la \ + $(RPATH)/SALOMELocalTrace/Test/libSALOMELocalTraceTest.la $(RPATH)/SALOMELocalTrace/libSALOMELocalTrace.la \ + $(RPATH)/SALOMETraceCollector/Test/libSALOMETraceCollectorTest.la \ + $(RPATH)/Utils/Test/libUtilsTest.la $(RPATH)/Utils/libOpUtil.la \ + $(RPATH)/Basics/libSALOMEBasics.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la diff --git a/src/NamingService/Test/Makefile.in b/src/NamingService/Test/Makefile.in deleted file mode 100644 index 36d8bcd17..000000000 --- a/src/NamingService/Test/Makefile.in +++ /dev/null @@ -1,70 +0,0 @@ -# SALOMELocalTrace : log on local machine -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE (EDF) -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -# header files -EXPORT_HEADERS= NamingServiceTest.hxx - -EXPORT_PYSCRIPTS = TestNamingService.py - -# Libraries targets - -LIB = libNamingServiceTest.la -LIB_SRC = NamingServiceTest.cxx - -LIB_SERVER_IDL = nstest.idl - -LIB_CLIENT_IDL = SALOME_Component.idl SALOME_TestComponent.idl \ - SALOME_Exception.idl - -# Executables targets - -BIN = TestNamingService -BIN_SRC = - -CXXFLAGS += @CPPUNIT_INCLUDES@ -CPPFLAGS += @CPPUNIT_INCLUDES@ - -LIBS= @LIBS@ @CPPUNIT_LIBS@ - -LDFLAGS+= - -LDFLAGSFORBIN+= \ - -lSALOMELocalTraceTest -lSALOMELocalTrace -lSALOMEBasics \ - -lSALOMETraceCollectorTest \ - -lUtilsTest -lOpUtil \ - -lSalomeNS - -@CONCLUDE@ diff --git a/src/Notification/Makefile.am b/src/Notification/Makefile.am new file mode 100644 index 000000000..ddcccd206 --- /dev/null +++ b/src/Notification/Makefile.am @@ -0,0 +1,72 @@ +# SALOME Notification : wrapping of Notification service services +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL +# $Header$ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Header to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS = \ + NOTIFICATION.hxx \ + NOTIFICATION_Supplier.hxx \ + NOTIFICATION_Consumer.hxx \ + CosNotifyShorthands.h + +# +# =============================================================== +# Libraries targets +# =============================================================== +# + +lib_LTLIBRARIES = libSalomeNotification.la +libSalomeNotification_la_SOURCES =\ + NOTIFICATION.cxx \ + NOTIFICATION_Supplier.cxx \ + NOTIFICATION_Consumer.cxx + +libSalomeNotification_la_CPPFLAGS =\ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../Utils \ + @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ + + +libSalomeNotification_la_LDFLAGS = -no-undefined -version-info=0:0:0 + +libSalomeNotification_la_LIBADD =\ + ../Utils/libOpUtil.la \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + ../Basics/libSALOMEBasics.la \ + @CORBA_LIBS@ + + +#LDFLAGS+= -lOpUtil -lSALOMELocalTrace +#OMNIORB_IDLCXXFLAGS+= -Wbtp diff --git a/src/Notification/Makefile.in b/src/Notification/Makefile.in deleted file mode 100644 index 4d43c67a5..000000000 --- a/src/Notification/Makefile.in +++ /dev/null @@ -1,53 +0,0 @@ -# SALOME Notification : wrapping of Notification service services -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE, EDF -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -EXPORT_HEADERS = NOTIFICATION.hxx \ - NOTIFICATION_Supplier.hxx \ - NOTIFICATION_Consumer.hxx \ - CosNotifyShorthands.h - -# Libraries targets - -LIB = libSalomeNotification.la - -LIB_SRC = NOTIFICATION.cxx \ - NOTIFICATION_Supplier.cxx \ - NOTIFICATION_Consumer.cxx - -LDFLAGS+= -lOpUtil -lSALOMELocalTrace -OMNIORB_IDLCXXFLAGS+= -Wbtp - -@CONCLUDE@ diff --git a/src/Registry/Makefile.am b/src/Registry/Makefile.am new file mode 100644 index 000000000..f4ad2adc9 --- /dev/null +++ b/src/Registry/Makefile.am @@ -0,0 +1,73 @@ +# SALOME Registry : Registry server implementation +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : SALOME +# $Header$ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# header files +salomeinclude_HEADERS =\ + RegistryConnexion.hxx \ + RegistryService.hxx + +# Libraries targets +lib_LTLIBRARIES = libRegistry.la +libRegistry_la_SOURCES =\ + RegistryConnexion.cxx \ + RegistryService.cxx + +libRegistry_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libRegistry_la_CPPFLAGS =\ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../NamingService \ + -I$(srcdir)/../Utils \ + -I$(top_builddir)/salome_adm/unix \ + -I$(top_builddir)/idl \ + @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ + +libRegistry_la_LIBADD =\ + ../NamingService/libSalomeNS.la \ + ../Utils/libOpUtil.la \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la + + +# Executables targets +bin_PROGRAMS = SALOME_Registry_Server +SALOME_Registry_Server_SOURCES = SALOME_Registry_Server.cxx +SALOME_Registry_Server_LDADD =\ + libRegistry.la \ + ../Basics/libSALOMEBasics.la \ + @CORBA_LIBS@ +SALOME_Registry_Server_CPPFLAGS =\ + -I$(srcdir)/../Basics \ + -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/Makefile.in b/src/Registry/Makefile.in deleted file mode 100644 index 73b61f60d..000000000 --- a/src/Registry/Makefile.in +++ /dev/null @@ -1,60 +0,0 @@ -# SALOME Registry : Registry server implementation -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE, EDF -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -EXPORT_PYSCRIPTS = - -EXPORT_HEADERS = \ - RegistryConnexion.hxx \ - RegistryService.hxx - -# Libraries targets - -LIB = libRegistry.la -LIB_SRC = \ - RegistryConnexion.cxx \ - RegistryService.cxx -LIB_CLIENT_IDL = SALOME_Registry.idl SALOME_Exception.idl - -# Executables targets -BIN = SALOME_Registry_Server -BIN_SRC = -BIN_SERVER_IDL = SALOME_Registry.idl - -LDFLAGS+= -lSalomeNS -lOpUtil -lSALOMELocalTrace - -LDFLAGSFORBIN= $(LDFLAGS) -lSALOMEBasics - -@CONCLUDE@ diff --git a/src/Registry/SALOME_Registry_Server.cxx b/src/Registry/SALOME_Registry_Server.cxx index 0131bb901..2ee59f649 100644 --- a/src/Registry/SALOME_Registry_Server.cxx +++ b/src/Registry/SALOME_Registry_Server.cxx @@ -36,7 +36,6 @@ extern "C" } #include "utilities.h" -#include "SALOMETraceCollector.hxx" #include "Utils_ORB_INIT.hxx" #include "Utils_SINGLETON.hxx" #include "Utils_SALOME_Exception.hxx" diff --git a/src/ResourcesManager/Makefile.am b/src/ResourcesManager/Makefile.am new file mode 100755 index 000000000..124647f5c --- /dev/null +++ b/src/ResourcesManager/Makefile.am @@ -0,0 +1,84 @@ +# SALOME ResourcesManager +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : SALOME +# $Header$ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Header to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS = \ + SALOME_ResourcesCatalog_Parser.hxx \ + SALOME_ResourcesManager.hxx \ + SALOME_ResourcesCatalog_Handler.hxx \ + SALOME_LoadRateManager.hxx + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This local variable defines the list of CPPFLAGS common to all target in this package. +COMMON_CPPFLAGS=\ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../NamingService \ + -I$(srcdir)/../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 =\ + ../NamingService/libSalomeNS.la \ + ../Utils/libOpUtil.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libSalomeResourcesManager.la +libSalomeResourcesManager_la_SOURCES =\ + SALOME_ResourcesCatalog_Parser.cxx \ + SALOME_ResourcesCatalog_Handler.cxx \ + SALOME_LoadRateManager.cxx \ + SALOME_ResourcesManager.cxx + +libSalomeResourcesManager_la_CPPFLAGS =\ + $(COMMON_CPPFLAGS) \ + @QT_MT_INCLUDES@ + +libSalomeResourcesManager_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libSalomeResourcesManager_la_LIBADD =\ + $(COMMON_LIBS) \ + @QT_MT_LIBS@ diff --git a/src/ResourcesManager/Makefile.in b/src/ResourcesManager/Makefile.in deleted file mode 100755 index e3aca30fa..000000000 --- a/src/ResourcesManager/Makefile.in +++ /dev/null @@ -1,66 +0,0 @@ -# SALOME RessourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl) -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE, EDF -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -EXPORT_HEADERS = \ - SALOME_ResourcesCatalog_Parser.hxx \ - SALOME_ResourcesManager.hxx \ - SALOME_ResourcesCatalog_Handler.hxx \ - SALOME_LoadRateManager.hxx \ - -# Libraries targets -LIB = libSalomeResourcesManager.la -LIB_SRC = \ - SALOME_ResourcesCatalog_Parser.cxx \ - SALOME_ResourcesCatalog_Handler.cxx \ - SALOME_LoadRateManager.cxx \ - SALOME_ResourcesManager.cxx \ - -# Executables targets -# trouble we have client and serveur and build don't known about this with rule -# in fact client is a test ! So it may go away BIN ! -#BIN = test_rc2 -#SALOME_RessourcesCatalog_Server SALOME_RessourcesCatalog_Client test -LIB_CLIENT_IDL = SALOME_ContainerManager.idl SALOME_Component.idl SALOME_Exception.idl -BIN_SRC = -BIN_SERVER_IDL = SALOME_ContainerManager.idl - -CPPFLAGS+= $(QT_MT_INCLUDES) -I$(srcdir)/../Container -CXXFLAGS+= -LDFLAGS+= $(QT_MT_LIBS) $(OGL_LIBS) -lSalomeNS -lOpUtil -lSALOMELocalTrace - -@CONCLUDE@ - - diff --git a/src/RessourcesCatalog/Makefile.am b/src/RessourcesCatalog/Makefile.am new file mode 100644 index 000000000..24f917812 --- /dev/null +++ b/src/RessourcesCatalog/Makefile.am @@ -0,0 +1,116 @@ +# SALOME RessourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl) +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : SALOME +# $Header$ + + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Header to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS = \ + SALOME_RessourcesCatalog_impl.hxx \ + SALOME_RessourcesCatalog_Parser.hxx \ + SALOME_RessourcesCatalog_Handler.hxx + + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This local variable defines the list of CPPFLAGS common to all target in this package. +COMMON_CPPFLAGS=\ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../NamingService \ + -I$(srcdir)/../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 =\ + ../NamingService/libSalomeNS.la \ + ../Utils/libOpUtil.la \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + ../Basics/libSALOMEBasics.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la + +# +# =============================================================== +# Libraries targets +# =============================================================== +# + +lib_LTLIBRARIES = libSalomeRessourcesCatalog.la +libSalomeRessourcesCatalog_la_SOURCES=\ + SALOME_RessourcesCatalog_Handler.cxx \ + SALOME_RessourcesCatalog_impl.cxx + +libSalomeRessourcesCatalog_la_CPPFLAGS =\ + $(COMMON_CPPFLAGS) \ + @QT_MT_INCLUDES@ + +libSalomeRessourcesCatalog_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libSalomeRessourcesCatalog_la_LIBADD =\ + $(COMMON_LIBS) \ + @QT_MT_LIBS@ + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = SALOME_RessourcesCatalog_Server SALOME_RessourcesCatalog_Client + +#SALOME_RessourcesCatalog_Server +SALOME_RessourcesCatalog_Server_SOURCES = SALOME_RessourcesCatalog_Server.cxx +SALOME_RessourcesCatalog_Server_CPPFLAGS =\ + $(COMMON_CPPFLAGS) \ + @QT_MT_INCLUDES@ + +SALOME_RessourcesCatalog_Server_LDADD =\ + libSalomeRessourcesCatalog.la \ + $(COMMON_LIBS) \ + @CORBA_LIBS@ + +#SALOME_RessourcesCatalog_Client +SALOME_RessourcesCatalog_Client_SOURCES = SALOME_RessourcesCatalog_Client.cxx +SALOME_RessourcesCatalog_Client_CPPFLAGS =\ + $(COMMON_CPPFLAGS) \ + @QT_MT_INCLUDES@ + +SALOME_RessourcesCatalog_Client_LDADD =\ + libSalomeRessourcesCatalog.la \ + $(COMMON_LIBS) \ + @CORBA_LIBS@ + diff --git a/src/RessourcesCatalog/Makefile.in b/src/RessourcesCatalog/Makefile.in deleted file mode 100644 index 8d416a855..000000000 --- a/src/RessourcesCatalog/Makefile.in +++ /dev/null @@ -1,62 +0,0 @@ -# SALOME RessourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl) -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE, EDF -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -EXPORT_HEADERS = \ - SALOME_RessourcesCatalog_impl.hxx \ - SALOME_RessourcesCatalog_Parser.hxx \ - SALOME_RessourcesCatalog_Handler.hxx - -# Libraries targets -LIB = libSalomeRessourcesCatalog.la -LIB_SRC = \ - SALOME_RessourcesCatalog_Handler.cxx \ - SALOME_RessourcesCatalog_impl.cxx - -# Executables targets -# trouble we have client and serveur and build don't known about this with rule -# in fact client is a test ! So it may go away BIN ! -BIN = SALOME_RessourcesCatalog_Server SALOME_RessourcesCatalog_Client -BIN_SRC = -BIN_SERVER_IDL = SALOME_RessourcesCatalog.idl SALOME_Exception.idl - -CPPFLAGS+= $(QT_MT_INCLUDES) -CXXFLAGS+= -LDFLAGS+= $(QT_MT_LIBS) $(OGL_LIBS) -lSalomeNS -lOpUtil -lSALOMELocalTrace -LDFLAGSFORBIN+= -lSalomeNS -lOpUtil -lSALOMELocalTrace -lSALOMEBasics - -@CONCLUDE@ - - diff --git a/src/RessourcesCatalog/SALOME_RessourcesCatalog_Server.cxx b/src/RessourcesCatalog/SALOME_RessourcesCatalog_Server.cxx index ea3be6a32..8ea3a1a22 100644 --- a/src/RessourcesCatalog/SALOME_RessourcesCatalog_Server.cxx +++ b/src/RessourcesCatalog/SALOME_RessourcesCatalog_Server.cxx @@ -30,7 +30,6 @@ #include "SALOME_NamingService.hxx" #include "SALOME_RessourcesCatalog_impl.hxx" #include "utilities.h" -#include "SALOMETraceCollector.hxx" #include "Utils_SINGLETON.hxx" using namespace std; @@ -38,7 +37,6 @@ int main(int argc,char **argv) { // initialize the ORB CORBA::ORB_ptr orb = CORBA::ORB_init (argc, argv); - // LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb); try { CosNaming::NamingContext_var _rootContext, catalogContext; diff --git a/src/SALOMEDS/Makefile.am b/src/SALOMEDS/Makefile.am new file mode 100644 index 000000000..7a8263368 --- /dev/null +++ b/src/SALOMEDS/Makefile.am @@ -0,0 +1,335 @@ +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Files to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS= \ + SALOMEDS_StudyManager_i.hxx \ + SALOMEDS_Driver_i.hxx \ + SALOMEDS_StudyManager.hxx \ + SALOMEDS_Study_i.hxx \ + SALOMEDS_Study.hxx \ + SALOMEDS_SObject_i.hxx \ + SALOMEDS_SObject.hxx \ + SALOMEDS_SComponent_i.hxx \ + SALOMEDS_SComponent.hxx \ + SALOMEDS_GenericAttribute_i.hxx \ + SALOMEDS_GenericAttribute.hxx \ + SALOMEDS_IParameters.hxx + +# Scripts to be installed +dist_salomescript_DATA = SALOME_DriverPy.py + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This local variable defines the list of CPPFLAGS common to all target in this package. +COMMON_CPPFLAGS=\ + @CAS_CPPFLAGS@ @CAS_CXXFLAGS@ \ + @BOOST_CPPFLAGS@ \ + -I$(srcdir)/../HDFPersist \ + @HDF5_INCLUDES@ \ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../Utils \ + -I$(srcdir)/../SALOMEDSImpl \ + -I$(srcdir)/../NamingService \ + -I$(srcdir)/../GenericObj \ + -I$(srcdir)/../SALOMEDSClient \ + -I$(srcdir)/../LifeCycleCORBA \ + -I$(top_builddir)/salome_adm/unix \ + -I$(top_builddir)/idl \ + @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ + +# This flag is used to resolve the dependencies of OCC libraries. +LDXMUFLAGS = -L/usr/X11R6/lib -lXmu + +# This local variable defines the list of dependant libraries common to all target in this package. +COMMON_LIBS =\ + ../TOOLSDS/libTOOLSDS.la \ + ../NamingService/libSalomeNS.la \ + ../Utils/libOpUtil.la \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + ../Basics/libSALOMEBasics.la \ + ../HDFPersist/libSalomeHDFPersist.la \ + ../SALOMEDSImpl/libSalomeDSImpl.la \ + ../GenericObj/libSalomeGenericObj.la \ + ../LifeCycleCORBA/libSalomeLifeCycleCORBA.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la\ + @CAS_KERNEL@ \ + @HDF5_LIBS@ \ + $(LDXMUFLAGS) + + +#LDFLAGS+= -lSalomeGenericObj -lSalomeLifeCycleCORBA + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libSalomeDS.la +libSalomeDS_la_SOURCES = \ + SALOMEDS.cxx \ + SALOMEDS_Driver_i.cxx \ + SALOMEDS_StudyManager_i.cxx \ + SALOMEDS_UseCaseBuilder_i.cxx \ + SALOMEDS_UseCaseIterator_i.cxx \ + SALOMEDS_ChildIterator_i.cxx \ + SALOMEDS_SComponentIterator_i.cxx \ + SALOMEDS_Study_i.cxx \ + SALOMEDS_StudyBuilder_i.cxx \ + SALOMEDS_SObject_i.cxx \ + SALOMEDS_SComponent_i.cxx \ + SALOMEDS_GenericAttribute_i.cxx \ + SALOMEDS_AttributeComment_i.cxx \ + SALOMEDS_AttributeExternalFileDef_i.cxx \ + SALOMEDS_AttributeFileType_i.cxx \ + SALOMEDS_AttributeIOR_i.cxx \ + SALOMEDS_AttributeInteger_i.cxx \ + SALOMEDS_AttributeName_i.cxx \ + SALOMEDS_AttributePersistentRef_i.cxx \ + SALOMEDS_AttributeReal_i.cxx \ + SALOMEDS_AttributeSequenceOfReal_i.cxx \ + SALOMEDS_AttributeSequenceOfInteger_i.cxx \ + SALOMEDS_AttributeDrawable_i.cxx \ + SALOMEDS_AttributeSelectable_i.cxx \ + SALOMEDS_AttributeOpened_i.cxx \ + SALOMEDS_AttributeFlags_i.cxx \ + SALOMEDS_AttributeGraphic_i.cxx \ + SALOMEDS_AttributeExpandable_i.cxx \ + SALOMEDS_AttributeTextColor_i.cxx \ + SALOMEDS_AttributeTextHighlightColor_i.cxx \ + SALOMEDS_AttributePixMap_i.cxx \ + SALOMEDS_AttributeTreeNode_i.cxx \ + SALOMEDS_AttributeLocalID_i.cxx \ + SALOMEDS_AttributeUserID_i.cxx \ + SALOMEDS_AttributeTarget_i.cxx \ + SALOMEDS_AttributeTableOfInteger_i.cxx \ + SALOMEDS_AttributeTableOfReal_i.cxx \ + SALOMEDS_AttributeTableOfString_i.cxx \ + SALOMEDS_AttributeStudyProperties_i.cxx \ + SALOMEDS_AttributePythonObject_i.cxx \ + SALOMEDS_AttributeParameter_i.cxx \ + SALOMEDS_SObject.cxx \ + SALOMEDS_SComponent.cxx \ + SALOMEDS_GenericAttribute.cxx \ + SALOMEDS_ChildIterator.cxx \ + SALOMEDS_SComponentIterator.cxx \ + SALOMEDS_UseCaseIterator.cxx \ + SALOMEDS_UseCaseBuilder.cxx \ + SALOMEDS_StudyBuilder.cxx \ + SALOMEDS_Study.cxx \ + SALOMEDS_StudyManager.cxx \ + SALOMEDS_AttributeStudyProperties.cxx \ + SALOMEDS_AttributeComment.cxx \ + SALOMEDS_AttributeDrawable.cxx \ + SALOMEDS_AttributeExpandable.cxx \ + SALOMEDS_AttributeExternalFileDef.cxx \ + SALOMEDS_AttributeFileType.cxx \ + SALOMEDS_AttributeFlags.cxx \ + SALOMEDS_AttributeGraphic.cxx \ + SALOMEDS_AttributeIOR.cxx \ + SALOMEDS_AttributeInteger.cxx \ + SALOMEDS_AttributeLocalID.cxx \ + SALOMEDS_AttributeName.cxx \ + SALOMEDS_AttributeOpened.cxx \ + SALOMEDS_AttributePythonObject.cxx \ + SALOMEDS_AttributeReal.cxx \ + SALOMEDS_AttributeSelectable.cxx \ + SALOMEDS_AttributeSequenceOfInteger.cxx \ + SALOMEDS_AttributePersistentRef.cxx \ + SALOMEDS_AttributePixMap.cxx \ + SALOMEDS_AttributeSequenceOfReal.cxx \ + SALOMEDS_AttributeTableOfInteger.cxx \ + SALOMEDS_AttributeTableOfReal.cxx \ + SALOMEDS_AttributeTableOfString.cxx \ + SALOMEDS_AttributeTarget.cxx \ + SALOMEDS_AttributeTextColor.cxx \ + SALOMEDS_AttributeTextHighlightColor.cxx \ + SALOMEDS_AttributeTreeNode.cxx \ + SALOMEDS_AttributeUserID.cxx \ + SALOMEDS_TMPFile_i.cxx \ + SALOMEDS_AttributeParameter.cxx \ + SALOMEDS_IParameters.cxx \ + \ + Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx \ + Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx \ + Handle_SALOMEDS_DrawableAttribute.hxx \ + Handle_SALOMEDS_ExpandableAttribute.hxx \ + Handle_SALOMEDS_ExternalFileDef.hxx \ + Handle_SALOMEDS_FileType.hxx \ + Handle_SALOMEDS_IORAttribute.hxx \ + Handle_SALOMEDS_LocalIDAttribute.hxx \ + Handle_SALOMEDS_OCAFApplication.hxx \ + Handle_SALOMEDS_OpenedAttribute.hxx \ + Handle_SALOMEDS_PersRefAttribute.hxx \ + Handle_SALOMEDS_PixMapAttribute.hxx \ + Handle_SALOMEDS_PythonObjectAttribute.hxx \ + Handle_SALOMEDS_SelectableAttribute.hxx \ + Handle_SALOMEDS_SequenceOfIntegerAttribute.hxx \ + Handle_SALOMEDS_SequenceOfRealAttribute.hxx \ + Handle_SALOMEDS_StudyPropertiesAttribute.hxx \ + Handle_SALOMEDS_TableOfIntegerAttribute.hxx \ + Handle_SALOMEDS_TableOfRealAttribute.hxx \ + Handle_SALOMEDS_TableOfStringAttribute.hxx \ + Handle_SALOMEDS_TargetAttribute.hxx \ + Handle_SALOMEDS_TextColorAttribute.hxx \ + Handle_SALOMEDS_TextHighlightColorAttribute.hxx \ + SALOMEDS_AttLong_i.hxx \ + SALOMEDS_AttReal_i.hxx \ + SALOMEDS_AttributeComment.hxx \ + SALOMEDS_AttributeComment_i.hxx \ + SALOMEDS_AttributeDrawable.hxx \ + SALOMEDS_AttributeDrawable_i.hxx \ + SALOMEDS_AttributeExpandable.hxx \ + SALOMEDS_AttributeExpandable_i.hxx \ + SALOMEDS_AttributeExternalFileDef.hxx \ + SALOMEDS_AttributeExternalFileDef_i.hxx \ + SALOMEDS_AttributeFileType.hxx \ + SALOMEDS_AttributeFileType_i.hxx \ + SALOMEDS_AttributeFlags.hxx \ + SALOMEDS_AttributeFlags_i.hxx \ + SALOMEDS_AttributeGraphic.hxx \ + SALOMEDS_AttributeGraphic_i.hxx \ + SALOMEDS_AttributeInteger.hxx \ + SALOMEDS_AttributeInteger_i.hxx \ + SALOMEDS_AttributeIOR.hxx \ + SALOMEDS_AttributeIOR_i.hxx \ + SALOMEDS_AttributeLocalID.hxx \ + SALOMEDS_AttributeLocalID_i.hxx \ + SALOMEDS_AttributeName.hxx \ + SALOMEDS_AttributeName_i.hxx \ + SALOMEDS_AttributeOpened.hxx \ + SALOMEDS_AttributeOpened_i.hxx \ + SALOMEDS_AttributePersistentRef.hxx \ + SALOMEDS_AttributePersistentRef_i.hxx \ + SALOMEDS_AttributePixMap.hxx \ + SALOMEDS_AttributePixMap_i.hxx \ + SALOMEDS_AttributePythonObject.hxx \ + SALOMEDS_AttributePythonObject_i.hxx \ + SALOMEDS_AttributeReal.hxx \ + SALOMEDS_AttributeReal_i.hxx \ + SALOMEDS_AttributeSelectable.hxx \ + SALOMEDS_AttributeSelectable_i.hxx \ + SALOMEDS_AttributeSequenceOfInteger.hxx \ + SALOMEDS_AttributeSequenceOfInteger_i.hxx \ + SALOMEDS_AttributeSequenceOfReal.hxx \ + SALOMEDS_AttributeSequenceOfReal_i.hxx \ + SALOMEDS_Attributes.hxx \ + SALOMEDS_AttributeStudyProperties.hxx \ + SALOMEDS_AttributeStudyProperties_i.hxx \ + SALOMEDS_AttributeTableOfInteger.hxx \ + SALOMEDS_AttributeTableOfInteger_i.hxx \ + SALOMEDS_AttributeTableOfReal.hxx \ + SALOMEDS_AttributeTableOfReal_i.hxx \ + SALOMEDS_AttributeTableOfString.hxx \ + SALOMEDS_AttributeTableOfString_i.hxx \ + SALOMEDS_AttributeTarget.hxx \ + SALOMEDS_AttributeTarget_i.hxx \ + SALOMEDS_AttributeTextColor.hxx \ + SALOMEDS_AttributeTextColor_i.hxx \ + SALOMEDS_AttributeTextHighlightColor.hxx \ + SALOMEDS_AttributeTextHighlightColor_i.hxx \ + SALOMEDS_AttributeTreeNode.hxx \ + SALOMEDS_AttributeTreeNode_i.hxx \ + SALOMEDS_AttributeUserID.hxx \ + SALOMEDS_AttributeUserID_i.hxx \ + SALOMEDS_BasicAttributeFactory.hxx \ + SALOMEDS_BasicAttribute_i.hxx \ + SALOMEDS_Callback_i.hxx \ + SALOMEDS_ChildIterator.hxx \ + SALOMEDS_ChildIterator_i.hxx \ + SALOMEDS_ClientAttributes.hxx \ + SALOMEDS_DataMapIteratorOfDataMapOfIntegerString.hxx \ + SALOMEDS_DataMapIteratorOfDataMapStringLabel.hxx \ + SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx \ + SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx \ + SALOMEDS_DataMapOfIntegerString.hxx \ + SALOMEDS_DataMapStringLabel.hxx \ + SALOMEDS_DrawableAttribute.hxx \ + SALOMEDS_Driver_i.hxx \ + SALOMEDS_ExpandableAttribute.hxx \ + SALOMEDS_ExternalFileDef.hxx \ + SALOMEDS_FileType.hxx \ + SALOMEDS_FlagsAttribute.hxx \ + SALOMEDS_GenericAttribute.hxx \ + SALOMEDS_GenericAttribute_i.hxx \ + SALOMEDS_GraphicAttribute.hxx \ + SALOMEDS.hxx \ + SALOMEDS_IORAttribute.hxx \ + SALOMEDS_LocalIDAttribute.hxx \ + SALOMEDS_OCAFApplication.hxx \ + SALOMEDS_OpenedAttribute.hxx \ + SALOMEDS_PersRefAttribute.hxx \ + SALOMEDS_PixMapAttribute.hxx \ + SALOMEDS_PythonObjectAttribute.hxx \ + SALOMEDS_SAttribute_i.hxx \ + SALOMEDS_SComponent.hxx \ + SALOMEDS_SComponent_i.hxx \ + SALOMEDS_SComponentIterator.hxx \ + SALOMEDS_SComponentIterator_i.hxx \ + SALOMEDS_SelectableAttribute.hxx \ + SALOMEDS_SequenceOfIntegerAttribute.hxx \ + SALOMEDS_SequenceOfRealAttribute.hxx \ + SALOMEDS_SObject.hxx \ + SALOMEDS_SObject_i.hxx \ + SALOMEDS_StudyBuilder.hxx \ + SALOMEDS_StudyBuilder_i.hxx \ + SALOMEDS_Study.hxx \ + SALOMEDS_Study_i.hxx \ + SALOMEDS_StudyManager.hxx \ + SALOMEDS_StudyManager_i.hxx \ + SALOMEDS_StudyPropertiesAttribute.hxx \ + SALOMEDS_TableOfIntegerAttribute.hxx \ + SALOMEDS_TableOfRealAttribute.hxx \ + SALOMEDS_TableOfStringAttribute.hxx \ + SALOMEDS_TargetAttribute.hxx \ + SALOMEDS_TextColorAttribute.hxx \ + SALOMEDS_TextHighlightColorAttribute.hxx \ + SALOMEDS_UseCaseBuilder.hxx \ + SALOMEDS_UseCaseBuilder_i.hxx \ + SALOMEDS_UseCaseIterator.hxx \ + SALOMEDS_UseCaseIterator_i.hxx \ + SALOMEDS_AttributeParameter.hxx \ + SALOMEDS_AttributeParameter_i.hxx \ + SALOMEDS_TMPFile_i.hxx + +libSalomeDS_la_CPPFLAGS = $(COMMON_CPPFLAGS) +libSalomeDS_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libSalomeDS_la_LIBADD = $(COMMON_LIBS) + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = SALOMEDS_Server SALOMEDS_Client + +SALOMEDS_Server_SOURCES = SALOMEDS_Server.cxx +SALOMEDS_Server_CPPFLAGS = $(COMMON_CPPFLAGS) +SALOMEDS_Server_LDADD = \ + libSalomeDS.la $(COMMON_LIBS) \ + ../ResourcesManager/libSalomeResourcesManager.la \ + @CAS_OCAF@ \ + @CORBA_LIBS@ + +SALOMEDS_Client_SOURCES = SALOMEDS_Client.cxx +SALOMEDS_Client_CPPFLAGS = $(COMMON_CPPFLAGS) +SALOMEDS_Client_LDADD = \ + libSalomeDS.la $(COMMON_LIBS) \ + ../ResourcesManager/libSalomeResourcesManager.la \ + -lTKLCAF -lTKMath \ + @CORBA_LIBS@ + diff --git a/src/SALOMEDS/Makefile.in b/src/SALOMEDS/Makefile.in deleted file mode 100644 index 96fb1ae2a..000000000 --- a/src/SALOMEDS/Makefile.in +++ /dev/null @@ -1,141 +0,0 @@ -# -# File : Makefile.in -# Author : Sergey RUIN -# Module : SALOME - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_srcdir)/idl - - -@COMMENCE@ - -EXPORT_PYSCRIPTS = SALOME_DriverPy.py - -EXPORT_HEADERS= \ - SALOMEDS_StudyManager_i.hxx \ - SALOMEDS_Driver_i.hxx \ - SALOMEDS_StudyManager.hxx \ - SALOMEDS_Study_i.hxx \ - SALOMEDS_Study.hxx \ - SALOMEDS_SObject_i.hxx \ - SALOMEDS_SObject.hxx \ - SALOMEDS_SComponent_i.hxx \ - SALOMEDS_SComponent.hxx \ - SALOMEDS_GenericAttribute_i.hxx \ - SALOMEDS_GenericAttribute.hxx - -# Libraries targets - -LIB = libSalomeDS.la -LIB_SRC = \ - SALOMEDS.cxx \ - SALOMEDS_Driver_i.cxx \ - SALOMEDS_StudyManager_i.cxx \ - SALOMEDS_UseCaseBuilder_i.cxx \ - SALOMEDS_UseCaseIterator_i.cxx \ - SALOMEDS_ChildIterator_i.cxx \ - SALOMEDS_SComponentIterator_i.cxx \ - SALOMEDS_Study_i.cxx \ - SALOMEDS_StudyBuilder_i.cxx \ - SALOMEDS_SObject_i.cxx \ - SALOMEDS_SComponent_i.cxx \ - SALOMEDS_GenericAttribute_i.cxx \ - SALOMEDS_AttributeComment_i.cxx \ - SALOMEDS_AttributeExternalFileDef_i.cxx \ - SALOMEDS_AttributeFileType_i.cxx \ - SALOMEDS_AttributeIOR_i.cxx \ - SALOMEDS_AttributeInteger_i.cxx \ - SALOMEDS_AttributeName_i.cxx \ - SALOMEDS_AttributePersistentRef_i.cxx \ - SALOMEDS_AttributeReal_i.cxx \ - SALOMEDS_AttributeSequenceOfReal_i.cxx \ - SALOMEDS_AttributeSequenceOfInteger_i.cxx \ - SALOMEDS_AttributeDrawable_i.cxx \ - SALOMEDS_AttributeSelectable_i.cxx \ - SALOMEDS_AttributeOpened_i.cxx \ - SALOMEDS_AttributeFlags_i.cxx \ - SALOMEDS_AttributeGraphic_i.cxx \ - SALOMEDS_AttributeExpandable_i.cxx \ - SALOMEDS_AttributeTextColor_i.cxx \ - SALOMEDS_AttributeTextHighlightColor_i.cxx \ - SALOMEDS_AttributePixMap_i.cxx \ - SALOMEDS_AttributeTreeNode_i.cxx \ - SALOMEDS_AttributeLocalID_i.cxx \ - SALOMEDS_AttributeUserID_i.cxx \ - SALOMEDS_AttributeTarget_i.cxx \ - SALOMEDS_AttributeTableOfInteger_i.cxx \ - SALOMEDS_AttributeTableOfReal_i.cxx \ - SALOMEDS_AttributeTableOfString_i.cxx \ - SALOMEDS_AttributeStudyProperties_i.cxx \ - SALOMEDS_AttributePythonObject_i.cxx \ - SALOMEDS_SObject.cxx \ - SALOMEDS_SComponent.cxx \ - SALOMEDS_GenericAttribute.cxx \ - SALOMEDS_ChildIterator.cxx \ - SALOMEDS_SComponentIterator.cxx \ - SALOMEDS_UseCaseIterator.cxx \ - SALOMEDS_UseCaseBuilder.cxx \ - SALOMEDS_StudyBuilder.cxx \ - SALOMEDS_Study.cxx \ - SALOMEDS_StudyManager.cxx \ - SALOMEDS_AttributeStudyProperties.cxx \ - SALOMEDS_AttributeComment.cxx \ - SALOMEDS_AttributeDrawable.cxx \ - SALOMEDS_AttributeExpandable.cxx \ - SALOMEDS_AttributeExternalFileDef.cxx \ - SALOMEDS_AttributeFileType.cxx \ - SALOMEDS_AttributeFlags.cxx \ - SALOMEDS_AttributeGraphic.cxx \ - SALOMEDS_AttributeIOR.cxx \ - SALOMEDS_AttributeInteger.cxx \ - SALOMEDS_AttributeLocalID.cxx \ - SALOMEDS_AttributeName.cxx \ - SALOMEDS_AttributeOpened.cxx \ - SALOMEDS_AttributePythonObject.cxx \ - SALOMEDS_AttributeReal.cxx \ - SALOMEDS_AttributeSelectable.cxx \ - SALOMEDS_AttributeSequenceOfInteger.cxx \ - SALOMEDS_AttributePersistentRef.cxx \ - SALOMEDS_AttributePixMap.cxx \ - SALOMEDS_AttributeSequenceOfReal.cxx \ - SALOMEDS_AttributeTableOfInteger.cxx \ - SALOMEDS_AttributeTableOfReal.cxx \ - SALOMEDS_AttributeTableOfString.cxx \ - SALOMEDS_AttributeTarget.cxx \ - SALOMEDS_AttributeTextColor.cxx \ - SALOMEDS_AttributeTextHighlightColor.cxx \ - SALOMEDS_AttributeTreeNode.cxx \ - SALOMEDS_AttributeUserID.cxx - - -# Executables targets -BIN = SALOMEDS_Server SALOMEDS_Client -BIN_SRC = -LIB_SERVER_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Exception.idl SALOME_GenericObj.idl -BIN_SERVER_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl -BIN_CLIENT_IDL = - -CPPFLAGS+=$(OCC_INCLUDES) $(HDF5_INCLUDES) $(BOOST_CPPFLAGS) -CXXFLAGS+=$(OCC_CXXFLAGS) $(BOOST_CPPFLAGS) -LDFLAGS+= $(HDF5_LIBS) -lTOOLSDS -lSalomeNS -lSalomeHDFPersist -lOpUtil -lSALOMELocalTrace -lSalomeDSImpl -lSalomeGenericObj $(CAS_KERNEL) -lSalomeGenericObj -lSalomeLifeCycleCORBA - -# _CS_gbo_090604 Ajout Spécifique Calibre 3, pour l'utilisation de la version 5.12 de la bibliothÚque OCC. -# La bibliothÚque OCC5.12 a été compilée sur Calibre 3 avec l'extention Xmu (impossible de compiler sans). -# On est donc obligé ici, pour permettre l'édition de lien avec les bibliothÚques OCC, de spécifier le -# chemin d'accÚs aux bibliothÚques Xmu -# - -# _CS_gbo_090604 Ajout Sp.cifique Calibre 3, pour l'utilisation de la version 5.12 de la biblioth.que OCC. -# La biblioth.que OCC5.12 a .t. compil.e sur Calibre 3 avec l'extention Xmu (impossible de compiler sans). -# On est donc oblig. ici, pour permettre l'.dition de lien avec les biblioth.ques OCC, de sp.cifier le -# chemin d'acc.s aux biblioth.ques Xmu -# -LDXMUFLAGS= -L/usr/X11R6/lib -lXmu -LDFLAGS+=$(LDXMUFLAGS) -LDFLAGSFORBIN= $(LDFLAGS) $(CAS_OCAF) -lRegistry -lSalomeNotification -lSalomeContainer -lSalomeResourcesManager -lSALOMEBasics - -@CONCLUDE@ - - diff --git a/src/SALOMEDS/SALOMEDS.cxx b/src/SALOMEDS/SALOMEDS.cxx index ae488ad0a..4a35577e1 100644 --- a/src/SALOMEDS/SALOMEDS.cxx +++ b/src/SALOMEDS/SALOMEDS.cxx @@ -26,13 +26,28 @@ // Module : SALOME // $Header$ - #ifndef WNT #include +#include +#include +#include +#include +#include +#include #else #include "SALOMEDS.hxx" +#include "SALOMEDS_StudyManager.hxx" +#include "SALOMEDS_Study.hxx" +#include "SALOMEDS_SObject.hxx" +#include "SALOMEDS_SComponent.hxx" +#include "SALOMEDSClient.hxx" +#include "SALOMEDS_StudyManager_i.hxx" #endif +// IDL headers +#include +#include CORBA_SERVER_HEADER(SALOMEDS) + using namespace SALOMEDS; // PAL8065: san -- Global recursive mutex for SALOMEDS methods @@ -55,3 +70,48 @@ void SALOMEDS::unlock() { Locker::MutexDS.unlock(); } + + + +// srn: Added new library methods that create basic SALOMEDS objects (StudyManager, Study, SComponent, SObject) + +//============================================================================= +/*! + * C factory, accessible with dlsym, after dlopen + */ +//============================================================================= + + +extern "C" +{ + +SALOMEDSClient_StudyManager* StudyManagerFactory() +{ + return new SALOMEDS_StudyManager(); +} + +SALOMEDSClient_Study* StudyFactory(SALOMEDS::Study_ptr theStudy) +{ + return new SALOMEDS_Study(theStudy); +} + +SALOMEDSClient_SObject* SObjectFactory(SALOMEDS::SObject_ptr theSObject) +{ + return new SALOMEDS_SObject(theSObject); +} + +SALOMEDSClient_SComponent* SComponentFactory(SALOMEDS::SComponent_ptr theSComponent) +{ + return new SALOMEDS_SComponent(theSComponent); +} + +SALOMEDSClient_StudyManager* CreateStudyManager(CORBA::ORB_ptr orb, PortableServer::POA_ptr root_poa) +{ + SALOMEDS_StudyManager_i * aStudyManager_i = new SALOMEDS_StudyManager_i(orb, root_poa); + // Activate the objects. This tells the POA that the objects are ready to accept requests. + PortableServer::ObjectId_var aStudyManager_iid = root_poa->activate_object(aStudyManager_i); + aStudyManager_i->register_name("/myStudyManager"); + return new SALOMEDS_StudyManager(); +} + +} diff --git a/src/SALOMEDS/SALOMEDS_AttributeParameter.cxx b/src/SALOMEDS/SALOMEDS_AttributeParameter.cxx new file mode 100644 index 000000000..897ca7833 --- /dev/null +++ b/src/SALOMEDS/SALOMEDS_AttributeParameter.cxx @@ -0,0 +1,481 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// +// File : SALOMEDS_AttributeParameter.cxx +// Author : Sergey RUIN +// Module : SALOME + +#include "SALOMEDS_AttributeParameter.hxx" +#include "SALOMEDS.hxx" + +#include +#include + +//======================================================================= +/*! + * Function : Constructor + * Purpose : Creates a new instance of SALOMEDS_AttributeParameter + */ +//======================================================================= +SALOMEDS_AttributeParameter::SALOMEDS_AttributeParameter(const Handle(SALOMEDSImpl_AttributeParameter)& theAttr) +:SALOMEDS_GenericAttribute(theAttr) +{} + +//======================================================================= +/*! + * Function : Constructor + * Purpose : Creates a new instance of SALOMEDS_AttributeParameter + */ +//======================================================================= +SALOMEDS_AttributeParameter::SALOMEDS_AttributeParameter(SALOMEDS::AttributeParameter_ptr theAttr) +:SALOMEDS_GenericAttribute(theAttr) +{} + +//======================================================================= +/*! + * Function : Destructor + * Purpose : Destroys the instance of SALOMEDS_AttributeParameter + */ +//======================================================================= +SALOMEDS_AttributeParameter::~SALOMEDS_AttributeParameter() +{} + +//======================================================================= +/*! + * Function : SetInt + * Purpose : Associates a integer value with the ID + */ +//======================================================================= +void SALOMEDS_AttributeParameter::SetInt(const string& theID, const int theValue) +{ + CheckLocked(); + + if(_isLocal) { + SALOMEDS::Locker lock; + Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetInt(theID, theValue); + } + else + SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetInt(theID.c_str(), theValue); +} + +//======================================================================= +/*! + * Function : GetInt + * Purpose : Returns a int value associated with the given ID + */ +//======================================================================= +int SALOMEDS_AttributeParameter::GetInt(const string& theID) +{ + int aValue; + if(_isLocal) { + SALOMEDS::Locker lock; + aValue = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetInt(theID); + } + else + aValue = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetInt(theID.c_str()); + return aValue; +} + +//======================================================================= +/*! + * Function : SetReal + * Purpose : Associates a double value with the ID + */ +//======================================================================= +void SALOMEDS_AttributeParameter::SetReal(const string& theID, const double& theValue) +{ + CheckLocked(); + + if(_isLocal) { + SALOMEDS::Locker lock; + Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetReal(theID, theValue); + } + else + SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetReal(theID.c_str(), theValue); +} + +//======================================================================= +/*! + * Function : GetReal + * Purpose : Returns a double value associated with the given ID + */ +//======================================================================= +double SALOMEDS_AttributeParameter::GetReal(const string& theID) +{ + double aValue; + if(_isLocal) { + SALOMEDS::Locker lock; + aValue = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetReal(theID); + } + else + aValue = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetReal(theID.c_str()); + return aValue; +} + +//======================================================================= +/*! + * Function : SetString + * Purpose : Associates a string with the ID + */ +//======================================================================= +void SALOMEDS_AttributeParameter::SetString(const string& theID, const string& theValue) +{ + CheckLocked(); + + if(_isLocal) { + SALOMEDS::Locker lock; + Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetString(theID, theValue); + } + else + SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetString(theID.c_str(), theValue.c_str()); +} + +//======================================================================= +/*! + * Function : GetString + * Purpose : Returns a string associated with the given ID + */ +//======================================================================= +string SALOMEDS_AttributeParameter::GetString(const string& theID) +{ + string aValue; + if(_isLocal) { + SALOMEDS::Locker lock; + aValue = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetString(theID); + } + else + aValue = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetString(theID.c_str()); + return aValue; +} + +//======================================================================= +/*! + * Function : SetBool + * Purpose : Associates a bool value with the ID + */ +//======================================================================= +void SALOMEDS_AttributeParameter::SetBool(const string& theID, const bool& theValue) +{ + CheckLocked(); + + if(_isLocal) { + SALOMEDS::Locker lock; + Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetBool(theID, theValue); + } + else + SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetBool(theID.c_str(), theValue); +} + +//======================================================================= +/*! + * Function : GetBool + * Purpose : Returns a bool value associated with the ID + */ +//======================================================================= +bool SALOMEDS_AttributeParameter::GetBool(const string& theID) +{ + if(_isLocal) { + SALOMEDS::Locker lock; + return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetBool(theID); + } + else + return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetBool(theID.c_str()); +} + +//======================================================================= +/*! + * Function : SetRealArray + * Purpose : Associates an array of double values with the given ID + */ +//======================================================================= +void SALOMEDS_AttributeParameter::SetRealArray(const string& theID, const vector& theArray) +{ + CheckLocked(); + + if(_isLocal) { + SALOMEDS::Locker lock; + Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetRealArray(theID, theArray); + } + else { + SALOMEDS::DoubleSeq_var aSeq = new SALOMEDS::DoubleSeq; + int length = theArray.size(); + if(length) { + aSeq->length(length); + for(int i = 0; iSetRealArray(theID.c_str(), aSeq); + } +} + +//======================================================================= +/*! + * Function : GetRealArray + * Purpose : Returns an array of double values associated with the ID + */ +//======================================================================= +vector SALOMEDS_AttributeParameter::GetRealArray(const string& theID) +{ + vector v; + if(_isLocal) { + SALOMEDS::Locker lock; + return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetRealArray(theID); + } + else { + SALOMEDS::DoubleSeq_var aSeq = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetRealArray(theID.c_str()); + int length = aSeq->length(); + if(length) { + v.resize(length); + for(int i = 0; i < length; i++) v[i] = aSeq[i]; + } + } + return v; +} + +//======================================================================= +/*! + * Function : SetIntArray + * Purpose : Associates an array of int values with the given ID + */ +//======================================================================= +void SALOMEDS_AttributeParameter::SetIntArray(const string& theID, const vector& theArray) +{ + CheckLocked(); + + if(_isLocal) { + SALOMEDS::Locker lock; + Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetIntArray(theID, theArray); + } + else { + SALOMEDS::LongSeq_var aSeq = new SALOMEDS::LongSeq; + int length = theArray.size(); + if(length) { + aSeq->length(length); + for(int i = 0; iSetIntArray(theID.c_str(), aSeq); + } +} + +//======================================================================= +/*! + * Function : GetIntArray + * Purpose : Returns an array of int values associated with the ID + */ +//======================================================================= +vector SALOMEDS_AttributeParameter::GetIntArray(const string& theID) +{ + vector v; + if(_isLocal) { + SALOMEDS::Locker lock; + return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetIntArray(theID); + } + else { + SALOMEDS::LongSeq_var aSeq = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetIntArray(theID.c_str()); + int length = aSeq->length(); + if(length) { + v.resize(length); + for(int i = 0; i < length; i++) v[i] = aSeq[i]; + } + } + return v; +} + +//======================================================================= +/*! + * Function : SetStrArray + * Purpose : Associates an array of string values with the given ID + */ +//======================================================================= +void SALOMEDS_AttributeParameter::SetStrArray(const string& theID, const vector& theArray) +{ + CheckLocked(); + + if(_isLocal) { + SALOMEDS::Locker lock; + Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetStrArray(theID, theArray); + } + else { + SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq; + int length = theArray.size(); + if(length) { + aSeq->length(length); + for(int i = 0; iSetStrArray(theID.c_str(), aSeq); + } +} + +//======================================================================= +/*! + * Function : GetStrArray + * Purpose : Returns an array of string values associated with the ID + */ +//======================================================================= +vector SALOMEDS_AttributeParameter::GetStrArray(const string& theID) +{ + vector v; + if(_isLocal) { + SALOMEDS::Locker lock; + return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetStrArray(theID); + } + else { + SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetStrArray(theID.c_str()); + int length = aSeq->length(); + if(length) { + v.resize(length); + for(int i = 0; i < length; i++) v[i] = string(aSeq[i].in()); + } + } + return v; +} + + +//======================================================================= +/*! + * Function : IsSet + * Purpose : Returns true if for the ID of given type was assigned \n + * a value in the attribute + */ +//======================================================================= +bool SALOMEDS_AttributeParameter::IsSet(const string& theID, const int theType) +{ + if(_isLocal) { + SALOMEDS::Locker lock; + return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->IsSet(theID, (Parameter_Types)theType); + } + else + return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->IsSet(theID.c_str(), theType); +} + +//======================================================================= +/*! + * Function : RemoveID + * Purpose : Removes a parameter with given ID + */ +//======================================================================= +bool SALOMEDS_AttributeParameter::RemoveID(const string& theID, const int theType) +{ + CheckLocked(); + + if(_isLocal) { + SALOMEDS::Locker lock; + return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->RemoveID(theID, (Parameter_Types)theType); + } + else + return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->RemoveID(theID.c_str(), theType); +} + +//======================================================================= +/*! + * Function : GetFather + * Purpose : Returns a father attribute for this attribute + */ +//======================================================================= +_PTR(AttributeParameter) SALOMEDS_AttributeParameter::GetFather() +{ + SALOMEDSClient_AttributeParameter* AP = NULL; + if(_isLocal) { + SALOMEDS::Locker lock; + Handle(SALOMEDSImpl_AttributeParameter) AP_impl = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetFather(); + if(AP_impl.IsNull()) return _PTR(AttributeParameter)(AP); + AP = new SALOMEDS_AttributeParameter(AP_impl); + } + else { + SALOMEDS::AttributeParameter_var AP_impl = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetFather(); + if(CORBA::is_nil(AP_impl)) return _PTR(AttributeParameter)(AP); + AP = new SALOMEDS_AttributeParameter(AP_impl); + } + + return _PTR(AttributeParameter)(AP); +} + +//======================================================================= +/*! + * Function : HasFather + * Purpose : Returns True if the attribute has a father attribute + */ +//======================================================================= +bool SALOMEDS_AttributeParameter::HasFather() +{ + if(_isLocal) { + SALOMEDS::Locker lock; + return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->HasFather(); + } + else + return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->HasFather(); +} + +//======================================================================= +/*! + * Function : IsRoot + * Purpose : Returns True is the attribute is highest in an hierachy + */ +//======================================================================= +bool SALOMEDS_AttributeParameter::IsRoot() +{ + if(_isLocal) { + SALOMEDS::Locker lock; + return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->IsRoot(); + } + else + return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->IsRoot(); +} + +//======================================================================= +/*! + * Function : Clear + * Purpose : Clears the content of the attribute + */ +//======================================================================= +void SALOMEDS_AttributeParameter::Clear() +{ + if(_isLocal) { + SALOMEDS::Locker lock; + Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->Clear(); + } + else + SALOMEDS::AttributeParameter::_narrow(_corba_impl)->Clear(); +} + +//======================================================================= +/*! + * Function : GetIDs + * Purpose : Returns an array of all ID's of the given type + */ +//======================================================================= +vector SALOMEDS_AttributeParameter::GetIDs(const int theType) +{ + vector v; + if(_isLocal) { + SALOMEDS::Locker lock; + Handle(SALOMEDSImpl_AttributeParameter) AP_impl = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl); + return AP_impl->GetIDs((Parameter_Types)theType); + } + else { + SALOMEDS::AttributeParameter_var AP_impl = SALOMEDS::AttributeParameter::_narrow(_corba_impl); + SALOMEDS::StringSeq_var CorbaSeq = AP_impl->GetIDs(theType); + int length = CorbaSeq->length(); + if(length) { + v.resize(length); + for(int i = 0; i +#include CORBA_SERVER_HEADER(SALOMEDS) +#include CORBA_SERVER_HEADER(SALOMEDS_Attributes) + +class SALOMEDS_AttributeParameter: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeParameter +{ +public: + SALOMEDS_AttributeParameter(const Handle(SALOMEDSImpl_AttributeParameter)& theAttr); + SALOMEDS_AttributeParameter(SALOMEDS::AttributeParameter_ptr theAttr); + ~SALOMEDS_AttributeParameter(); + + virtual void SetInt(const std::string& theID, const int theValue); + virtual int GetInt(const std::string& theID); + + virtual void SetReal(const std::string& theID, const double& theValue); + virtual double GetReal(const std::string& theID); + + virtual void SetString(const std::string& theID, const std::string& theValue); + virtual std::string GetString(const std::string& theID); + + virtual void SetBool(const std::string& theID, const bool& theValue); + virtual bool GetBool(const std::string& theID); + + virtual void SetRealArray(const std::string& theID, const std::vector& theArray); + virtual std::vector GetRealArray(const std::string& theID); + + virtual void SetIntArray(const std::string& theID, const std::vector& theArray); + virtual std::vector GetIntArray(const std::string& theID); + + virtual void SetStrArray(const std::string& theID, const std::vector& theArray); + virtual std::vector GetStrArray(const std::string& theID); + + virtual bool IsSet(const std::string& theID, const int theType); + + virtual bool RemoveID(const std::string& theID, const int theType); + + virtual _PTR(AttributeParameter) GetFather(); + virtual bool HasFather(); + virtual bool IsRoot(); + + virtual void Clear(); + + virtual std::vector GetIDs(const int theType); +}; + +#endif diff --git a/src/SALOMEDS/SALOMEDS_AttributeParameter_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeParameter_i.cxx new file mode 100644 index 000000000..ff5023dbf --- /dev/null +++ b/src/SALOMEDS/SALOMEDS_AttributeParameter_i.cxx @@ -0,0 +1,347 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// +// File : SALOMEDS_AttributeParameter_i.cxx +// Author : Sergey RUIN +// Module : SALOME + + +#include "SALOMEDS_AttributeParameter_i.hxx" +#include "SALOMEDS.hxx" +#include + +#include + +using namespace std; + +//======================================================================= +/*! + * Function : SetInt + * Purpose : Associates a integer value with the ID + */ +//======================================================================= +void SALOMEDS_AttributeParameter_i::SetInt(const char* theID, CORBA::Long theValue) +{ + SALOMEDS::Locker lock; + CheckLocked(); + Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->SetInt(theID, theValue); +} + +//======================================================================= +/*! + * Function : GetInt + * Purpose : Returns a int value associated with the given ID + */ +//======================================================================= +CORBA::Long SALOMEDS_AttributeParameter_i::GetInt(const char* theID) +{ + SALOMEDS::Locker lock; + return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->GetInt(theID); +} + +//======================================================================= +/*! + * Function : SetReal + * Purpose : Associates a double value with the ID + */ +//======================================================================= +void SALOMEDS_AttributeParameter_i::SetReal(const char* theID, const CORBA::Double theValue) +{ + SALOMEDS::Locker lock; + CheckLocked(); + Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->SetReal(theID, theValue); +} + +//======================================================================= +/*! + * Function : GetReal + * Purpose : Returns a double value associated with the given ID + */ +//======================================================================= +CORBA::Double SALOMEDS_AttributeParameter_i::GetReal(const char* theID) +{ + SALOMEDS::Locker lock; + return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->GetReal(theID); +} + +//======================================================================= +/*! + * Function : SetString + * Purpose : Associates a string with the ID + */ +//======================================================================= +void SALOMEDS_AttributeParameter_i::SetString(const char* theID, const char* theValue) +{ + SALOMEDS::Locker lock; + CheckLocked(); + Handle(SALOMEDSImpl_AttributeParameter) impl = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl); + impl->SetString(theID, theValue); +} + +//======================================================================= +/*! + * Function : GetString + * Purpose : Returns a string associated with the given ID + */ +//======================================================================= +char* SALOMEDS_AttributeParameter_i::GetString(const char* theID) +{ + SALOMEDS::Locker lock; + Handle(SALOMEDSImpl_AttributeParameter) impl = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl); + CORBA::String_var c_s = CORBA::string_dup(impl->GetString(theID).c_str()); + return c_s._retn(); +} + +//======================================================================= +/*! + * Function : SetBool + * Purpose : Associates a bool value with the ID + */ +//======================================================================= +void SALOMEDS_AttributeParameter_i::SetBool(const char* theID, CORBA::Boolean theValue) +{ + SALOMEDS::Locker lock; + CheckLocked(); + Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->SetBool(theID, theValue); +} + +//======================================================================= +/*! + * Function : GetBool + * Purpose : Returns a bool value associated with the ID + */ +//======================================================================= +CORBA::Boolean SALOMEDS_AttributeParameter_i::GetBool(const char* theID) +{ + SALOMEDS::Locker lock; + return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->GetBool(theID); +} + +//======================================================================= +/*! + * Function : SetRealArray + * Purpose : Associates an array of double values with the given ID + */ +//======================================================================= +void SALOMEDS_AttributeParameter_i::SetRealArray(const char* theID, const SALOMEDS::DoubleSeq& theArray) +{ + SALOMEDS::Locker lock; + CheckLocked(); + vector v; + int length = theArray.length(); + if(length) { + v.resize(length); + for(int i = 0; iSetRealArray(theID, v); +} + +//======================================================================= +/*! + * Function : GetRealArray + * Purpose : Returns an array of double values associated with the ID + */ +//======================================================================= +SALOMEDS::DoubleSeq* SALOMEDS_AttributeParameter_i::GetRealArray(const char* theID) +{ + SALOMEDS::Locker lock; + SALOMEDS::DoubleSeq_var aSeq = new SALOMEDS::DoubleSeq; + vector v = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->GetRealArray(theID); + int length = v.size(); + if(length) { + aSeq->length(length); + for(int i = 0; i v; + int length = theArray.length(); + if(length) { + v.resize(length); + for(int i = 0; iSetIntArray(theID, v); +} + +//======================================================================= +/*! + * Function : GetIntArray + * Purpose : Returns an array of int values associated with the ID + */ +//======================================================================= +SALOMEDS::LongSeq* SALOMEDS_AttributeParameter_i::GetIntArray(const char* theID) +{ + SALOMEDS::Locker lock; + SALOMEDS::LongSeq_var aSeq = new SALOMEDS::LongSeq; + vector v = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->GetIntArray(theID); + int length = v.size(); + if(length) { + aSeq->length(length); + for(int i = 0; i v; + int length = theArray.length(); + if(length) { + v.resize(length); + for(int i = 0; iSetStrArray(theID, v); +} + +//======================================================================= +/*! + * Function : GetStrArray + * Purpose : Returns an array of string values associated with the ID + */ +//======================================================================= +SALOMEDS::StringSeq* SALOMEDS_AttributeParameter_i::GetStrArray(const char* theID) +{ + SALOMEDS::Locker lock; + SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq; + vector v = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->GetStrArray(theID); + int length = v.size(); + if(length) { + aSeq->length(length); + for(int i = 0; iIsSet(theID, (Parameter_Types)theType); +} + +//======================================================================= +/*! + * Function : RemoveID + * Purpose : Removes a parameter with given ID + */ +//======================================================================= +CORBA::Boolean SALOMEDS_AttributeParameter_i::RemoveID(const char* theID, CORBA::Long theType) +{ + SALOMEDS::Locker lock; + CheckLocked(); + return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->RemoveID(theID, (Parameter_Types)theType); +} + +//======================================================================= +/*! + * Function : GetFather + * Purpose : Returns a father attribute for this attribute + */ +//======================================================================= +SALOMEDS::AttributeParameter_ptr SALOMEDS_AttributeParameter_i::GetFather() +{ + SALOMEDS::Locker lock; + Handle(SALOMEDSImpl_AttributeParameter) impl = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl); + SALOMEDS_AttributeParameter_i* attr = new SALOMEDS_AttributeParameter_i(impl, _orb); + return attr->AttributeParameter::_this(); +} + +//======================================================================= +/*! + * Function : HasFather + * Purpose : Returns True if the attribute has a father attribute + */ +//======================================================================= +CORBA::Boolean SALOMEDS_AttributeParameter_i::HasFather() +{ + SALOMEDS::Locker lock; + return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->HasFather(); +} + +//======================================================================= +/*! + * Function : IsRoot + * Purpose : Returns True is the attribute is highest in an hierachy + */ +//======================================================================= +CORBA::Boolean SALOMEDS_AttributeParameter_i::IsRoot() +{ + SALOMEDS::Locker lock; + return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->IsRoot(); +} + +//======================================================================= +/*! + * Function : IsRoot + * Purpose : Clears the content of the attribute + */ +//======================================================================= +void SALOMEDS_AttributeParameter_i::Clear() +{ + SALOMEDS::Locker lock; + Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->Clear(); +} + + +//======================================================================= +/*! + * Function : GetIDs + * Purpose : Returns an array of all ID's of the given type + */ +//======================================================================= +SALOMEDS::StringSeq* SALOMEDS_AttributeParameter_i::GetIDs(CORBA::Long theType) +{ + SALOMEDS::Locker lock; + SALOMEDS::StringSeq_var CorbaSeq = new SALOMEDS::StringSeq; + vector A = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->GetIDs((Parameter_Types)theType); + + if(A.size()) { + int length = A.size(); + CorbaSeq->length(length); + for (int i = 0; i < length; i++) CorbaSeq[i] = CORBA::string_dup(A[i].c_str());; + } + + return CorbaSeq._retn(); +} diff --git a/src/SALOMEDS/SALOMEDS_AttributeParameter_i.hxx b/src/SALOMEDS/SALOMEDS_AttributeParameter_i.hxx new file mode 100644 index 000000000..c393a208a --- /dev/null +++ b/src/SALOMEDS/SALOMEDS_AttributeParameter_i.hxx @@ -0,0 +1,89 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// +// File : SALOMEDS_AttributeParameter_i.hxx +// Author : Sergey RUIN +// Module : SALOME +// $Header: + +#ifndef SALOMEDS_AttributeParameter_i_HeaderFile +#define SALOMEDS_AttributeParameter_i_HeaderFile + +// IDL headers +#include +#include CORBA_SERVER_HEADER(SALOMEDS_Attributes) + +#include "SALOMEDS_GenericAttribute_i.hxx" +#include "SALOMEDSImpl_AttributeParameter.hxx" + +/*! + Class: SALOMEDS_AttributeParameter + Description : AttributeParameter is a universal container of basic types +*/ + +class SALOMEDS_AttributeParameter_i: public virtual POA_SALOMEDS::AttributeParameter, + public virtual SALOMEDS_GenericAttribute_i +{ +public: + + SALOMEDS_AttributeParameter_i(const Handle(SALOMEDSImpl_AttributeParameter)& theAttr, CORBA::ORB_ptr orb) + :SALOMEDS_GenericAttribute_i(theAttr, orb) {}; + + ~SALOMEDS_AttributeParameter_i() {}; + + + virtual void SetInt(const char* theID, CORBA::Long theValue); + virtual CORBA::Long GetInt(const char* theID); + + virtual void SetReal(const char* theID, const CORBA::Double theValue); + virtual CORBA::Double GetReal(const char* theID); + + virtual void SetString(const char* theID, const char* theValue); + virtual char* GetString(const char* theID); + + virtual void SetBool(const char* theID, CORBA::Boolean theValue); + virtual CORBA::Boolean GetBool(const char* theID); + + virtual void SetRealArray(const char* theID, const SALOMEDS::DoubleSeq& theArray); + virtual SALOMEDS::DoubleSeq* GetRealArray(const char* theID); + + virtual void SetIntArray(const char* theID, const SALOMEDS::LongSeq& theArray); + virtual SALOMEDS::LongSeq* GetIntArray(const char* theID); + + virtual void SetStrArray(const char* theID, const SALOMEDS::StringSeq& theArray); + virtual SALOMEDS::StringSeq* GetStrArray(const char* theID); + + virtual CORBA::Boolean IsSet(const char* theID, CORBA::Long theType); + + virtual CORBA::Boolean RemoveID(const char* theID, CORBA::Long theType); + + virtual SALOMEDS::AttributeParameter_ptr GetFather(); + virtual CORBA::Boolean HasFather(); + virtual CORBA::Boolean IsRoot(); + + virtual void Clear(); + + virtual SALOMEDS::StringSeq* GetIDs(CORBA::Long theType); + +}; + + + + +#endif diff --git a/src/SALOMEDS/SALOMEDS_Attributes.hxx b/src/SALOMEDS/SALOMEDS_Attributes.hxx index a0c5586eb..e21925101 100644 --- a/src/SALOMEDS/SALOMEDS_Attributes.hxx +++ b/src/SALOMEDS/SALOMEDS_Attributes.hxx @@ -54,6 +54,7 @@ #include "SALOMEDSImpl_AttributeFileType.hxx" #include "SALOMEDSImpl_AttributeFlags.hxx" #include "SALOMEDSImpl_AttributeGraphic.hxx" +#include "SALOMEDSImpl_AttributeParameter.hxx" #include "SALOMEDS_GenericAttribute_i.hxx" #include "SALOMEDS_AttributeName_i.hxx" @@ -84,6 +85,7 @@ #include "SALOMEDS_AttributeFileType_i.hxx" #include "SALOMEDS_AttributeFlags_i.hxx" #include "SALOMEDS_AttributeGraphic_i.hxx" +#include "SALOMEDS_AttributeParameter_i.hxx" #define __CreateCORBAAttribute(CORBA_Name) if (strcmp(aTypeOfAttribute, #CORBA_Name) == 0) { \ Handle(SALOMEDSImpl_##CORBA_Name) A = Handle(SALOMEDSImpl_##CORBA_Name)::DownCast(theAttr); \ @@ -121,6 +123,7 @@ __CreateCORBAAttribute(AttributeFileType) \ __CreateCORBAAttribute(AttributeFlags) \ __CreateCORBAAttribute(AttributeGraphic) \ __CreateCORBAAttribute(AttributeTreeNode) \ -__CreateCORBAAttribute(AttributeUserID) +__CreateCORBAAttribute(AttributeUserID) \ +__CreateCORBAAttribute(AttributeParameter) #endif diff --git a/src/SALOMEDS/SALOMEDS_ClientAttributes.hxx b/src/SALOMEDS/SALOMEDS_ClientAttributes.hxx index 47105d5f3..c0bd6ecac 100644 --- a/src/SALOMEDS/SALOMEDS_ClientAttributes.hxx +++ b/src/SALOMEDS/SALOMEDS_ClientAttributes.hxx @@ -55,6 +55,7 @@ #include "SALOMEDSImpl_AttributeFileType.hxx" #include "SALOMEDSImpl_AttributeFlags.hxx" #include "SALOMEDSImpl_AttributeGraphic.hxx" +#include "SALOMEDSImpl_AttributeParameter.hxx" #include "SALOMEDS_GenericAttribute.hxx" #include "SALOMEDS_AttributeName.hxx" @@ -85,6 +86,7 @@ #include "SALOMEDS_AttributeFileType.hxx" #include "SALOMEDS_AttributeFlags.hxx" #include "SALOMEDS_AttributeGraphic.hxx" +#include "SALOMEDS_AttributeParameter.hxx" #define __CreateClientAttributeLocal(CORBA_Name) if (strcmp(aTypeOfAttribute.c_str(), #CORBA_Name) == 0) { \ Handle(SALOMEDSImpl_##CORBA_Name) A = Handle(SALOMEDSImpl_##CORBA_Name)::DownCast(theGA); \ @@ -124,7 +126,8 @@ __CreateClientAttributeLocal(AttributeFileType) \ __CreateClientAttributeLocal(AttributeFlags) \ __CreateClientAttributeLocal(AttributeGraphic) \ __CreateClientAttributeLocal(AttributeTreeNode) \ -__CreateClientAttributeLocal(AttributeUserID) +__CreateClientAttributeLocal(AttributeUserID) \ +__CreateClientAttributeLocal(AttributeParameter) #define __CreateGenericClientAttributeCORBA \ __CreateClientAttributeCORBA(AttributeReal) \ @@ -154,6 +157,7 @@ __CreateClientAttributeCORBA(AttributeFileType) \ __CreateClientAttributeCORBA(AttributeFlags) \ __CreateClientAttributeCORBA(AttributeGraphic) \ __CreateClientAttributeCORBA(AttributeTreeNode) \ -__CreateClientAttributeCORBA(AttributeUserID) +__CreateClientAttributeCORBA(AttributeUserID) \ +__CreateClientAttributeCORBA(AttributeParameter) #endif diff --git a/src/SALOMEDS/SALOMEDS_Driver_i.cxx b/src/SALOMEDS/SALOMEDS_Driver_i.cxx index 2f4f085ca..d9995703f 100644 --- a/src/SALOMEDS/SALOMEDS_Driver_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Driver_i.cxx @@ -20,6 +20,7 @@ #include "SALOMEDS_Driver_i.hxx" +#include #include "utilities.h" #include "SALOMEDS_SObject_i.hxx" #include "SALOMEDS_SComponent_i.hxx" @@ -33,44 +34,38 @@ SALOMEDS_Driver_i::~SALOMEDS_Driver_i() { } -unsigned char* SALOMEDS_Driver_i::Save(const Handle(SALOMEDSImpl_SComponent)& theComponent, - const TCollection_AsciiString& theURL, - long& theStreamLength, - bool isMultiFile) +Handle(SALOMEDSImpl_TMPFile) SALOMEDS_Driver_i::Save(const Handle(SALOMEDSImpl_SComponent)& theComponent, + const TCollection_AsciiString& theURL, + long& theStreamLength, + bool isMultiFile) { SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb); - SALOMEDS::TMPFile_var aStream; CORBA::String_var url = CORBA::string_dup(theURL.ToCString()); + SALOMEDS::unlock(); - aStream = _driver->Save(sco.in(), url, isMultiFile); + SALOMEDS::TMPFile_var aStream = _driver->Save(sco.in(), url, isMultiFile); + Handle(SALOMEDSImpl_TMPFile) aTMPFile(new SALOMEDS_TMPFile_i(aStream._retn())); + theStreamLength = aTMPFile->Size(); SALOMEDS::lock(); - theStreamLength = aStream->length(); - unsigned char* aRetStream = NULL; - if (theStreamLength > 0) { - aRetStream = new unsigned char[theStreamLength]; - memcpy(aRetStream, aStream->NP_data(), theStreamLength); - } - return aRetStream; + + return aTMPFile; } -unsigned char* SALOMEDS_Driver_i::SaveASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent, - const TCollection_AsciiString& theURL, - long& theStreamLength, - bool isMultiFile) +Handle(SALOMEDSImpl_TMPFile) SALOMEDS_Driver_i::SaveASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent, + const TCollection_AsciiString& theURL, + long& theStreamLength, + bool isMultiFile) { SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb); - SALOMEDS::TMPFile_var aStream; CORBA::String_var url = CORBA::string_dup(theURL.ToCString()); + SALOMEDS::unlock(); - aStream = _driver->SaveASCII(sco.in(), url, isMultiFile); + SALOMEDS::TMPFile_var aStream = _driver->SaveASCII(sco.in(), url, isMultiFile); + Handle(SALOMEDSImpl_TMPFile) aTMPFile(new SALOMEDS_TMPFile_i(aStream._retn())); + theStreamLength = aTMPFile->Size(); SALOMEDS::lock(); - theStreamLength = aStream->length(); - unsigned char* aRetStream = NULL; - if (theStreamLength > 0) { - aRetStream = new unsigned char[theStreamLength]; - memcpy(aRetStream, aStream->NP_data(), theStreamLength); - } - return aRetStream; + + return aTMPFile; } bool SALOMEDS_Driver_i::Load(const Handle(SALOMEDSImpl_SComponent)& theComponent, @@ -92,6 +87,7 @@ bool SALOMEDS_Driver_i::Load(const Handle(SALOMEDSImpl_SComponent)& theComponent SALOMEDS::unlock(); bool isOk = _driver->Load(sco.in(), aStream.in(), url, isMultiFile); SALOMEDS::lock(); + return isOk; } @@ -114,12 +110,14 @@ bool SALOMEDS_Driver_i::LoadASCII(const Handle(SALOMEDSImpl_SComponent)& theComp SALOMEDS::unlock(); bool isOk = _driver->LoadASCII(sco.in(), aStream.in(), url, isMultiFile); SALOMEDS::lock(); + return isOk; } void SALOMEDS_Driver_i::Close(const Handle(SALOMEDSImpl_SComponent)& theComponent) { SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb); + SALOMEDS::unlock(); _driver->Close(sco.in()); SALOMEDS::lock(); @@ -134,9 +132,11 @@ TCollection_AsciiString SALOMEDS_Driver_i::IORToLocalPersistentID(const Handle(S { SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (theSObject, _orb); CORBA::String_var ior = CORBA::string_dup(IORString.ToCString()); + SALOMEDS::unlock(); CORBA::String_var pers_string =_driver->IORToLocalPersistentID(so.in(), ior.in(), isMultiFile, isASCII); SALOMEDS::lock(); + return TCollection_AsciiString(pers_string); } @@ -157,35 +157,30 @@ TCollection_AsciiString SALOMEDS_Driver_i::LocalPersistentIDToIOR(const Handle(S bool SALOMEDS_Driver_i::CanCopy(const Handle(SALOMEDSImpl_SObject)& theObject) { SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (theObject, _orb); + SALOMEDS::unlock(); bool isOk = _driver->CanCopy(so.in()); SALOMEDS::lock(); + return isOk; } -unsigned char* SALOMEDS_Driver_i::CopyFrom(const Handle(SALOMEDSImpl_SObject)& theObject, - int& theObjectID, - long& theStreamLength) +Handle(SALOMEDSImpl_TMPFile) SALOMEDS_Driver_i::CopyFrom(const Handle(SALOMEDSImpl_SObject)& theObject, + int& theObjectID, + long& theStreamLength) { SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (theObject, _orb); - SALOMEDS::TMPFile_var aStream; - CORBA::Long anObjectID; SALOMEDS::unlock(); - aStream = _driver->CopyFrom(so.in(), anObjectID); - SALOMEDS::lock(); - + CORBA::Long anObjectID; + SALOMEDS::TMPFile_var aStream = _driver->CopyFrom(so.in(), anObjectID); + Handle(SALOMEDSImpl_TMPFile) aTMPFile(new SALOMEDS_TMPFile_i(aStream._retn())); + theStreamLength = aTMPFile->Size(); theObjectID = anObjectID; - theStreamLength = aStream->length(); - - unsigned char* aRetStream = NULL; - if(theStreamLength > 0) { - aRetStream = new unsigned char[theStreamLength]; - memcpy(aRetStream, aStream->NP_data(), theStreamLength); - } + SALOMEDS::lock(); - return aRetStream; + return aTMPFile; } bool SALOMEDS_Driver_i::CanPaste(const TCollection_AsciiString& theComponentName, int theObjectID) @@ -217,30 +212,24 @@ TCollection_AsciiString SALOMEDS_Driver_i::PasteInto(const unsigned char* theStr return TCollection_AsciiString((char*)ret_so->GetID()); } -unsigned char* SALOMEDS_Driver_i::DumpPython(const Handle(SALOMEDSImpl_Study)& theStudy, - bool isPublished, - bool& isValidScript, - long& theStreamLength) +Handle(SALOMEDSImpl_TMPFile) SALOMEDS_Driver_i::DumpPython(const Handle(SALOMEDSImpl_Study)& theStudy, + bool isPublished, + bool& isValidScript, + long& theStreamLength) { SALOMEDS_Study_i * st_servant = new SALOMEDS_Study_i (theStudy, _orb); SALOMEDS::Study_var st = SALOMEDS::Study::_narrow(st_servant->_this()); - Engines::TMPFile_var aStream; - CORBA::Boolean aValidScript, aPublished; - aPublished = isPublished; Engines::Component_ptr aComponent = Engines::Component::_narrow(_driver); + SALOMEDS::unlock(); - aStream = aComponent->DumpPython(st.in(), aPublished, aValidScript); - SALOMEDS::lock(); + CORBA::Boolean aValidScript, aPublished = isPublished; + Engines::TMPFile_var aStream = aComponent->DumpPython(st.in(), aPublished, aValidScript); + Handle(SALOMEDSImpl_TMPFile) aTMPFile(new Engines_TMPFile_i(aStream._retn())); + theStreamLength = aTMPFile->Size(); isValidScript = aValidScript; - theStreamLength = aStream->length(); - unsigned char* aRetStream = NULL; - - if(theStreamLength > 0) { - aRetStream = new unsigned char[theStreamLength]; - memcpy(aRetStream, aStream->NP_data(), theStreamLength); - } + SALOMEDS::lock(); - return aRetStream; + return aTMPFile; } //############################################################################################################### diff --git a/src/SALOMEDS/SALOMEDS_Driver_i.hxx b/src/SALOMEDS/SALOMEDS_Driver_i.hxx index ae49cdba2..cf689687b 100644 --- a/src/SALOMEDS/SALOMEDS_Driver_i.hxx +++ b/src/SALOMEDS/SALOMEDS_Driver_i.hxx @@ -52,15 +52,15 @@ public: return TCollection_AsciiString(ior); } - virtual unsigned char* Save(const Handle(SALOMEDSImpl_SComponent)& theComponent, - const TCollection_AsciiString& theURL, - long& theStreamLength, - bool isMultiFile); - - virtual unsigned char* SaveASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent, - const TCollection_AsciiString& theURL, - long& theStreamLength, - bool isMultiFile); + virtual Handle(SALOMEDSImpl_TMPFile) Save(const Handle(SALOMEDSImpl_SComponent)& theComponent, + const TCollection_AsciiString& theURL, + long& theStreamLength, + bool isMultiFile); + + virtual Handle(SALOMEDSImpl_TMPFile) SaveASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent, + const TCollection_AsciiString& theURL, + long& theStreamLength, + bool isMultiFile); virtual bool Load(const Handle(SALOMEDSImpl_SComponent)& theComponent, const unsigned char* theStream, @@ -95,10 +95,10 @@ public: virtual bool CanCopy(const Handle(SALOMEDSImpl_SObject)& theObject); - virtual unsigned char* CopyFrom(const Handle(SALOMEDSImpl_SObject)& theObject, - int& theObjectID, - long& theStreamLength); - + virtual Handle(SALOMEDSImpl_TMPFile) CopyFrom(const Handle(SALOMEDSImpl_SObject)& theObject, + int& theObjectID, + long& theStreamLength); + virtual bool CanPaste(const TCollection_AsciiString& theComponentName, int theObjectID); virtual TCollection_AsciiString PasteInto(const unsigned char* theStream, @@ -106,10 +106,10 @@ public: int theObjectID, const Handle(SALOMEDSImpl_SObject)& theObject); - virtual unsigned char* DumpPython(const Handle(SALOMEDSImpl_Study)& theStudy, - bool isPublished, - bool& isValidScript, - long& theStreamLength); + virtual Handle(SALOMEDSImpl_TMPFile) DumpPython(const Handle(SALOMEDSImpl_Study)& theStudy, + bool isPublished, + bool& isValidScript, + long& theStreamLength); }; #include "SALOME_NamingService.hxx" diff --git a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx index dcfc75494..c3a37cdd5 100644 --- a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx +++ b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx @@ -131,7 +131,7 @@ SALOMEDS::GenericAttribute_ptr SALOMEDS_GenericAttribute_i::CreateAttribute //=========================================================================== // PRIVATE FUNCTIONS //=========================================================================== -long SALOMEDS_GenericAttribute_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal) +CORBA::Long SALOMEDS_GenericAttribute_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal) { #ifdef WIN32 long pid = (long)_getpid(); diff --git a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.hxx b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.hxx index def9134a6..16694f7e8 100644 --- a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.hxx +++ b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.hxx @@ -57,7 +57,7 @@ public: static SALOMEDS::GenericAttribute_ptr CreateAttribute(const Handle(TDF_Attribute)& theAttr, CORBA::ORB_ptr theOrb); - virtual long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); + virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); }; #endif diff --git a/src/SALOMEDS/SALOMEDS_IParameters.cxx b/src/SALOMEDS/SALOMEDS_IParameters.cxx new file mode 100644 index 000000000..6540d9fee --- /dev/null +++ b/src/SALOMEDS/SALOMEDS_IParameters.cxx @@ -0,0 +1,279 @@ +// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// +#include "SALOMEDS_IParameters.hxx" +#include + +#include + +using namespace std; + +#define PT_INTEGER 0 +#define PT_REAL 1 +#define PT_BOOLEAN 2 +#define PT_STRING 3 +#define PT_REALARRAY 4 +#define PT_INTARRAY 5 +#define PT_STRARRAY 6 + +#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" + +/*! + Constructor +*/ +SALOMEDS_IParameters::SALOMEDS_IParameters(const _PTR(AttributeParameter)& ap) +{ + if(!ap) return; + _ap = ap; + _PTR(SObject) so = _ap->GetSObject(); + _study = so->GetStudy(); +} + +SALOMEDS_IParameters::~SALOMEDS_IParameters() +{ + _compNames.clear(); +} + +int SALOMEDS_IParameters::append(const string& listName, const string& value) +{ + if(!_ap) return -1; + 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_ && + listName != _AP_PROPERTIES_LIST_) { + append(_AP_LISTS_LIST_, listName); + } + _ap->SetStrArray(listName, v); + } + v = _ap->GetStrArray(listName); + v.push_back(value); + _ap->SetStrArray(listName, v); + return (v.size()-1); +} + +int SALOMEDS_IParameters::nbValues(const string& listName) +{ + if(!_ap) return -1; + if(!_ap->IsSet(listName, PT_STRARRAY)) return 0; + vector v = _ap->GetStrArray(listName); + return v.size(); +} + +vector SALOMEDS_IParameters::getValues(const string& listName) +{ + 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) +{ + if(!_ap) return ""; + if(!_ap->IsSet(listName, PT_STRARRAY)) return ""; + vector v = _ap->GetStrArray(listName); + if(index >= v.size()) return ""; + return v[index]; +} + +vector SALOMEDS_IParameters::getLists() +{ + 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) +{ + if(!_ap) return; + 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(parameterName); + v.push_back(value); + _ap->SetStrArray(entry, v); +} + + +string SALOMEDS_IParameters::getParameter(const string& entry, const string& parameterName) +{ + if(!_ap) return ""; + if(!_ap->IsSet(entry, PT_STRARRAY)) return ""; + vector v = _ap->GetStrArray(entry); + int length = v.size(); + for(int i = 0; i SALOMEDS_IParameters::getAllParameterNames(const string& entry) +{ + vector v, names; + if(!_ap) return v; + if(!_ap->IsSet(entry, PT_STRARRAY)) return v; + v = _ap->GetStrArray(entry); + int length = v.size(); + for(int i = 0; i SALOMEDS_IParameters::getAllParameterValues(const string& entry) +{ + vector v, values; + if(!_ap) return v; + if(!_ap->IsSet(entry, PT_STRARRAY)) return v; + v = _ap->GetStrArray(entry); + int length = v.size(); + for(int i = 1; iIsSet(entry, PT_STRARRAY)) return -1; + return _ap->GetStrArray(entry).size()/2; +} + +vector SALOMEDS_IParameters::getEntries() +{ + 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) +{ + if(!_ap) return; + if(!_ap->IsSet(name, PT_STRING)) { + append(_AP_PROPERTIES_LIST_, name); //Add the property to the internal list of properties + } + _ap->SetString(name, value); +} + +string SALOMEDS_IParameters::getProperty(const string& name) +{ + if(!_ap) return ""; + if(!_ap->IsSet(name, PT_STRING)) return ""; + return _ap->GetString(name); +} + +vector SALOMEDS_IParameters::getProperties() +{ + 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) +{ + TCollection_AsciiString val((char*)value.c_str()); + vector v; + int pos; + if(fromEnd) pos = val.SearchFromEnd(separator); + else pos = val.Search(separator); + + if(pos < 0) { + v.push_back(value); + return v; + } + + TCollection_AsciiString part1, part2; + part1 = val.SubString(1, pos-1); + part2 = val.SubString(pos+1, val.Length()); + v.push_back(part1.ToCString()); + v.push_back(part2.ToCString()); + return v; +} + +string SALOMEDS_IParameters::encodeEntry(const string& entry, const string& compName) +{ + string tail(entry, 6, entry.length()-1); + string newEntry(compName); + newEntry+=("_"+tail); + return newEntry; +} + +string SALOMEDS_IParameters::decodeEntry(const 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); + + if(_compNames.find(compName) == _compNames.end()) { + _PTR(SObject) so = _study->FindComponent(compName); + if(!so) return entry; + compID = so->GetID(); + _compNames[compName] = compID; + } + else compID = _compNames[compName]; + + string newEntry(compID); + newEntry += (":"+tail); + + return newEntry; +} + +void SALOMEDS_IParameters::setDumpPython(_PTR(Study) study, const string& theID) +{ + string anID; + if(theID == "") anID = getDefaultVisualComponent(); + else anID = theID; + + _PTR(AttributeParameter) ap = study->GetCommonParameters(anID, 0); + ap->SetBool(_AP_DUMP_PYTHON_, true); +} + +bool SALOMEDS_IParameters::isDumpPython(_PTR(Study) study, const string& theID) +{ + string anID; + if(theID == "") anID = getDefaultVisualComponent(); + else anID = theID; + + _PTR(AttributeParameter) ap = study->GetCommonParameters(anID, 0); + if(!ap) return false; + if(!ap->IsSet(_AP_DUMP_PYTHON_, PT_BOOLEAN)) return false; + return (bool)ap->GetBool(_AP_DUMP_PYTHON_); +} + +string SALOMEDS_IParameters::getDefaultVisualComponent() +{ + return "Interface Applicative"; +} + + + diff --git a/src/SALOMEDS/SALOMEDS_IParameters.hxx b/src/SALOMEDS/SALOMEDS_IParameters.hxx new file mode 100644 index 000000000..4111e83f9 --- /dev/null +++ b/src/SALOMEDS/SALOMEDS_IParameters.hxx @@ -0,0 +1,149 @@ +// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// +#ifndef SALOMEDS_IParameters_H +#define SALOMEDS_IParameters_H + +#include +#include +#include + +#include "SALOMEDSClient.hxx" + +/*! + Class which an interface to store the parameters of the objects +*/ +class SALOMEDS_IParameters +{ +public: + SALOMEDS_IParameters(const _PTR(AttributeParameter)& ap); + + virtual ~SALOMEDS_IParameters(); + + /*! + Appends a string value to a named list. + Returns a number of the added value. + Note: the name of the list MUST be unique + */ + virtual int append(const std::string& listName, const std::string& value); + + /*! + Returns a number elements in the list + */ + virtual int nbValues(const std::string& listName); + + /*! + Returns a list of values in the list + */ + virtual std::vector getValues(const std::string& listName); + + /*! + Returns a value with given %index, where %index is in range [0:nbValues-1] + */ + virtual std::string getValue(const std::string& listName, int index); + + /*! + Returns a list all entries lists + */ + virtual std::vector getLists(); + + /*! + Sets a new named parameter value for the given entry + */ + virtual void setParameter(const std::string& entry, const std::string& parameterName, const std::string& value); + + /*! + Gets a named parameter value for the given entry + */ + virtual std::string getParameter(const std::string& entry, const std::string& parameterName); + + /*! + Returns all parameter names of the given entry + */ + virtual std::vector getAllParameterNames(const std::string& entry); + + /*! + Returns all parameter values of the given entry + */ + virtual std::vector getAllParameterValues(const std::string& entry); + + /*! + Returns a number of parameters of the given entry + */ + virtual int getNbParameters(const std::string& entry); + + /*! + Returns a list all entries + */ + virtual std::vector getEntries(); + + /*! + Sets a global named property value + */ + virtual void setProperty(const std::string& name, const std::string& value); + + /*! + Gets a value of global named property + */ + virtual std::string getProperty(const std::string& name); + + /*! + Returns a list all properties + */ + virtual std::vector getProperties(); + + /*! + Breaks a value string in two parts which is divided by %separator. + If fromEnd is True the search of separator starts from the end of the string + */ + virtual std::vector parseValue(const std::string& value, const char separator, bool fromEnd = true); + + + /*! + Returns encoded entry that is a relative entry for the component + */ + virtual std::string encodeEntry(const std::string& entry, const std::string& compName); + + /*! + Returns decoded entry that is an absolute entry + */ + virtual std::string decodeEntry(const std::string& entry); + + /*! + Enables/Disables the dumping visual parameters + */ + static void setDumpPython(_PTR(Study) study, const std::string& theID = ""); + + /*! + Returns whether there is the dumping visual parameters + */ + static bool isDumpPython(_PTR(Study) study, const std::string& theID = ""); + + /*! + Returns a default name of the component where the visula parameters are stored. + */ + static std::string getDefaultVisualComponent(); + +private: + _PTR(AttributeParameter) _ap; + _PTR(Study) _study; + std::map _compNames; +}; + + +#endif diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.cxx b/src/SALOMEDS/SALOMEDS_SObject_i.cxx index 1a8a25c91..ef0b64640 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.cxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.cxx @@ -205,7 +205,7 @@ CORBA::Boolean SALOMEDS_SObject_i::ReferencedObject(SALOMEDS::SObject_out obj) * Purpose : */ //============================================================================ -CORBA::Boolean SALOMEDS_SObject_i::FindSubObject(long atag, SALOMEDS::SObject_out obj) +CORBA::Boolean SALOMEDS_SObject_i::FindSubObject(CORBA::Long atag, SALOMEDS::SObject_out obj) { SALOMEDS::Locker lock; Handle(SALOMEDSImpl_SObject) aSubObj; @@ -318,7 +318,7 @@ char* SALOMEDS_SObject_i::GetIOR() //=========================================================================== // PRIVATE FUNCTIONS //=========================================================================== -long SALOMEDS_SObject_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal) +CORBA::Long SALOMEDS_SObject_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal) { #ifdef WIN32 long pid = (long)_getpid(); diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.hxx b/src/SALOMEDS/SALOMEDS_SObject_i.hxx index 4a04250d5..c4e4318fd 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.hxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.hxx @@ -60,7 +60,7 @@ public: virtual SALOMEDS::SObject_ptr GetFather() ; virtual CORBA::Boolean FindAttribute(SALOMEDS::GenericAttribute_out anAttribute, const char* aTypeOfAttribute); virtual CORBA::Boolean ReferencedObject(SALOMEDS::SObject_out obj) ; - virtual CORBA::Boolean FindSubObject(long atag, SALOMEDS::SObject_out obj ); + virtual CORBA::Boolean FindSubObject(CORBA::Long atag, SALOMEDS::SObject_out obj ); virtual SALOMEDS::Study_ptr GetStudy() ; virtual char* Name(); @@ -76,7 +76,7 @@ public: virtual CORBA::Short Tag(); virtual CORBA::Short Depth(); - virtual long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); + virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); }; #endif diff --git a/src/SALOMEDS/SALOMEDS_Study.cxx b/src/SALOMEDS/SALOMEDS_Study.cxx index 17e3fcba0..67220592e 100644 --- a/src/SALOMEDS/SALOMEDS_Study.cxx +++ b/src/SALOMEDS/SALOMEDS_Study.cxx @@ -34,6 +34,7 @@ #include "SALOMEDS_ChildIterator.hxx" #include "SALOMEDS_SComponentIterator.hxx" #include "SALOMEDS_AttributeStudyProperties.hxx" +#include "SALOMEDS_AttributeParameter.hxx" #include "SALOMEDS_UseCaseBuilder.hxx" #include "SALOMEDSImpl_SComponent.hxx" @@ -42,6 +43,7 @@ #include "SALOMEDSImpl_ChildIterator.hxx" #include "SALOMEDSImpl_SComponentIterator.hxx" #include "SALOMEDSImpl_AttributeStudyProperties.hxx" +#include "SALOMEDSImpl_AttributeParameter.hxx" #include "SALOMEDSImpl_UseCaseBuilder.hxx" #include "SALOMEDS_Driver_i.hxx" @@ -634,10 +636,10 @@ void SALOMEDS_Study::EnableUseCaseAutoFilling(bool isEnabled) else _corba_impl->EnableUseCaseAutoFilling(isEnabled); } -bool SALOMEDS_Study::DumpStudy(const std::string& thePath, const std::string& theBaseName, bool isPublished) +bool SALOMEDS_Study::DumpStudy(const string& thePath, const string& theBaseName, bool isPublished) { //SRN: Pure CORBA DumpStudy as it does more cleaning than the local one - bool ret = _corba_impl->DumpStudy((char*)thePath.c_str(), (char*)theBaseName.c_str(), isPublished); + bool ret = _corba_impl->DumpStudy(thePath.c_str(), theBaseName.c_str(), isPublished); return ret; } @@ -682,3 +684,34 @@ SALOMEDS::Study_ptr SALOMEDS_Study::GetStudy() return SALOMEDS::Study::_nil(); } + +_PTR(AttributeParameter) SALOMEDS_Study::GetCommonParameters(const string& theID, int theSavePoint) +{ + SALOMEDSClient_AttributeParameter* AP = NULL; + if(theSavePoint >= 0) { + if (_isLocal) { + SALOMEDS::Locker lock; + AP = new SALOMEDS_AttributeParameter(_local_impl->GetCommonParameters(theID.c_str(), theSavePoint)); + } + else { + AP = new SALOMEDS_AttributeParameter(_corba_impl->GetCommonParameters(theID.c_str(), theSavePoint)); + } + } + return _PTR(AttributeParameter)(AP); +} + +_PTR(AttributeParameter) SALOMEDS_Study::GetModuleParameters(const string& theID, + const string& theModuleName, int theSavePoint) +{ + SALOMEDSClient_AttributeParameter* AP = NULL; + if(theSavePoint > 0) { + if (_isLocal) { + SALOMEDS::Locker lock; + AP = new SALOMEDS_AttributeParameter(_local_impl->GetModuleParameters(theID.c_str(), theModuleName.c_str(), theSavePoint)); + } + else { + AP = new SALOMEDS_AttributeParameter(_corba_impl->GetModuleParameters(theID.c_str(), theModuleName.c_str(), theSavePoint)); + } + } + return _PTR(AttributeParameter)(AP); +} diff --git a/src/SALOMEDS/SALOMEDS_Study.hxx b/src/SALOMEDS/SALOMEDS_Study.hxx index db2ce6999..8ac27aa70 100644 --- a/src/SALOMEDS/SALOMEDS_Study.hxx +++ b/src/SALOMEDS/SALOMEDS_Study.hxx @@ -86,8 +86,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); + virtual _PTR(AttributeParameter) GetCommonParameters(const std::string& theID, int theSavePoint); + virtual _PTR(AttributeParameter) GetModuleParameters(const std::string& theID, + const std::string& theModuleName, int theSavePoint); std::string ConvertObjectToIOR(CORBA::Object_ptr theObject); CORBA::Object_ptr ConvertIORToObject(const std::string& theIOR); diff --git a/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx b/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx index 1bcaf8caa..0a12c883b 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx @@ -456,7 +456,7 @@ PortableServer::POA_ptr SALOMEDS_StudyManager_i::GetPOA(const SALOMEDS::Study_pt //=========================================================================== // PRIVATE FUNCTIONS //=========================================================================== -long SALOMEDS_StudyManager_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal) +CORBA::Long SALOMEDS_StudyManager_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal) { #ifdef WIN32 long pid = (long)_getpid(); diff --git a/src/SALOMEDS/SALOMEDS_StudyManager_i.hxx b/src/SALOMEDS/SALOMEDS_StudyManager_i.hxx index ef428ed4c..2fd961750 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager_i.hxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager_i.hxx @@ -142,7 +142,7 @@ public: void ping(){}; - virtual long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); + virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); static PortableServer::POA_ptr GetPOA(const SALOMEDS::Study_ptr theStudy); }; diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index 6db403acb..d5f80fb03 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -27,6 +27,7 @@ #include "SALOMEDS_UseCaseIterator_i.hxx" #include "SALOMEDS_GenericAttribute_i.hxx" #include "SALOMEDS_AttributeStudyProperties_i.hxx" +#include "SALOMEDS_AttributeParameter_i.hxx" #include "SALOMEDS_ChildIterator_i.hxx" #include "SALOMEDS_Driver_i.hxx" #include "SALOMEDS.hxx" @@ -35,7 +36,9 @@ #include "SALOMEDSImpl_SComponent.hxx" #include "SALOMEDSImpl_UseCaseBuilder.hxx" #include "SALOMEDSImpl_AttributeStudyProperties.hxx" +#include "SALOMEDSImpl_AttributeParameter.hxx" #include "SALOMEDSImpl_ChildIterator.hxx" +#include "SALOMEDSImpl_IParameters.hxx" #include #include @@ -737,7 +740,9 @@ void SALOMEDS_Study_i::UndoPostponed(CORBA::Long theWay) * Purpose : */ //============================================================================ -CORBA::Boolean SALOMEDS_Study_i::DumpStudy(const char* thePath, const char* theBaseName, CORBA::Boolean isPublished) +CORBA::Boolean SALOMEDS_Study_i::DumpStudy(const char* thePath, + const char* theBaseName, + CORBA::Boolean isPublished) { SALOMEDS::Locker lock; @@ -748,10 +753,53 @@ CORBA::Boolean SALOMEDS_Study_i::DumpStudy(const char* thePath, const char* theB return ret; } +//============================================================================ +/*! Function : GetCommonParameters + * Purpose : + */ +//============================================================================ +SALOMEDS::AttributeParameter_ptr SALOMEDS_Study_i::GetCommonParameters(const char* theID, CORBA::Long theSavePoint) +{ + SALOMEDS::Locker lock; + + Handle(SALOMEDSImpl_AttributeParameter) anAttr = _impl->GetCommonParameters(theID, theSavePoint); + SALOMEDS_AttributeParameter_i* SP = new SALOMEDS_AttributeParameter_i(anAttr, _orb); + return SP->AttributeParameter::_this(); +} + +//============================================================================ +/*! Function : GetCommonModuleParameters + * Purpose : + */ +//============================================================================ +SALOMEDS::AttributeParameter_ptr SALOMEDS_Study_i::GetModuleParameters(const char* theID, + const char* theModuleName, + CORBA::Long theSavePoint) +{ + SALOMEDS::Locker lock; + + Handle(SALOMEDSImpl_AttributeParameter) anAttr = _impl->GetModuleParameters(theID, theModuleName, theSavePoint); + SALOMEDS_AttributeParameter_i* SP = new SALOMEDS_AttributeParameter_i(anAttr, _orb); + return SP->AttributeParameter::_this(); +} + +//============================================================================ +/*! Function : GetDefaultScript + * Purpose : + */ +//============================================================================ +char* SALOMEDS_Study_i::GetDefaultScript(const char* theModuleName, const char* theShift) +{ + SALOMEDS::Locker lock; + + string script = SALOMEDSImpl_IParameters::getDefaultScript(_impl, theModuleName, theShift); + return CORBA::string_dup(script.c_str()); +} + //=========================================================================== // PRIVATE FUNCTIONS //=========================================================================== -long SALOMEDS_Study_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal) +CORBA::Long SALOMEDS_Study_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal) { #ifdef WIN32 long pid = (long)_getpid(); diff --git a/src/SALOMEDS/SALOMEDS_Study_i.hxx b/src/SALOMEDS/SALOMEDS_Study_i.hxx index b10719216..2915735c8 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.hxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.hxx @@ -279,10 +279,17 @@ public: // theWay = -1: get back to the list of postponed #endif - virtual CORBA::Boolean DumpStudy(const char* thePath, const char* theBaseName, CORBA::Boolean isPublished); + 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); + + virtual char* GetDefaultScript(const char* theModuleName, const char* theShift); + + virtual CORBA::Boolean DumpStudy(const char* thePath, const char* theBaseName, CORBA::Boolean isPublished); virtual Handle(SALOMEDSImpl_Study) GetImpl() { return _impl; } - virtual long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); + virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); }; #endif diff --git a/src/SALOMEDS/SALOMEDS_TMPFile_i.cxx b/src/SALOMEDS/SALOMEDS_TMPFile_i.cxx new file mode 100644 index 000000000..8f9a28845 --- /dev/null +++ b/src/SALOMEDS/SALOMEDS_TMPFile_i.cxx @@ -0,0 +1,96 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// +// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server +// File : SALOMEDSImpl_SObject.cxx +// Author : Sergey RUIN +// Module : SALOME + + +#include "SALOMEDS_TMPFile_i.hxx" + +#include +#include + +#include + + +IMPLEMENT_STANDARD_HANDLE( SALOMEDS_TMPFile_i, SALOMEDSImpl_TMPFile ) +IMPLEMENT_STANDARD_RTTIEXT( SALOMEDS_TMPFile_i, SALOMEDSImpl_TMPFile ) + +SALOMEDS_TMPFile_i +::SALOMEDS_TMPFile_i(SALOMEDS::TMPFile* theStream): + myStream(theStream) +{} + +size_t +SALOMEDS_TMPFile_i +::Size() +{ + if(!&myStream.in()) + return 0; + + return myStream->length(); +} + +SALOMEDSImpl_TMPFile::TOctet& +SALOMEDS_TMPFile_i +::Get(size_t theIndex) +{ + if(!&myStream.in()) + throw std::out_of_range("SALOMEDS_TMPFile_i::Get(size_t) const - !&myStream.in()"); + + if(theIndex < 0 || theIndex >= myStream->length()) + throw std::out_of_range("SALOMEDS_TMPFile_i::Get(size_t) const - theIndex < 0 || theIndex >= myStream->length()"); + + return myStream[theIndex]; +} + + +//----------------------------------------------------------------------------- +IMPLEMENT_STANDARD_HANDLE( Engines_TMPFile_i, SALOMEDSImpl_TMPFile ) +IMPLEMENT_STANDARD_RTTIEXT( Engines_TMPFile_i, SALOMEDSImpl_TMPFile ) + +Engines_TMPFile_i +::Engines_TMPFile_i(Engines::TMPFile* theStream): + myStream(theStream) +{} + +size_t +Engines_TMPFile_i +::Size() +{ + if(!&myStream.in()) + return 0; + + return myStream->length(); +} + +SALOMEDSImpl_TMPFile::TOctet& +Engines_TMPFile_i +::Get(size_t theIndex) +{ + if(!&myStream.in()) + throw std::out_of_range("Engines_TMPFile_i::Get(size_t) const - !&myStream.in()"); + + if(theIndex < 0 || theIndex >= myStream->length()) + throw std::out_of_range("Engines_TMPFile_i::Get(size_t) const - theIndex < 0 || theIndex >= myStream->length()"); + + return myStream[theIndex]; +} diff --git a/src/SALOMEDS/SALOMEDS_TMPFile_i.hxx b/src/SALOMEDS/SALOMEDS_TMPFile_i.hxx new file mode 100644 index 000000000..124d08dbd --- /dev/null +++ b/src/SALOMEDS/SALOMEDS_TMPFile_i.hxx @@ -0,0 +1,70 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// + +#ifndef __SALOMEDSIMPL_TMPFILE_I_H__ +#define __SALOMEDSIMPL_TMPFILE_I_H__ + +// IDL headers +#include "SALOMEconfig.h" +#include CORBA_SERVER_HEADER(SALOMEDS) +#include CORBA_SERVER_HEADER(SALOME_Component) + +#include "SALOMEDSImpl_TMPFile.hxx" + + +//----------------------------------------------------------------------------- +DEFINE_STANDARD_HANDLE( SALOMEDS_TMPFile_i, SALOMEDSImpl_TMPFile ); + +class SALOMEDS_TMPFile_i : public SALOMEDSImpl_TMPFile +{ +public: + SALOMEDS_TMPFile_i(SALOMEDS::TMPFile* theStream); + + virtual size_t Size(); + + virtual TOctet& Get(size_t); + + DEFINE_STANDARD_RTTI( SALOMEDS_TMPFile_i ); + +protected: + SALOMEDS::TMPFile_var myStream; +}; + + +//----------------------------------------------------------------------------- +DEFINE_STANDARD_HANDLE( Engines_TMPFile_i, SALOMEDSImpl_TMPFile ); + +class Engines_TMPFile_i : public SALOMEDSImpl_TMPFile +{ +public: + Engines_TMPFile_i(Engines::TMPFile* theStream); + + virtual size_t Size(); + + virtual TOctet& Get(size_t); + + DEFINE_STANDARD_RTTI( Engines_TMPFile_i ); + +protected: + Engines::TMPFile_var myStream; +}; + + +#endif diff --git a/src/SALOMEDS/Test/Makefile.am b/src/SALOMEDS/Test/Makefile.am new file mode 100644 index 000000000..893e949ce --- /dev/null +++ b/src/SALOMEDS/Test/Makefile.am @@ -0,0 +1,110 @@ +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Paul RASCLE +# Module : KERNEL +# $Header$ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Files to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS= SALOMEDSTest.hxx + +# Scripts to be installed +dist_salomescript_SCRIPTS = TestSALOMEDS.py + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This directory defines the subdirectory src in the top source directory. +RPATH=../.. + +# This local variable defines the list of CPPFLAGS common to all target in this package. +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$(srcdir)/$(RPATH)/SALOMETraceCollector/Test \ + -I$(srcdir)/$(RPATH)/NamingService -I$(srcdir)/$(RPATH)/NamingService/Test \ + -I$(srcdir)/$(RPATH)/Utils -I$(srcdir)/$(RPATH)/Utils/Test \ + -I$(srcdir)/$(RPATH)/ResourcesManager \ + -I$(srcdir)/$(RPATH)/LifeCycleCORBA \ + -I$(srcdir)/$(RPATH)/SALOMEDSClient \ + -I$(srcdir)/$(RPATH)/SALOMEDSImpl -I$(srcdir)/$(RPATH)/SALOMEDSImpl/Test \ + -I$(top_builddir)/salome_adm/unix \ + -I$(top_builddir)/idl \ + @CAS_CPPFLAGS@ @CAS_CXXFLAGS@ \ + @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ + +# This local variable defines the list of dependant libraries common to all target in this package. +COMMON_LIBS =\ + @CPPUNIT_LIBS@ \ + $(RPATH)/Basics/libSALOMEBasics.la \ + $(RPATH)/ResourcesManager/libSalomeResourcesManager.la \ + $(RPATH)/Container/libSalomeContainer.la \ + $(RPATH)/NamingService/libSalomeNS.la \ + $(RPATH)/Registry/libRegistry.la \ + $(RPATH)/Notification/libSalomeNotification.la \ + $(RPATH)/Utils/Test/libUtilsTest.la \ + $(RPATH)/Utils/libOpUtil.la \ + $(RPATH)/SALOMELocalTrace/Test/libSALOMELocalTraceTest.la \ + $(RPATH)/SALOMELocalTrace/libSALOMELocalTrace.la \ + $(RPATH)/SALOMETraceCollector/Test/libSALOMETraceCollectorTest.la \ + $(RPATH)/SALOMEDSImpl/Test/libSALOMEDSImplTest.la \ + $(RPATH)/SALOMEDSImpl/libSalomeDSImpl.la \ + $(RPATH)/SALOMEDSClient/libSalomeDSClient.la \ + $(RPATH)/SALOMEDS/libSalomeDS.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libSALOMEDSTest.la +libSALOMEDSTest_la_SOURCES = SALOMEDSTest.cxx +libSALOMEDSTest_la_CPPFLAGS = $(COMMON_CPPFLAGS) +libSALOMEDSTest_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libSALOMEDSTest_la_LIBADD = $(COMMON_LIBS) + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = TestSALOMEDS +TestSALOMEDS_SOURCES = TestSALOMEDS.cxx +TestSALOMEDS_CPPFLAGS = $(COMMON_CPPFLAGS) +TestSALOMEDS_LDADD = \ + libSALOMEDSTest.la ../libSalomeDS.la \ + $(RPATH)/NamingService/Test/libNamingServiceTest.la \ + $(COMMON_LIBS) + diff --git a/src/SALOMEDS/Test/SALOMEDSTest.cxx b/src/SALOMEDS/Test/SALOMEDSTest.cxx new file mode 100644 index 000000000..c67bddeb9 --- /dev/null +++ b/src/SALOMEDS/Test/SALOMEDSTest.cxx @@ -0,0 +1,190 @@ +// Copyright (C) 2006 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// + +#include "SALOMEDSTest.hxx" + +#include +#include +#include +#include +#include +#include "utilities.h" +#include "Utils_SALOME_Exception.hxx" +#include "Utils_ORB_INIT.hxx" +#include "Utils_SINGLETON.hxx" +#include "OpUtil.hxx" + +#include "SALOMEDSClient.hxx" +#include "SALOMEDSClient_ClientFactory.hxx" + +#include + +using namespace std; + +#define PT_INTEGER 0 +#define PT_REAL 1 +#define PT_BOOLEAN 2 +#define PT_STRING 3 +#define PT_REALARRAY 4 +#define PT_INTARRAY 5 +#define PT_STRARRAY 6 + + +#define TRACEFILE "/tmp/traceUnitTest.log" + +// ============================================================================ +/*! + * Set up the environment + */ +// ============================================================================ + +void SALOMEDSTest::setUp() +{ + TCollection_AsciiString kernel(getenv("KERNEL_ROOT_DIR")); + TCollection_AsciiString subPath("/share/salome/resources"); + TCollection_AsciiString csf_var = (kernel+subPath); + setenv("CSF_PluginDefaults", csf_var.ToCString(), 0); + setenv("CSF_SALOMEDS_ResourcesDefaults", csf_var.ToCString(), 0); + + // --- trace on file + char *theFileName = TRACEFILE; + + 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); + CPPUNIT_ASSERT(traceFile); // file created empty, then closed + traceFile.close(); + + LocalTraceBufferPool* bp1 = LocalTraceBufferPool::instance(); + CPPUNIT_ASSERT(bp1); + + // --- Get or initialize the orb + + int _argc = 1; + char* _argv[] = {""}; + ORB_INIT &init = *SINGLETON_::Instance() ; + ASSERT(SINGLETON_::IsAlreadyExisting()); + _orb = init(_argc , _argv ) ; + + sleep(2); + + // --- Create a SALOME_NamingService instance + + _NS = new SALOME_NamingService; + + sleep(2); + + _NS->init_orb(_orb) ; +} + +// ============================================================================ +/*! + * - delete trace classes + */ +// ============================================================================ + +void +SALOMEDSTest::tearDown() +{ + LocalTraceBufferPool* bp1 = LocalTraceBufferPool::instance(); + CPPUNIT_ASSERT(bp1); + bp1->deleteInstance(bp1); + + delete _NS; +} + +// ============================================================================ +/*! + * Check AttributeParameter + */ +// ============================================================================ +void SALOMEDSTest::testAttributeParameter() +{ + CORBA::Object_var obj = _orb->resolve_initial_references( "RootPOA" ); + PortableServer::POA_var poa = PortableServer::POA::_narrow( obj ); + + PortableServer::POAManager_var pman = poa->the_POAManager(); + pman->activate() ; + + _PTR(StudyManager) sm = ClientFactory::createStudyManager(_orb, poa); + + CPPUNIT_ASSERT(sm); + + _PTR(Study) study = sm->NewStudy("Test"); + + CPPUNIT_ASSERT(study); + + _PTR(AttributeParameter) _ap = study->GetCommonParameters("TestComp", 0); + + CPPUNIT_ASSERT(_ap); + + _ap->SetInt("IntValue", 1); + CPPUNIT_ASSERT(_ap->IsSet("IntValue", PT_INTEGER)); + CPPUNIT_ASSERT(_ap->GetInt("IntValue") == 1); + + _ap->SetReal("RealValue", 1.2); + CPPUNIT_ASSERT(_ap->IsSet("RealValue", PT_REAL)); + CPPUNIT_ASSERT(_ap->GetReal("RealValue") == 1.2); + + _ap->SetString("StringValue", "hello"); + CPPUNIT_ASSERT(_ap->IsSet("StringValue", PT_STRING)); + CPPUNIT_ASSERT(_ap->GetString("StringValue") == "hello"); + + _ap->SetBool("BoolValue", 0); + CPPUNIT_ASSERT(_ap->IsSet("BoolValue", PT_BOOLEAN)); + CPPUNIT_ASSERT(!_ap->GetBool("BoolValue")); + + _ap->SetBool("BoolValue", 0); + CPPUNIT_ASSERT(_ap->IsSet("BoolValue", PT_BOOLEAN)); + CPPUNIT_ASSERT(!_ap->GetBool("BoolValue")); + + vector intArray; + intArray.push_back(0); + intArray.push_back(1); + + _ap->SetIntArray("IntArray", intArray); + CPPUNIT_ASSERT(_ap->IsSet("IntArray", PT_INTARRAY)); + CPPUNIT_ASSERT(_ap->GetIntArray("IntArray")[0] == 0); + CPPUNIT_ASSERT(_ap->GetIntArray("IntArray")[1] == 1); + + vector realArray; + realArray.push_back(0.0); + realArray.push_back(1.1); + + _ap->SetRealArray("RealArray", realArray); + CPPUNIT_ASSERT(_ap->IsSet("RealArray", PT_REALARRAY)); + CPPUNIT_ASSERT(_ap->GetRealArray("RealArray")[0] == 0.0); + CPPUNIT_ASSERT(_ap->GetRealArray("RealArray")[1] == 1.1); + + vector strArray; + strArray.push_back("hello"); + strArray.push_back("world"); + + _ap->SetStrArray("StrArray", strArray); + CPPUNIT_ASSERT(_ap->IsSet("StrArray", PT_STRARRAY)); + CPPUNIT_ASSERT(_ap->GetStrArray("StrArray")[0] == "hello"); + CPPUNIT_ASSERT(_ap->GetStrArray("StrArray")[1] == "world"); +} + + + diff --git a/src/SALOMEDS/Test/SALOMEDSTest.hxx b/src/SALOMEDS/Test/SALOMEDSTest.hxx new file mode 100644 index 000000000..35998193f --- /dev/null +++ b/src/SALOMEDS/Test/SALOMEDSTest.hxx @@ -0,0 +1,48 @@ +// Copyright (C) 2006 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// + +#ifndef _SALOMEDSTEST_HXX_ +#define _SALOMEDSTEST_HXX_ + +#include + +#include + +#include +#include "SALOME_NamingService.hxx" + +class SALOMEDSTest : public CppUnit::TestFixture +{ + CPPUNIT_TEST_SUITE( SALOMEDSTest ); + CPPUNIT_TEST( testAttributeParameter ); + CPPUNIT_TEST_SUITE_END(); + +public: + + void setUp(); + void tearDown(); + void testAttributeParameter(); + +protected: + CORBA::ORB_var _orb; + SALOME_NamingService* _NS; +}; + +#endif diff --git a/src/SALOMEDS/Test/TestSALOMEDS.cxx b/src/SALOMEDS/Test/TestSALOMEDS.cxx new file mode 100644 index 000000000..c2689eca2 --- /dev/null +++ b/src/SALOMEDS/Test/TestSALOMEDS.cxx @@ -0,0 +1,35 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// + +// --- include all SALOMEDS Test from basics until the present directory + +#include "SALOMELocalTraceTest.hxx" +#include "SALOMEDSImplTest.hxx" +#include "SALOMEDSTest.hxx" + +// --- Registers the fixture into the 'registry' + +CPPUNIT_TEST_SUITE_REGISTRATION( SALOMELocalTraceTest ); +CPPUNIT_TEST_SUITE_REGISTRATION( SALOMEDSImplTest ); +CPPUNIT_TEST_SUITE_REGISTRATION( SALOMEDSTest ); + +// --- generic Main program from Basic/Test + +#include "BasicMainTest.hxx" diff --git a/src/SALOMEDS/Test/TestSALOMEDS.py b/src/SALOMEDS/Test/TestSALOMEDS.py new file mode 100644 index 000000000..faae31b6e --- /dev/null +++ b/src/SALOMEDS/Test/TestSALOMEDS.py @@ -0,0 +1,29 @@ + +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 = ['TestSALOMEDS'] +ret = os.spawnvp(os.P_WAIT, command[0], command) + +# kill Test process + +TestKiller.killProcess(runSalome.process_id) diff --git a/src/SALOMEDSClient/Makefile.in b/src/SALOMEDSClient/Makefile.am similarity index 62% rename from src/SALOMEDSClient/Makefile.in rename to src/SALOMEDSClient/Makefile.am index c3c92b5e2..6593e94e4 100644 --- a/src/SALOMEDSClient/Makefile.in +++ b/src/SALOMEDSClient/Makefile.am @@ -1,16 +1,13 @@ -# File : Makefile.in -# Author : Sergey RUIN -# Module : SALOME +# SALOMEDSClient: client interface of SALOMEDS +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_srcdir)/idl +include $(top_srcdir)/salome_adm/unix/make_common_starter.am - -@COMMENCE@ - -EXPORT_HEADERS= SALOMEDSClient_definitions.hxx \ +salomeinclude_HEADERS=\ + SALOMEDSClient_definitions.hxx \ SALOMEDSClient_AttributeComment.hxx \ SALOMEDSClient_AttributeDrawable.hxx \ SALOMEDSClient_AttributeExpandable.hxx \ @@ -39,6 +36,7 @@ EXPORT_HEADERS= SALOMEDSClient_definitions.hxx \ SALOMEDSClient_AttributeTextHighlightColor.hxx \ SALOMEDSClient_AttributeTreeNode.hxx \ SALOMEDSClient_AttributeUserID.hxx \ + SALOMEDSClient_AttributeParameter.hxx \ SALOMEDSClient_ChildIterator.hxx \ SALOMEDSClient_GenericAttribute.hxx \ SALOMEDSClient_SComponent.hxx \ @@ -49,7 +47,36 @@ EXPORT_HEADERS= SALOMEDSClient_definitions.hxx \ SALOMEDSClient_StudyManager.hxx \ SALOMEDSClient_UseCaseBuilder.hxx \ SALOMEDSClient_UseCaseIterator.hxx \ + SALOMEDSClient_ClientFactory.hxx \ SALOMEDSClient.hxx -@CONCLUDE@ +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This local variable defines the list of CPPFLAGS common to all target in this package. +COMMON_CPPFLAGS= \ + -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 = + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libSalomeDSClient.la +libSalomeDSClient_la_SOURCES = \ + SALOMEDSClient_ClientFactory.cxx + +libSalomeDSClient_la_CPPFLAGS = $(COMMON_CPPFLAGS) +libSalomeDSClient_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libSalomeDSClient_la_LIBADD = $(COMMON_LIBS) diff --git a/src/SALOMEDSClient/SALOMEDSClient.hxx b/src/SALOMEDSClient/SALOMEDSClient.hxx index e604320e0..5adb67120 100644 --- a/src/SALOMEDSClient/SALOMEDSClient.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient.hxx @@ -49,6 +49,7 @@ #include "SALOMEDSClient_AttributeTextHighlightColor.hxx" #include "SALOMEDSClient_AttributeTreeNode.hxx" #include "SALOMEDSClient_AttributeUserID.hxx" +#include "SALOMEDSClient_AttributeParameter.hxx" #include "SALOMEDSClient_ChildIterator.hxx" #include "SALOMEDSClient_GenericAttribute.hxx" #include "SALOMEDSClient_SComponent.hxx" diff --git a/src/SALOMEDSClient/SALOMEDSClient_AttributeParameter.hxx b/src/SALOMEDSClient/SALOMEDSClient_AttributeParameter.hxx new file mode 100644 index 000000000..e8c3f1752 --- /dev/null +++ b/src/SALOMEDSClient/SALOMEDSClient_AttributeParameter.hxx @@ -0,0 +1,71 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// +// File : SALOMEDSImpl_AttributeIOR.hxx +// Author : Sergey RUIN +// Module : SALOME + +#ifndef _SALOMEDSClient_AttributeParameter_HeaderFile +#define _SALOMEDSClient_AttributeParameter_HeaderFile + +#include "SALOMEDSClient_definitions.hxx" +#include "SALOMEDSClient_GenericAttribute.hxx" +#include +#include + +class SALOMEDSClient_AttributeParameter : public virtual SALOMEDSClient_GenericAttribute +{ + +public: + + virtual void SetInt(const std::string& theID, const int theValue) = 0; + virtual int GetInt(const std::string& theID) = 0; + + virtual void SetReal(const std::string& theID, const double& theValue) = 0; + virtual double GetReal(const std::string& theID) = 0; + + virtual void SetString(const std::string& theID, const std::string& theValue) = 0; + virtual std::string GetString(const std::string& theID) = 0; + + virtual void SetBool(const std::string& theID, const bool& theValue) = 0; + virtual bool GetBool(const std::string& theID) = 0; + + virtual void SetRealArray(const std::string& theID, const std::vector& theArray) = 0; + virtual std::vector GetRealArray(const std::string& theID) = 0; + + virtual void SetIntArray(const std::string& theID, const std::vector& theArray) = 0; + virtual std::vector GetIntArray(const std::string& theID) = 0; + + virtual void SetStrArray(const std::string& theID, const std::vector& theArray) = 0; + virtual std::vector GetStrArray(const std::string& theID) = 0; + + virtual bool IsSet(const std::string& theID, const int theType) = 0; + + virtual bool RemoveID(const std::string& theID, const int theType) = 0; + + virtual _PTR(AttributeParameter) GetFather() = 0; + virtual bool HasFather() = 0; + virtual bool IsRoot() = 0; + + virtual void Clear() = 0; + + virtual std::vector GetIDs(const int theType) = 0; +}; + +#endif diff --git a/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.cxx b/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.cxx new file mode 100644 index 000000000..4b5e23b59 --- /dev/null +++ b/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.cxx @@ -0,0 +1,112 @@ +#include "SALOMEDSClient_ClientFactory.hxx" + +#ifdef WIN32 +#include +static HMODULE _libHandle = 0; +#define SALOMEDS_LIB_NAME "SalomeDS.dll" +#else +#include +static void* _libHandle = NULL; +#define SALOMEDS_LIB_NAME "libSalomeDS.so" +#endif + +#define SOBJECT_FACTORY "SObjectFactory" +#define SCOMPONENT_FACTORY "SComponentFactory" +#define STUDY_FACTORY "StudyFactory" +#define STUDYMANAGER_FACTORY "StudyManagerFactory" +#define STUDYMANAGER_CREATE "CreateStudyManager" + +typedef SALOMEDSClient_SObject* (*SOBJECT_FACTORY_FUNCTION) (SALOMEDS::SObject_ptr); +typedef SALOMEDSClient_SComponent* (*SCOMPONENT_FACTORY_FUNCTION) (SALOMEDS::SComponent_ptr); +typedef SALOMEDSClient_Study* (*STUDY_FACTORY_FUNCTION) (SALOMEDS::Study_ptr); +typedef SALOMEDSClient_StudyManager* (*STUDYMANAGER_FACTORY_FUNCTION) (); +typedef SALOMEDSClient_StudyManager* (*STUDYMANAGER_CREATE_FUNCTION) (CORBA::ORB_ptr, PortableServer::POA_ptr); + +static SOBJECT_FACTORY_FUNCTION aSObjectFactory = NULL; +static SCOMPONENT_FACTORY_FUNCTION aSComponentFactory = NULL; +static STUDY_FACTORY_FUNCTION aStudyFactory = NULL; +static STUDYMANAGER_FACTORY_FUNCTION aManagerFactory = NULL; +static STUDYMANAGER_CREATE_FUNCTION aCreateFactory = NULL; + +using namespace std; + +_PTR(SObject) ClientFactory::SObject(SALOMEDS::SObject_ptr theSObject) +{ + SALOMEDSClient_SObject* so = NULL; + +#ifdef WIN32 + if(!_libHandle) _libHandle = ::LoadLibrary(SALOMEDS_LIB_NAME); + if(!aSObjectFactory) aSObjectFactory = (SOBJECT_FACTORY_FUNCTION)::GetProcAddress(_libHandle, SOBJECT_FACTORY); +#else + if(!_libHandle) _libHandle = dlopen(SALOMEDS_LIB_NAME, RTLD_LAZY | RTLD_GLOBAL); + if(!aSObjectFactory) aSObjectFactory = (SOBJECT_FACTORY_FUNCTION) dlsym(_libHandle, SOBJECT_FACTORY); +#endif + + if(aSObjectFactory) so = aSObjectFactory(theSObject); + return _PTR(SObject)(so); +} + +_PTR(SComponent) ClientFactory::SComponent(SALOMEDS::SComponent_ptr theSComponent) +{ + SALOMEDSClient_SComponent* sco = NULL; + +#ifdef WIN32 + if(!_libHandle) _libHandle = ::LoadLibrary(SALOMEDS_LIB_NAME); + if(!aSComponentFactory) aSComponentFactory = (SCOMPONENT_FACTORY_FUNCTION)::GetProcAddress(_libHandle, SCOMPONENT_FACTORY); +#else + if(!_libHandle) _libHandle = dlopen(SALOMEDS_LIB_NAME, RTLD_LAZY | RTLD_GLOBAL); + if(!aSComponentFactory) aSComponentFactory = (SCOMPONENT_FACTORY_FUNCTION) dlsym(_libHandle, SCOMPONENT_FACTORY); +#endif + + if(aSComponentFactory) sco = aSComponentFactory(theSComponent); + return _PTR(SComponent)(sco); +} + +_PTR(Study) ClientFactory::Study(SALOMEDS::Study_ptr theStudy) +{ + SALOMEDSClient_Study* study = NULL; + +#ifdef WIN32 + if(!_libHandle) _libHandle = ::LoadLibrary(SALOMEDS_LIB_NAME); + if(!aStudyFactory) aStudyFactory = (STUDY_FACTORY_FUNCTION)::GetProcAddress(_libHandle, STUDY_FACTORY); +#else + if(!_libHandle) _libHandle = dlopen(SALOMEDS_LIB_NAME, RTLD_LAZY | RTLD_GLOBAL); + if(!aStudyFactory) aStudyFactory = (STUDY_FACTORY_FUNCTION) dlsym(_libHandle, STUDY_FACTORY); +#endif + + if(aStudyFactory) study = aStudyFactory(theStudy); + return _PTR(Study)(study); +} + +_PTR(StudyManager) ClientFactory::StudyManager() +{ + SALOMEDSClient_StudyManager* manager = NULL; + +#ifdef WIN32 + if(!_libHandle) _libHandle = ::LoadLibrary(SALOMEDS_LIB_NAME); + if(!aManagerFactory) aManagerFactory = (STUDYMANAGER_FACTORY_FUNCTION)::GetProcAddress(_libHandle, STUDYMANAGER_FACTORY); +#else + if(!_libHandle) _libHandle = dlopen(SALOMEDS_LIB_NAME, RTLD_LAZY | RTLD_GLOBAL); + if(!aManagerFactory) aManagerFactory = (STUDYMANAGER_FACTORY_FUNCTION) dlsym(_libHandle, STUDYMANAGER_FACTORY); +#endif + + if(aManagerFactory) manager = aManagerFactory(); + return _PTR(StudyManager)(manager); +} + +_PTR(StudyManager) ClientFactory::createStudyManager(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa) +{ + SALOMEDSClient_StudyManager* manager = NULL; + +#ifdef WIN32 + if(!_libHandle) _libHandle = ::LoadLibrary(SALOMEDS_LIB_NAME); + if(!aCreateFactory) aCreateFactory = (STUDYMANAGER_CREATE_FUNCTION)::GetProcAddress(_libHandle, STUDYMANAGER_CREATE); +#else + if(!_libHandle) _libHandle = dlopen(SALOMEDS_LIB_NAME, RTLD_LAZY | RTLD_GLOBAL); + if(!aCreateFactory) aCreateFactory = (STUDYMANAGER_CREATE_FUNCTION) dlsym(_libHandle, STUDYMANAGER_CREATE); +#endif + + if(aCreateFactory) manager = aCreateFactory(orb, poa); + return _PTR(StudyManager)(manager); +} + diff --git a/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.hxx b/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.hxx new file mode 100644 index 000000000..85929293d --- /dev/null +++ b/src/SALOMEDSClient/SALOMEDSClient_ClientFactory.hxx @@ -0,0 +1,71 @@ +// Copyright (C) 2006 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// +// File : SALOMEDSClient_ClientFactory.hxx +// Author : Sergey RUIN +// Module : SALOME +// $Header: + +#ifndef SALOMEDSClient_ClientFactory_HeaderFile +#define SALOMEDSClient_ClientFactory_HeaderFile + +#include "SALOMEDSClient_definitions.hxx" +#include "SALOMEDSClient_SObject.hxx" +#include "SALOMEDSClient_SComponent.hxx" +#include "SALOMEDSClient_Study.hxx" +#include "SALOMEDSClient_StudyManager.hxx" + +#include + +// IDL headers +#include +#include CORBA_CLIENT_HEADER(SALOMEDS) + +class ClientFactory { + +public: + /*! + * Returns a client SObject wrapper that corresponds %theSObject + */ + static _PTR(SObject) SObject(SALOMEDS::SObject_ptr theSObject); + + /*! + * Returns a client SComponent wrapper that corresponds %theSComponent + */ + static _PTR(SComponent) SComponent(SALOMEDS::SComponent_ptr theSComponent); + + /*! + * Returns a client Study wrapper that corresponds %theStudy + */ + static _PTR(Study) Study(SALOMEDS::Study_ptr theStudy); + + /*! + * Returns a client StudyManager wrapper + */ + static _PTR(StudyManager) StudyManager(); + + /*! + * Creates and returns a client StudyManager wrapper + */ + static _PTR(StudyManager) createStudyManager(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa); + + +}; + +#endif diff --git a/src/SALOMEDSClient/SALOMEDSClient_Study.hxx b/src/SALOMEDSClient/SALOMEDSClient_Study.hxx index 4a33f2b9d..d9873090c 100644 --- a/src/SALOMEDSClient/SALOMEDSClient_Study.hxx +++ b/src/SALOMEDSClient/SALOMEDSClient_Study.hxx @@ -30,6 +30,7 @@ #include "SALOMEDSClient_definitions.hxx" #include "SALOMEDSClient_SComponentIterator.hxx" #include "SALOMEDSClient_StudyBuilder.hxx" +#include "SALOMEDSClient_AttributeParameter.hxx" #include "SALOMEDSClient_SObject.hxx" #include "SALOMEDSClient_SComponent.hxx" #include "SALOMEDSClient_UseCaseBuilder.hxx" @@ -79,7 +80,12 @@ public: virtual _PTR(UseCaseBuilder) GetUseCaseBuilder() = 0; virtual void Close() = 0; virtual void EnableUseCaseAutoFilling(bool isEnabled) = 0; - virtual bool DumpStudy(const std::string& thePath, const std::string& theBaseName, bool isPublished) = 0; + virtual bool DumpStudy(const std::string& thePath, + const std::string& theBaseName, + bool isPublished) = 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; }; diff --git a/src/SALOMEDSImpl/Makefile.am b/src/SALOMEDSImpl/Makefile.am new file mode 100644 index 000000000..22cd3b6ea --- /dev/null +++ b/src/SALOMEDSImpl/Makefile.am @@ -0,0 +1,201 @@ +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Files to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS= \ + SALOMEDSImpl_Attributes.hxx \ + SALOMEDSImpl_SObject.hxx \ + SALOMEDSImpl_SComponent.hxx \ + SALOMEDSImpl_Driver.hxx \ + SALOMEDSImpl_Callback.hxx \ + SALOMEDSImpl_ChildIterator.hxx \ + SALOMEDSImpl_GenericAttribute.hxx \ + SALOMEDSImpl_AttributeIOR.hxx \ + SALOMEDSImpl_AttributeExternalFileDef.hxx \ + SALOMEDSImpl_AttributeFileType.hxx \ + SALOMEDSImpl_AttributePersistentRef.hxx \ + SALOMEDSImpl_AttributeSequenceOfReal.hxx \ + SALOMEDSImpl_AttributeSequenceOfInteger.hxx \ + SALOMEDSImpl_AttributeDrawable.hxx \ + SALOMEDSImpl_AttributeSelectable.hxx \ + SALOMEDSImpl_AttributeExpandable.hxx \ + SALOMEDSImpl_AttributeOpened.hxx \ + SALOMEDSImpl_AttributeFlags.hxx \ + SALOMEDSImpl_AttributeGraphic.hxx \ + SALOMEDSImpl_AttributeTextColor.hxx \ + SALOMEDSImpl_AttributeTextHighlightColor.hxx \ + SALOMEDSImpl_AttributePixMap.hxx \ + SALOMEDSImpl_AttributeLocalID.hxx \ + SALOMEDSImpl_AttributeTarget.hxx \ + SALOMEDSImpl_AttributeTableOfInteger.hxx \ + SALOMEDSImpl_AttributeTableOfReal.hxx \ + SALOMEDSImpl_AttributeTableOfString.hxx \ + SALOMEDSImpl_AttributeStudyProperties.hxx \ + SALOMEDSImpl_AttributePythonObject.hxx \ + SALOMEDSImpl_AttributeReal.hxx \ + SALOMEDSImpl_AttributeInteger.hxx \ + SALOMEDSImpl_AttributeUserID.hxx \ + SALOMEDSImpl_AttributeTreeNode.hxx \ + SALOMEDSImpl_AttributeName.hxx \ + SALOMEDSImpl_AttributeComment.hxx \ + SALOMEDSImpl_AttributeReference.hxx \ + SALOMEDSImpl_AttributeParameter.hxx \ + SALOMEDSImpl_UseCaseBuilder.hxx \ + SALOMEDSImpl_UseCaseIterator.hxx \ + SALOMEDSImpl_SComponentIterator.hxx \ + SALOMEDSImpl_StudyBuilder.hxx \ + SALOMEDSImpl_Study.hxx \ + SALOMEDSImpl_StudyManager.hxx \ + SALOMEDSImpl_OCAFApplication.hxx \ + SALOMEDSImpl_ChildNodeIterator.hxx \ + SALOMEDSImpl_IParameters.hxx \ + SALOMEDSImpl_TMPFile.hxx + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This local variable defines the list of CPPFLAGS common to all target in this package. +COMMON_CPPFLAGS=\ + @CAS_CPPFLAGS@ @CAS_CXXFLAGS@ \ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../HDFPersist \ + @HDF5_INCLUDES@ + +# This flag is used to resolve the dependencies of OCC libraries. +LDXMUFLAGS = -L/usr/X11R6/lib -lXmu + +# This local variable defines the list of dependant libraries common to all target in this package. +COMMON_LIBS =\ + ../HDFPersist/libSalomeHDFPersist.la \ + @CAS_OCAF@ \ + @HDF5_LIBS@ \ + $(LDXMUFLAGS) + + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libSalomeDSImpl.la +libSalomeDSImpl_la_SOURCES =\ + SALOMEDSImpl_Tool.cxx \ + SALOMEDSImpl_Callback.cxx \ + SALOMEDSImpl_StudyHandle.cxx \ + SALOMEDSImpl_GenericAttribute.cxx \ + SALOMEDSImpl_SObject.cxx \ + SALOMEDSImpl_SComponent.cxx \ + SALOMEDSImpl_ChildIterator.cxx \ + SALOMEDSImpl_OCAFApplication.cxx \ + SALOMEDSImpl_AttributeIOR.cxx \ + SALOMEDSImpl_AttributeExternalFileDef.cxx \ + SALOMEDSImpl_AttributeFileType.cxx \ + SALOMEDSImpl_AttributePersistentRef.cxx \ + SALOMEDSImpl_AttributeSequenceOfReal.cxx \ + SALOMEDSImpl_AttributeSequenceOfInteger.cxx \ + SALOMEDSImpl_AttributeDrawable.cxx \ + SALOMEDSImpl_AttributeSelectable.cxx \ + SALOMEDSImpl_AttributeExpandable.cxx \ + SALOMEDSImpl_AttributeOpened.cxx \ + SALOMEDSImpl_AttributeFlags.cxx \ + SALOMEDSImpl_AttributeGraphic.cxx \ + SALOMEDSImpl_AttributeTextColor.cxx \ + SALOMEDSImpl_AttributeTextHighlightColor.cxx \ + SALOMEDSImpl_AttributePixMap.cxx \ + SALOMEDSImpl_AttributeLocalID.cxx \ + SALOMEDSImpl_AttributeTarget.cxx \ + SALOMEDSImpl_AttributeTableOfInteger.cxx \ + SALOMEDSImpl_AttributeTableOfReal.cxx \ + SALOMEDSImpl_AttributeTableOfString.cxx \ + SALOMEDSImpl_AttributeStudyProperties.cxx \ + SALOMEDSImpl_AttributePythonObject.cxx \ + SALOMEDSImpl_AttributeReal.cxx \ + SALOMEDSImpl_AttributeInteger.cxx \ + SALOMEDSImpl_AttributeUserID.cxx \ + SALOMEDSImpl_AttributeTreeNode.cxx \ + SALOMEDSImpl_AttributeName.cxx \ + SALOMEDSImpl_AttributeComment.cxx \ + SALOMEDSImpl_AttributeReference.cxx \ + SALOMEDSImpl_AttributeParameter.cxx \ + SALOMEDSImpl_ChildNodeIterator.cxx \ + SALOMEDSImpl_UseCaseBuilder.cxx \ + SALOMEDSImpl_UseCaseIterator.cxx \ + SALOMEDSImpl_SComponentIterator.cxx \ + SALOMEDSImpl_StudyBuilder.cxx \ + SALOMEDSImpl_Study.cxx \ + SALOMEDSImpl_StudyManager.cxx \ + SALOMEDSImpl_IParameters.cxx \ + SALOMEDSImpl_TMPFile.cxx \ + \ + SALOMEDSImpl_AttributeComment.hxx \ + SALOMEDSImpl_AttributeDrawable.hxx \ + SALOMEDSImpl_AttributeExpandable.hxx \ + SALOMEDSImpl_AttributeExternalFileDef.hxx \ + SALOMEDSImpl_AttributeFileType.hxx \ + SALOMEDSImpl_AttributeFlags.hxx \ + SALOMEDSImpl_AttributeGraphic.hxx \ + SALOMEDSImpl_AttributeInteger.hxx \ + SALOMEDSImpl_AttributeIOR.hxx \ + SALOMEDSImpl_AttributeLocalID.hxx \ + SALOMEDSImpl_AttributeName.hxx \ + SALOMEDSImpl_AttributeOpened.hxx \ + SALOMEDSImpl_AttributePersistentRef.hxx \ + SALOMEDSImpl_AttributePixMap.hxx \ + SALOMEDSImpl_AttributePythonObject.hxx \ + SALOMEDSImpl_AttributeReal.hxx \ + SALOMEDSImpl_AttributeReference.hxx \ + SALOMEDSImpl_AttributeSelectable.hxx \ + SALOMEDSImpl_AttributeSequenceOfInteger.hxx \ + SALOMEDSImpl_AttributeSequenceOfReal.hxx \ + SALOMEDSImpl_Attributes.hxx \ + SALOMEDSImpl_AttributeStudyProperties.hxx \ + SALOMEDSImpl_AttributeTableOfInteger.hxx \ + SALOMEDSImpl_AttributeTableOfReal.hxx \ + SALOMEDSImpl_AttributeTableOfString.hxx \ + SALOMEDSImpl_AttributeTarget.hxx \ + SALOMEDSImpl_AttributeTextColor.hxx \ + SALOMEDSImpl_AttributeTextHighlightColor.hxx \ + SALOMEDSImpl_AttributeTreeNode.hxx \ + SALOMEDSImpl_AttributeUserID.hxx \ + SALOMEDSImpl_Callback.hxx \ + SALOMEDSImpl_ChildIterator.hxx \ + SALOMEDSImpl_ChildNodeIterator.hxx \ + SALOMEDSImpl_Driver.hxx \ + SALOMEDSImpl_GenericAttribute.hxx \ + SALOMEDSImpl_OCAFApplication.hxx \ + SALOMEDSImpl_SComponent.hxx \ + SALOMEDSImpl_SComponentIterator.hxx \ + SALOMEDSImpl_SObject.hxx \ + SALOMEDSImpl_StudyBuilder.hxx \ + SALOMEDSImpl_StudyHandle.hxx \ + SALOMEDSImpl_Study.hxx \ + SALOMEDSImpl_StudyManager.hxx \ + SALOMEDSImpl_Tool.hxx \ + SALOMEDSImpl_UseCaseBuilder.hxx \ + SALOMEDSImpl_UseCaseIterator.hxx + +libSalomeDSImpl_la_CPPFLAGS = $(COMMON_CPPFLAGS) +libSalomeDSImpl_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libSalomeDSImpl_la_LIBADD = $(COMMON_LIBS) + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = testDS +testDS_SOURCES = testDS.cxx +testDS_CPPFLAGS = $(COMMON_CPPFLAGS) +testDS_LDADD = libSalomeDSImpl.la $(COMMON_LIBS) diff --git a/src/SALOMEDSImpl/Makefile.in b/src/SALOMEDSImpl/Makefile.in deleted file mode 100644 index fa73429a9..000000000 --- a/src/SALOMEDSImpl/Makefile.in +++ /dev/null @@ -1,133 +0,0 @@ -# File : Makefile.in -# Author : Sergey RUIN -# Module : SALOME - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_srcdir)/idl - - -@COMMENCE@ - -EXPORT_HEADERS= \ - SALOMEDSImpl_Attributes.hxx \ - SALOMEDSImpl_SObject.hxx \ - SALOMEDSImpl_SComponent.hxx \ - SALOMEDSImpl_Driver.hxx \ - SALOMEDSImpl_Callback.hxx \ - SALOMEDSImpl_ChildIterator.hxx \ - SALOMEDSImpl_GenericAttribute.hxx \ - SALOMEDSImpl_AttributeIOR.hxx \ - SALOMEDSImpl_AttributeExternalFileDef.hxx \ - SALOMEDSImpl_AttributeFileType.hxx \ - SALOMEDSImpl_AttributePersistentRef.hxx \ - SALOMEDSImpl_AttributeSequenceOfReal.hxx \ - SALOMEDSImpl_AttributeSequenceOfInteger.hxx \ - SALOMEDSImpl_AttributeDrawable.hxx \ - SALOMEDSImpl_AttributeSelectable.hxx \ - SALOMEDSImpl_AttributeExpandable.hxx \ - SALOMEDSImpl_AttributeOpened.hxx \ - SALOMEDSImpl_AttributeFlags.hxx \ - SALOMEDSImpl_AttributeGraphic.hxx \ - SALOMEDSImpl_AttributeTextColor.hxx \ - SALOMEDSImpl_AttributeTextHighlightColor.hxx \ - SALOMEDSImpl_AttributePixMap.hxx \ - SALOMEDSImpl_AttributeLocalID.hxx \ - SALOMEDSImpl_AttributeTarget.hxx \ - SALOMEDSImpl_AttributeTableOfInteger.hxx \ - SALOMEDSImpl_AttributeTableOfReal.hxx \ - SALOMEDSImpl_AttributeTableOfString.hxx \ - SALOMEDSImpl_AttributeStudyProperties.hxx \ - SALOMEDSImpl_AttributePythonObject.hxx \ - SALOMEDSImpl_AttributeReal.hxx \ - SALOMEDSImpl_AttributeInteger.hxx \ - SALOMEDSImpl_AttributeUserID.hxx \ - SALOMEDSImpl_AttributeTreeNode.hxx \ - SALOMEDSImpl_AttributeName.hxx \ - SALOMEDSImpl_AttributeComment.hxx \ - SALOMEDSImpl_AttributeReference.hxx \ - SALOMEDSImpl_UseCaseBuilder.hxx \ - SALOMEDSImpl_UseCaseIterator.hxx \ - SALOMEDSImpl_SComponentIterator.hxx \ - SALOMEDSImpl_StudyBuilder.hxx \ - SALOMEDSImpl_Study.hxx \ - SALOMEDSImpl_StudyManager.hxx \ - SALOMEDSImpl_OCAFApplication.hxx \ - SALOMEDSImpl_ChildNodeIterator.hxx \ - -LIB_CLIENT_IDL = -LIB_SERVER_IDL = - -# Executables targets -BIN = testDS -BIN_SRC = -BIN_CLIENT_IDL = -BIN_SERVER_IDL = - -# Libraries targets - -LIB = libSalomeDSImpl.la -LIB_SRC = SALOMEDSImpl_Tool.cxx \ - SALOMEDSImpl_Callback.cxx \ - SALOMEDSImpl_StudyHandle.cxx \ - SALOMEDSImpl_GenericAttribute.cxx \ - SALOMEDSImpl_SObject.cxx \ - SALOMEDSImpl_SComponent.cxx \ - SALOMEDSImpl_ChildIterator.cxx \ - SALOMEDSImpl_OCAFApplication.cxx \ - SALOMEDSImpl_AttributeIOR.cxx \ - SALOMEDSImpl_AttributeExternalFileDef.cxx \ - SALOMEDSImpl_AttributeFileType.cxx \ - SALOMEDSImpl_AttributePersistentRef.cxx \ - SALOMEDSImpl_AttributeSequenceOfReal.cxx \ - SALOMEDSImpl_AttributeSequenceOfInteger.cxx \ - SALOMEDSImpl_AttributeDrawable.cxx \ - SALOMEDSImpl_AttributeSelectable.cxx \ - SALOMEDSImpl_AttributeExpandable.cxx \ - SALOMEDSImpl_AttributeOpened.cxx \ - SALOMEDSImpl_AttributeFlags.cxx \ - SALOMEDSImpl_AttributeGraphic.cxx \ - SALOMEDSImpl_AttributeTextColor.cxx \ - SALOMEDSImpl_AttributeTextHighlightColor.cxx \ - SALOMEDSImpl_AttributePixMap.cxx \ - SALOMEDSImpl_AttributeLocalID.cxx \ - SALOMEDSImpl_AttributeTarget.cxx \ - SALOMEDSImpl_AttributeTableOfInteger.cxx \ - SALOMEDSImpl_AttributeTableOfReal.cxx \ - SALOMEDSImpl_AttributeTableOfString.cxx \ - SALOMEDSImpl_AttributeStudyProperties.cxx \ - SALOMEDSImpl_AttributePythonObject.cxx \ - SALOMEDSImpl_AttributeReal.cxx \ - SALOMEDSImpl_AttributeInteger.cxx \ - SALOMEDSImpl_AttributeUserID.cxx \ - SALOMEDSImpl_AttributeTreeNode.cxx \ - SALOMEDSImpl_AttributeName.cxx \ - SALOMEDSImpl_AttributeComment.cxx \ - SALOMEDSImpl_AttributeReference.cxx \ - SALOMEDSImpl_ChildNodeIterator.cxx \ - SALOMEDSImpl_UseCaseBuilder.cxx \ - SALOMEDSImpl_UseCaseIterator.cxx \ - SALOMEDSImpl_SComponentIterator.cxx \ - SALOMEDSImpl_StudyBuilder.cxx \ - SALOMEDSImpl_Study.cxx \ - SALOMEDSImpl_StudyManager.cxx - - - -CPPFLAGS+=$(OCC_INCLUDES) $(HDF5_INCLUDES) -CXXFLAGS+=$(OCC_CXXFLAGS) -LDFLAGS+= $(HDF5_LIBS) -lSalomeHDFPersist $(CAS_OCAF) - -# _CS_gbo_090604 Ajout Spécifique Calibre 3, pour l'utilisation de la version 5.12 de la bibliothÚque OCC. -# La bibliothÚque OCC5.12 a été compilée sur Calibre 3 avec l'extention Xmu (impossible de compiler sans). -# On est donc obligé ici, pour permettre l'édition de lien avec les bibliothÚques OCC, de spécifier le -# chemin d'accÚs aux bibliothÚques Xmu -# -LDXMUFLAGS= -L/usr/X11R6/lib -lXmu -LDFLAGS+=$(LDXMUFLAGS) -LDFLAGSFORBIN=$(LDFLAGS) -lSalomeHDFPersist - -@CONCLUDE@ - - diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx index 46d73cf32..55716777c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx @@ -21,10 +21,11 @@ // Author : Sergey RUIN // Module : SALOME +#include "SALOMEDSImpl_AttributeComment.hxx" + #ifndef WNT using namespace std; #endif -#include "SALOMEDSImpl_AttributeComment.hxx" IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeComment, SALOMEDSImpl_GenericAttribute ) IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeComment, SALOMEDSImpl_GenericAttribute ) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.cxx index c0679aa92..340bd3f7c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.cxx @@ -21,10 +21,11 @@ // Author : Sergey RUIN // Module : SALOME +#include "SALOMEDSImpl_AttributeDrawable.hxx" + #ifndef WNT using namespace std; #endif -#include "SALOMEDSImpl_AttributeDrawable.hxx" IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeDrawable, SALOMEDSImpl_GenericAttribute ) IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeDrawable, SALOMEDSImpl_GenericAttribute ) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.cxx index 5f4bc9c73..743fa016b 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.cxx @@ -21,10 +21,11 @@ // Author : Sergey RUIN // Module : SALOME +#include "SALOMEDSImpl_AttributeExpandable.hxx" + #ifndef WNT using namespace std; #endif -#include "SALOMEDSImpl_AttributeExpandable.hxx" IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeExpandable, SALOMEDSImpl_GenericAttribute ) IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeExpandable, SALOMEDSImpl_GenericAttribute ) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx index 85b8355a6..c5b1553be 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx @@ -21,14 +21,15 @@ // Author : Sergey RUIN // Module : SALOME -#ifndef WNT -using namespace std; -#endif #include "SALOMEDSImpl_AttributeIOR.hxx" #include #include "SALOMEDSImpl_Study.hxx" #include +#ifndef WNT +using namespace std; +#endif + IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeIOR, SALOMEDSImpl_GenericAttribute ) IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeIOR, SALOMEDSImpl_GenericAttribute ) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx index dee0c253d..99075680c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx @@ -21,10 +21,11 @@ // Author : Sergey RUIN // Module : SALOME +#include "SALOMEDSImpl_AttributeInteger.hxx" + #ifndef WNT using namespace std; #endif -#include "SALOMEDSImpl_AttributeInteger.hxx" IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeInteger, SALOMEDSImpl_GenericAttribute) IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeInteger, SALOMEDSImpl_GenericAttribute ) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx new file mode 100644 index 000000000..929dec934 --- /dev/null +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx @@ -0,0 +1,765 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// +// File : SALOMEDSImpl_AttributeParameter.cxx +// Author : Sergey RUIN +// Module : SALOME + + +#include "SALOMEDSImpl_AttributeParameter.hxx" +#include + +#include +#include +#include + +using namespace std; + + + +IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeParameter, SALOMEDSImpl_GenericAttribute ) +IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeParameter, SALOMEDSImpl_GenericAttribute ) + + +// Purpose: Each character in the string is replaced by 3 characters: '%' and hex number +// of the character (2 characters) +string convertString(const string& S) +{ + int length = S.size(); + const char *s = S.c_str(); + char *c = new char[3], *buffer = new char[length*3+1]; + buffer[length*3] = (char)0; + for(int i = 0, pos = 0; i& theArray) +{ + CheckLocked(); + + Backup(); + + _realarrays[theID] = theArray; + + SetModifyFlag(); +} + +//======================================================================= +/*! + * Function : GetRealArray + * Purpose : Returns double values associated with the ID + */ +//======================================================================= +vector SALOMEDSImpl_AttributeParameter::GetRealArray(const string& theID) +{ + if(!IsSet(theID, PT_REALARRAY)) Standard_Failure::Raise("Invalid ID"); + return _realarrays[theID]; +} + + +//======================================================================= +/*! + * Function : SetIntArray + * Purpose : Associates an array of int values with the given ID + */ +//======================================================================= +void SALOMEDSImpl_AttributeParameter::SetIntArray(const string& theID, const vector& theArray) +{ + CheckLocked(); + + Backup(); + + _intarrays[theID] = theArray; + + SetModifyFlag(); +} + +//======================================================================= +/*! + * Function : GetIntArray + * Purpose : Returns int values associated with the ID + */ +//======================================================================= +vector SALOMEDSImpl_AttributeParameter::GetIntArray(const string& theID) +{ + if(!IsSet(theID, PT_INTARRAY)) Standard_Failure::Raise("Invalid ID"); + return _intarrays[theID]; +} + + +//======================================================================= +/*! + * Function : SetStrArray + * Purpose : Associates an array of string values with the given ID + */ +//======================================================================= +void SALOMEDSImpl_AttributeParameter::SetStrArray(const string& theID, const vector& theArray) +{ + CheckLocked(); + + Backup(); + + _strarrays[theID] = theArray; + + SetModifyFlag(); +} + +//======================================================================= +/*! + * Function : GetStrArray + * Purpose : Returns string values associated with the ID + */ +//======================================================================= +vector SALOMEDSImpl_AttributeParameter::GetStrArray(const string& theID) +{ + if(!IsSet(theID, PT_STRARRAY)) Standard_Failure::Raise("Invalid ID"); + return _strarrays[theID]; +} + + +//======================================================================= +/*! + * Function : IsSet + * Purpose : Returns true if for the ID of given type was assigned \n + * a value in the attribute + */ +//======================================================================= +bool SALOMEDSImpl_AttributeParameter::IsSet(const string& theID, const Parameter_Types theType) +{ + switch(theType) { + case PT_INTEGER: { + if(_ints.find(theID) != _ints.end()) return true; + break; + } + case PT_REAL: { + if(_reals.find(theID) != _reals.end()) return true; + break; + } + case PT_BOOLEAN: { + if(_bools.find(theID) != _bools.end()) return true; + break; + } + case PT_STRING: { + if(_strings.find(theID) != _strings.end()) return true; + break; + } + case PT_REALARRAY: { + if(_realarrays.find(theID) != _realarrays.end()) return true; + break; + } + case PT_INTARRAY: { + if(_intarrays.find(theID) != _intarrays.end()) return true; + break; + } + case PT_STRARRAY: { + if(_strarrays.find(theID) != _strarrays.end()) return true; + break; + } + default: return false; + } + + return false; +} + +//======================================================================= +/*! + * Function : RemoveID + * Purpose : Removes a parameter with given ID + */ +//======================================================================= +bool SALOMEDSImpl_AttributeParameter::RemoveID(const string& theID, const Parameter_Types theType) +{ + Backup(); + SetModifyFlag(); + + switch(theType) { + case PT_INTEGER: { + if(_ints.erase(theID)) return true; + break; + } + case PT_REAL: { + if(_reals.erase(theID)) return true; + break; + } + case PT_BOOLEAN: { + if(_bools.erase(theID)) return true; + break; + } + case PT_STRING: { + if(_strings.erase(theID)) return true; + break; + } + case PT_REALARRAY: { + if(_realarrays.erase(theID)) return true; + break; + } + case PT_INTARRAY: { + if(_intarrays.erase(theID)) return true; + break; + } + case PT_STRARRAY: { + if(_strarrays.erase(theID)) return true; + break; + } + default: return false; + } + + + return false; +} + + +//======================================================================= +/*! + * Function : GetFather + * Purpose : Returns a father attribute for this attribute + */ +//======================================================================= +Handle(SALOMEDSImpl_AttributeParameter) SALOMEDSImpl_AttributeParameter::GetFather() +{ + Handle(SALOMEDSImpl_AttributeParameter) aFather; + TDF_Label L = Label(); + if(L.IsRoot()) return aFather; + + while(!L.IsRoot()) { + L = L.Father(); + if(L.FindAttribute(SALOMEDSImpl_AttributeParameter::GetID(), aFather)) break; + } + + return aFather; +} + +//======================================================================= +/*! + * Function : HasFather + * Purpose : Returns True if the attribute has a father attribute + */ +//======================================================================= +bool SALOMEDSImpl_AttributeParameter::HasFather() +{ + TDF_Label L = Label(); + if(L.IsRoot()) return false; + while(!L.IsRoot()) { + L = L.Father(); + if(L.IsAttribute(SALOMEDSImpl_AttributeParameter::GetID())) return true; + } + + return false; +} + +//======================================================================= +/*! + * Function : IsRoot + * Purpose : Returns True is the attribute is highest in an hierachy + */ +//======================================================================= +bool SALOMEDSImpl_AttributeParameter::IsRoot() +{ + return ((HasFather())?false:true); +} + +//======================================================================= +/*! + * Function : Clear + * Purpose : Clears the content of the attribute + */ +//======================================================================= +void SALOMEDSImpl_AttributeParameter::Clear() +{ + Backup(); + + _ints.clear(); + _reals.clear(); + _bools.clear(); + _strings.clear(); + _realarrays.clear(); + _intarrays.clear(); + _strarrays.clear(); + + SetModifyFlag(); +} + +//======================================================================= +/*! + * Function : GetIDs + * Purpose : Returns an array of all ID's of the given type + */ +//======================================================================= +vector SALOMEDSImpl_AttributeParameter::GetIDs(const Parameter_Types theType) +{ + + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + 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; + } + break; + } + default: return anArray; + } + + return anArray; +} + +//======================================================================= +/*! + * Function : ID + * Purpose : Rteurns an GUID of the attribute + */ +//======================================================================= +const Standard_GUID& SALOMEDSImpl_AttributeParameter::ID () const { return GetID(); } + + +Handle(TDF_Attribute) SALOMEDSImpl_AttributeParameter::NewEmpty () const +{ + return new SALOMEDSImpl_AttributeParameter(); +} + +//======================================================================= +/*! + * Function : Restore + * Purpose : Restors the content of the attribute from another + */ +//======================================================================= +void SALOMEDSImpl_AttributeParameter::Restore(const Handle(TDF_Attribute)& with) +{ + Handle(SALOMEDSImpl_AttributeParameter) A = Handle(SALOMEDSImpl_AttributeParameter)::DownCast (with); + _ints.clear(); + _reals.clear(); + _bools.clear(); + _strings.clear(); + _realarrays.clear(); + _intarrays.clear(); + _strarrays.clear(); + + for(map::const_iterator p = A->_ints.begin(); p!= A->_ints.end(); p++) _ints[p->first] = p->second; + for(map::const_iterator p = A->_reals.begin(); p!= A->_reals.end(); p++) _reals[p->first] = p->second; + for(map::const_iterator p = A->_bools.begin(); p!= A->_bools.end(); p++) _bools[p->first] = p->second; + for(map::const_iterator p = A->_strings.begin(); p!= A->_strings.end(); p++) + _strings[p->first] = p->second; + for(map< string,vector >::const_iterator p = A->_realarrays.begin(); p!= A->_realarrays.end(); p++) + _realarrays[p->first] = p->second; + for(map< string,vector >::const_iterator p = A->_intarrays.begin(); p!= A->_intarrays.end(); p++) + _intarrays[p->first] = p->second; + for(map< string,vector >::const_iterator p = A->_strarrays.begin(); p!= A->_strarrays.end(); p++) + _strarrays[p->first] = p->second; +} + +//======================================================================= +/*! + * Function : Paste + * Purpose : Pastes the content of attribute to another + */ +//======================================================================= +void SALOMEDSImpl_AttributeParameter::Paste (const Handle(TDF_Attribute)& into, + const Handle(TDF_RelocationTable)& RT) const +{ + into->Restore(this); +} + +//======================================================================= +/*! + * Function : Save + * Purpose : Saves a content of the attribute as a string + */ +//======================================================================= +TCollection_AsciiString SALOMEDSImpl_AttributeParameter::Save() +{ + ostrstream buffer; + char *tmpBuffer = new char[255]; + + buffer << _ints.size() << " "; + + for(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++) { + sprintf(tmpBuffer, "%.64e", p->second); + buffer << convertString(p->first) << " " << tmpBuffer << " "; + } + + buffer << _bools.size() << " "; + for(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++) { + 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); + 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); + 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); + sprintf(tmpBuffer, " %s %d ", convertString(p->first).c_str(), v.size()); + buffer << tmpBuffer; + for(int i = 0; istr()); + + return AS; +} + +//======================================================================= +/*! + * Function : Load + * Purpose : Restores the attribute from the string + */ +//======================================================================= +void SALOMEDSImpl_AttributeParameter::Load(const TCollection_AsciiString& theValue) +{ + Backup(); + + _ints.clear(); + _reals.clear(); + _bools.clear(); + _strings.clear(); + _realarrays.clear(); + _intarrays.clear(); + + istrstream buffer(theValue.ToCString(), strlen(theValue.ToCString())); + + int size, val, ival; + double val2; + string s, id; + + buffer >> size; + for(int i = 1; i<=size; i++) { + buffer >> id >> val; + _ints[restoreString(id)] = val; + } + + buffer >> size; + for(int i = 1; i<=size; i++) { + buffer >> id >> val2; + _reals[restoreString(id)] = val2; + } + + buffer >> size; + for(int i = 1; i<=size; i++) { + buffer >> id >> val; + _bools[restoreString(id)] = val; + } + + buffer >> size; + for(int i = 1; i<=size; i++) { + buffer >> id >> s; + _strings[restoreString(id)] = restoreString(s); + } + + buffer >> size; + for(int i = 1; i<=size; i++) { + buffer >> id >> val; + vector v; + v.resize(val); + for(int j = 0; j> val2; + v[j] = val2; + } + _realarrays[restoreString(id)] = v; + } + + buffer >> size; + for(int i = 1; i<=size; i++) { + buffer >> id >> val; + vector v; + v.resize(val); + for(int j = 0; j> ival; + v[j] = ival; + } + _intarrays[restoreString(id)] = v; + } + + buffer >> size; + for(int i = 1; i<=size; i++) { + buffer >> id >> val; + vector v; + v.resize(val); + for(int j = 0; j> s; + v[j] = restoreString(s); + } + _strarrays[restoreString(id)] = v; + } +} diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.hxx new file mode 100644 index 000000000..ab273ae50 --- /dev/null +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.hxx @@ -0,0 +1,119 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// +// File : SALOMEDSImpl_AttributeIOR.hxx +// Author : Sergey RUIN +// Module : SALOME + +#ifndef _SALOMEDSImpl_AttributeParameter_HeaderFile +#define _SALOMEDSImpl_AttributeParameter_HeaderFile + +#include +#include +#include +#include +#include +#include "SALOMEDSImpl_GenericAttribute.hxx" + +#include +#include +#include + +class Standard_GUID; +class Handle(TDF_Attribute); +class Handle(TDF_RelocationTable); + + +DEFINE_STANDARD_HANDLE( SALOMEDSImpl_AttributeParameter, SALOMEDSImpl_GenericAttribute ) + +enum Parameter_Types {PT_INTEGER, PT_REAL, PT_BOOLEAN, PT_STRING, PT_REALARRAY, PT_INTARRAY, PT_STRARRAY}; + +/*! + Class: SALOMEDSImpl_AttributeParameter + Description : AttributeParameter is a universal container of basic types +*/ + +class SALOMEDSImpl_AttributeParameter : public SALOMEDSImpl_GenericAttribute +{ + +private: + + std::map _ints; + std::map _reals; + std::map _strings; + std::map _bools; + std::map< std::string, vector > _realarrays; + std::map< std::string, vector > _intarrays; + std::map< std::string, vector > _strarrays; + +public: + Standard_EXPORT static const Standard_GUID& GetID() ; + + Standard_EXPORT SALOMEDSImpl_AttributeParameter():SALOMEDSImpl_GenericAttribute("AttributeParameter") {} + Standard_EXPORT static Handle(SALOMEDSImpl_AttributeParameter) Set (const TDF_Label& L); + + + Standard_EXPORT void SetInt(const std::string& theID, const int& theValue); + Standard_EXPORT int GetInt(const std::string& theID); + + Standard_EXPORT void SetReal(const std::string& theID, const double& theValue); + Standard_EXPORT double GetReal(const std::string& theID); + + Standard_EXPORT void SetString(const std::string& theID, const std::string& theValue); + Standard_EXPORT std::string GetString(const std::string& theID); + + Standard_EXPORT void SetBool(const std::string& theID, const bool& theValue); + Standard_EXPORT bool GetBool(const std::string& theID); + + Standard_EXPORT void SetRealArray(const std::string& theID, const std::vector& theArray); + Standard_EXPORT std::vector GetRealArray(const std::string& theID); + + Standard_EXPORT void SetIntArray(const std::string& theID, const std::vector& theArray); + Standard_EXPORT std::vector GetIntArray(const std::string& theID); + + Standard_EXPORT void SetStrArray(const std::string& theID, const std::vector& theArray); + Standard_EXPORT std::vector GetStrArray(const std::string& theID); + + Standard_EXPORT bool IsSet(const std::string& theID, const Parameter_Types theType); + + Standard_EXPORT bool RemoveID(const std::string& theID, const Parameter_Types theType); + + Standard_EXPORT Handle(SALOMEDSImpl_AttributeParameter) GetFather(); + Standard_EXPORT bool HasFather(); + Standard_EXPORT bool IsRoot(); + + Standard_EXPORT std::vector GetIDs(const Parameter_Types theType); + + Standard_EXPORT void Clear(); + + Standard_EXPORT virtual TCollection_AsciiString Save(); + Standard_EXPORT virtual void Load(const TCollection_AsciiString& theValue); + + Standard_EXPORT const Standard_GUID& ID() const; + Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ; + Standard_EXPORT Handle_TDF_Attribute NewEmpty() const; + Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const; + + Standard_EXPORT ~SALOMEDSImpl_AttributeParameter() {} + +public: + DEFINE_STANDARD_RTTI( SALOMEDSImpl_AttributeParameter ) +}; + +#endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Attributes.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Attributes.hxx index e593350f0..4be4e027e 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Attributes.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Attributes.hxx @@ -63,6 +63,7 @@ public : #include "SALOMEDSImpl_AttributeFileType.hxx" #include "SALOMEDSImpl_AttributeFlags.hxx" #include "SALOMEDSImpl_AttributeGraphic.hxx" +#include "SALOMEDSImpl_AttributeParameter.hxx" #define __AttributeTypeToGUIDForSObject \ @@ -93,7 +94,8 @@ public : 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 == "AttributeReference") return SALOMEDSImpl_AttributeReference::GetID(); \ + if(theType == "AttributeParameter") return SALOMEDSImpl_AttributeParameter::GetID(); #define __FindOrCreateAttributeLocked(ClassName) if (strcmp(aTypeOfAttribute.ToCString(), #ClassName) == 0) { \ @@ -129,6 +131,7 @@ __FindOrCreateAttributeLocked(AttributeTableOfInteger) \ __FindOrCreateAttributeLocked(AttributeTableOfReal) \ __FindOrCreateAttributeLocked(AttributeTableOfString) \ __FindOrCreateAttributeLocked(AttributePythonObject) \ +__FindOrCreateAttributeLocked(AttributeParameter) \ __FindOrCreateAttribute(AttributePersistentRef) \ __FindOrCreateAttribute(AttributeDrawable) \ __FindOrCreateAttribute(AttributeSelectable) \ diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Driver.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Driver.hxx index e3d53663a..4a59e0b7b 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Driver.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Driver.hxx @@ -23,6 +23,7 @@ #include #include #include +#include class SALOMEDSImpl_Driver @@ -31,15 +32,15 @@ public: virtual TCollection_AsciiString GetIOR() = 0; - virtual unsigned char* Save(const Handle(SALOMEDSImpl_SComponent)& theComponent, - const TCollection_AsciiString& theURL, - long& theStreamLength, - bool isMultiFile) = 0; + virtual Handle(SALOMEDSImpl_TMPFile) Save(const Handle(SALOMEDSImpl_SComponent)& theComponent, + const TCollection_AsciiString& theURL, + long& theStreamLength, + bool isMultiFile) = 0; - virtual unsigned char* SaveASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent, - const TCollection_AsciiString& theURL, - long& theStreamLength, - bool isMultiFile) = 0; + virtual Handle(SALOMEDSImpl_TMPFile) SaveASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent, + const TCollection_AsciiString& theURL, + long& theStreamLength, + bool isMultiFile) = 0; virtual bool Load(const Handle(SALOMEDSImpl_SComponent)& theComponent, const unsigned char* theStream, @@ -70,10 +71,10 @@ public: virtual bool CanCopy(const Handle(SALOMEDSImpl_SObject)& theObject) = 0; - virtual unsigned char* CopyFrom(const Handle(SALOMEDSImpl_SObject)& theObject, - int& theObjectID, - long& theStreamLength) = 0; - + virtual Handle(SALOMEDSImpl_TMPFile) CopyFrom(const Handle(SALOMEDSImpl_SObject)& theObject, + int& theObjectID, + long& theStreamLength) = 0; + virtual bool CanPaste(const TCollection_AsciiString& theComponentName, int theObjectID) = 0; virtual TCollection_AsciiString PasteInto(const unsigned char* theStream, @@ -81,10 +82,10 @@ public: int theObjectID, const Handle(SALOMEDSImpl_SObject)& theObject) = 0; - virtual unsigned char* DumpPython(const Handle(SALOMEDSImpl_Study)& theStudy, - bool isPublished, - bool& isValidScript, - long& theStreamLength) = 0; + virtual Handle(SALOMEDSImpl_TMPFile) DumpPython(const Handle(SALOMEDSImpl_Study)& theStudy, + bool isPublished, + bool& isValidScript, + long& theStreamLength) = 0; }; class SALOMEDSImpl_DriverFactory diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx new file mode 100644 index 000000000..02115abab --- /dev/null +++ b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx @@ -0,0 +1,361 @@ +// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// +#include "SALOMEDSImpl_IParameters.hxx" +#include + +#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" + +/*! + Constructor +*/ +SALOMEDSImpl_IParameters::SALOMEDSImpl_IParameters(const Handle(SALOMEDSImpl_AttributeParameter)& ap) +{ + if(ap.IsNull()) return; + _ap = ap; + Handle(SALOMEDSImpl_SObject) so = _ap->GetSObject(); + _study = so->GetStudy(); +} + +SALOMEDSImpl_IParameters::~SALOMEDSImpl_IParameters() +{ + _compNames.clear(); +} + +int SALOMEDSImpl_IParameters::append(const string& listName, const string& value) +{ + if(_ap.IsNull()) return -1; + 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_ && + listName != _AP_PROPERTIES_LIST_) { + append(_AP_LISTS_LIST_, listName); + } + _ap->SetStrArray(listName, v); + } + v = _ap->GetStrArray(listName); + v.push_back(value); + _ap->SetStrArray(listName, v); + return (v.size()-1); +} + +int SALOMEDSImpl_IParameters::nbValues(const string& listName) +{ + if(_ap.IsNull()) return -1; + if(!_ap->IsSet(listName, PT_STRARRAY)) return 0; + vector v = _ap->GetStrArray(listName); + return v.size(); +} + +vector SALOMEDSImpl_IParameters::getValues(const string& listName) +{ + vector v; + if(_ap.IsNull()) return v; + if(!_ap->IsSet(listName, PT_STRARRAY)) return v; + return _ap->GetStrArray(listName); +} + + +string SALOMEDSImpl_IParameters::getValue(const string& listName, int index) +{ + if(_ap.IsNull()) return ""; + if(!_ap->IsSet(listName, PT_STRARRAY)) return ""; + vector v = _ap->GetStrArray(listName); + if(index >= v.size()) return ""; + return v[index]; +} + +vector SALOMEDSImpl_IParameters::getLists() +{ + 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) +{ + if(_ap.IsNull()) return; + 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(parameterName); + v.push_back(value); + _ap->SetStrArray(entry, v); +} + + +string SALOMEDSImpl_IParameters::getParameter(const string& entry, const string& parameterName) +{ + if(_ap.IsNull()) return ""; + if(!_ap->IsSet(entry, PT_STRARRAY)) return ""; + vector v = _ap->GetStrArray(entry); + int length = v.size(); + for(int i = 0; i SALOMEDSImpl_IParameters::getAllParameterNames(const string& entry) +{ + vector v, names; + if(_ap.IsNull()) return v; + if(!_ap->IsSet(entry, PT_STRARRAY)) return v; + v = _ap->GetStrArray(entry); + int length = v.size(); + for(int i = 0; i SALOMEDSImpl_IParameters::getAllParameterValues(const string& entry) +{ + vector v, values; + if(_ap.IsNull()) return v; + if(!_ap->IsSet(entry, PT_STRARRAY)) return v; + v = _ap->GetStrArray(entry); + int length = v.size(); + for(int i = 1; iIsSet(entry, PT_STRARRAY)) return -1; + return _ap->GetStrArray(entry).size()/2; +} + +vector SALOMEDSImpl_IParameters::getEntries() +{ + vector v; + if(_ap.IsNull()) 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) +{ + if(_ap.IsNull()) return; + if(!_ap->IsSet(name, PT_STRING)) { + append(_AP_PROPERTIES_LIST_, name); //Add the property to the internal list of properties + } + _ap->SetString(name, value); +} + +string SALOMEDSImpl_IParameters::getProperty(const string& name) +{ + if(_ap.IsNull()) return ""; + if(!_ap->IsSet(name, PT_STRING)) return ""; + return _ap->GetString(name); +} + +vector SALOMEDSImpl_IParameters::getProperties() +{ + vector v; + if(_ap.IsNull()) 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) +{ + 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); + + if(_compNames.find(compName) == _compNames.end()) { + Handle(SALOMEDSImpl_SObject) so = _study->FindComponent((char*)compName.c_str()); + if(!so) return entry; + compID = so->GetID().ToCString(); + _compNames[compName] = compID; + } + else compID = _compNames[compName]; + + string newEntry(compID); + newEntry += (":"+tail); + + return newEntry; +} + + +bool SALOMEDSImpl_IParameters::isDumpPython(const Handle(SALOMEDSImpl_Study)& study, const string& theID) +{ + string anID; + if(theID == "") anID = getDefaultVisualComponent(); + else anID = theID; + + Handle(SALOMEDSImpl_AttributeParameter) ap = study->GetCommonParameters((char*)anID.c_str(), 0); + if(ap.IsNull()) return false; + if(!ap->IsSet(_AP_DUMP_PYTHON_, PT_BOOLEAN)) return false; + return (bool)ap->GetBool(_AP_DUMP_PYTHON_); +} + + +int SALOMEDSImpl_IParameters::getLastSavePoint(const Handle(SALOMEDSImpl_Study)& study, const string& theID) +{ + string anID; + if(theID == "") anID = getDefaultVisualComponent(); + else anID = theID; + + + Handle(SALOMEDSImpl_SObject) so = study->FindComponent((char*)anID.c_str()); + if(so.IsNull()) return -1; + + Handle(SALOMEDSImpl_StudyBuilder) builder = study->NewBuilder(); + Handle(SALOMEDSImpl_ChildIterator) anIter ( study->NewChildIterator( so ) ); + int tag = -1; + for(; anIter->More(); anIter->Next()) + { + Handle(SALOMEDSImpl_SObject) val( anIter->Value() ); + Handle(SALOMEDSImpl_GenericAttribute) genAttr; + if(builder->FindAttribute(val, genAttr, "AttributeParameter")) tag = val->Tag(); + } + + return tag; +} + + + +string SALOMEDSImpl_IParameters::getStudyScript(const Handle(SALOMEDSImpl_Study)& study, int savePoint, const std::string& theID) +{ + string anID; + if(theID == "") anID = getDefaultVisualComponent(); + else anID = theID; + + Handle(SALOMEDSImpl_AttributeParameter) ap = study->GetCommonParameters((char*)anID.c_str(), savePoint); + SALOMEDSImpl_IParameters ip(ap); + + string dump(""); + + dump += "import iparameters\n"; + dump += "ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters(\""+anID+"\", 1))\n\n"; + + + 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]); + dump += "# fill list "+v[i]+"\n"; + for(int j = 0; j < lst.size(); j++) + dump += "ipar.append(\""+v[i]+"\", \""+lst[j]+"\")\n"; + } + } + + return dump; +} + +string SALOMEDSImpl_IParameters::getDefaultScript(const Handle(SALOMEDSImpl_Study)& study, + const string& moduleName, + const string& shift, + const string& theID) +{ + string anID; + if(theID == "") anID = getDefaultVisualComponent(); + else anID = theID; + + string dump(""); + + int savePoint = SALOMEDSImpl_IParameters::getLastSavePoint(study, anID); + if(savePoint < 0) return dump; + SALOMEDSImpl_IParameters ip = SALOMEDSImpl_IParameters(study->GetCommonParameters(anID.c_str(), savePoint)); + if(!isDumpPython(study)) return dump; + + Handle(SALOMEDSImpl_AttributeParameter) ap = study->GetModuleParameters(anID.c_str(), moduleName.c_str(), savePoint); + ip = SALOMEDSImpl_IParameters(ap); + + + dump += shift +"import iparameters\n"; + dump += shift + "ipar = iparameters.IParameters(theStudy.GetModuleParameters(\""+anID+"\", \""+moduleName+"\", 1))\n\n"; + + 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]); + dump += shift +"# fill list "+v[i]+"\n"; + for(int j = 0; j < lst.size(); j++) + dump += shift +"ipar.append(\""+v[i]+"\", \""+lst[j]+"\")\n"; + } + } + + v = ip.getEntries(); + 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]); + Handle(SALOMEDSImpl_SObject) so = study->FindObjectID((char*)decodedEntry.c_str()); + string so_name(""); + if(!so.IsNull()) so_name = so->GetName().ToCString(); + 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"; + } + } + + return dump; +} + + +string SALOMEDSImpl_IParameters::getDefaultVisualComponent() +{ + return "Interface Applicative"; +} + + diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx new file mode 100644 index 000000000..4e6d5050b --- /dev/null +++ b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx @@ -0,0 +1,153 @@ +// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// +#ifndef SALOMEDSImpl_IParameters_H +#define SALOMEDSImpl_IParameters_H + +#include +#include +#include + +#include "SALOMEDSImpl_AttributeParameter.hxx" +#include "SALOMEDSImpl_Study.hxx" + +/*! + Class which an interface to store the parameters of the objects +*/ +class SALOMEDSImpl_IParameters +{ +public: + SALOMEDSImpl_IParameters(const Handle(SALOMEDSImpl_AttributeParameter)& ap); + + virtual ~SALOMEDSImpl_IParameters(); + + /*! + Appends a string value to a named list. + Returns a number of the added value. + Note: the name of the list MUST be unique + */ + virtual int append(const std::string& listName, const std::string& value); + + /*! + Returns a number elements in the list + */ + virtual int nbValues(const std::string& listName); + + /*! + Returns a list of values in the list + */ + virtual std::vector getValues(const std::string& listName); + + /*! + Returns a value with given %index, where %index is in range [0:nbValues-1] + */ + virtual std::string getValue(const std::string& listName, int index); + + /*! + Returns a list all entries lists + */ + virtual std::vector getLists(); + + /*! + Sets a new named parameter value for the given entry + */ + virtual void setParameter(const std::string& entry, const std::string& parameterName, const std::string& value); + + /*! + Gets a named parameter value for the given entry + */ + virtual std::string getParameter(const std::string& entry, const std::string& parameterName); + + /*! + Returns all parameter names of the given entry + */ + virtual std::vector SALOMEDSImpl_IParameters::getAllParameterNames(const std::string& entry); + + /*! + Returns all parameter values of the given entry + */ + virtual std::vector SALOMEDSImpl_IParameters::getAllParameterValues(const std::string& entry); + + /*! + Returns a number of parameters of the given entry + */ + virtual int getNbParameters(const std::string& entry); + + /*! + Returns a list all entries + */ + virtual std::vector getEntries(); + + /*! + Sets a global named property value + */ + virtual void setProperty(const std::string& name, const std::string& value); + + /*! + Gets a value of global named property + */ + virtual std::string getProperty(const std::string& name); + + /*! + Returns a list all properties + */ + virtual std::vector getProperties(); + + /*! + Returns decoded entry that is an absolute entry + */ + virtual std::string decodeEntry(const std::string& entry); + + + /*! + Returns whether there is the dumping visual parameters + */ + static bool isDumpPython(const Handle(SALOMEDSImpl_Study)& study, const string& theID = ""); + + /*! + Returns an ID of the last save point + */ + static int getLastSavePoint(const Handle(SALOMEDSImpl_Study)& study, const std::string& theID = ""); + + /*! + Returns a Python script for the study, which sets up visual parameters + */ + static std::string getStudyScript(const Handle(SALOMEDSImpl_Study)& study, int savePoint, const std::string& theID = ""); + + /*! + Returns a default Python script that set ups visual parameters for the given module + shift is a string that contain spaces to make valid Python script indentaion + */ + static std::string getDefaultScript(const Handle(SALOMEDSImpl_Study)& study, + const std::string& moduleName, + const std::string& shift, + const std::string& theID = ""); + + /*! + Returns a default name of the component where the visula parameters are stored. + */ + static std::string getDefaultVisualComponent(); + +private: + Handle(SALOMEDSImpl_AttributeParameter) _ap; + Handle(SALOMEDSImpl_Study) _study; + std::map _compNames; +}; + + +#endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx index b3452db04..ff3b3112e 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx @@ -46,6 +46,7 @@ using namespace std; #include "SALOMEDSImpl_AttributeReference.hxx" #include "SALOMEDSImpl_StudyHandle.hxx" #include "SALOMEDSImpl_Tool.hxx" +#include "SALOMEDSImpl_IParameters.hxx" IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_Study, MMgt_TShared ) IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_Study, MMgt_TShared ) @@ -1303,6 +1304,19 @@ bool SALOMEDSImpl_Study::DumpStudy(const TCollection_AsciiString& thePath, fp << "import " << aBatchModeScript << "\n" << endl; fp << "sys.path.insert( 0, \'" << thePath << "\')\n" << endl; + + //Check if it's necessary to dump visual parameters + bool isDumpVisuals = SALOMEDSImpl_IParameters::isDumpPython(this); + int lastSavePoint = -1; + if(isDumpVisuals) { + lastSavePoint = SALOMEDSImpl_IParameters::getLastSavePoint(this); + if(lastSavePoint > 0) { + fp << SALOMEDSImpl_IParameters::getStudyScript(this, lastSavePoint); + fp << "\n" << endl; + } + } + + Handle(TColStd_HSequenceOfAsciiString) aSeqOfFileNames = new TColStd_HSequenceOfAsciiString; //Iterate all components and create the componponents specific scripts. @@ -1345,7 +1359,7 @@ bool SALOMEDSImpl_Study::DumpStudy(const TCollection_AsciiString& thePath, bool isValidScript; long aStreamLength = 0; - unsigned char* aStream = aDriver->DumpPython(this, isPublished, isValidScript, aStreamLength); + Handle(SALOMEDSImpl_TMPFile) aStream = aDriver->DumpPython(this, isPublished, isValidScript, aStreamLength); if ( !isValidScript ) isOk = false; @@ -1379,16 +1393,18 @@ bool SALOMEDSImpl_Study::DumpStudy(const TCollection_AsciiString& thePath, } //Output the Python script generated by the component in the newly created file. - fp2 << aStream; + fp2 << aStream->Data(); fp2.close(); - if (aStream != NULL) 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; } + if(isDumpVisuals) { //Output the call to Session's method restoreVisualState + fp << "iparameters.getSession().restoreVisualState(1)" << endl; + } + fp << "salome.sg.updateObjBrowser(1)" << endl; fp.close(); @@ -1500,3 +1516,55 @@ void SALOMEDSImpl_Study::Modify() _errorCode = ""; _doc->Modify(); } + +//============================================================================ +/*! Function : + * Purpose : + */ +//============================================================================ +Handle(SALOMEDSImpl_AttributeParameter) SALOMEDSImpl_Study::GetCommonParameters(const char* theID, int theSavePoint) +{ + if(theSavePoint < 0) return NULL; + Handle(SALOMEDSImpl_StudyBuilder) builder = NewBuilder(); + Handle(SALOMEDSImpl_SObject) so = FindComponent((char*)theID); + if(so.IsNull()) so = builder->NewComponent((char*)theID); + Handle(SALOMEDSImpl_SObject) newSO; + if(theSavePoint == 0) //Get an attribute that is placed on the component itself. + newSO = so; + else + newSO = builder->NewObjectToTag(so, theSavePoint); + return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(builder->FindOrCreateAttribute(newSO, "AttributeParameter")); +} + +//============================================================================ +/*! Function : + * Purpose : + */ +//============================================================================ +Handle(SALOMEDSImpl_AttributeParameter) SALOMEDSImpl_Study::GetModuleParameters(const char* theID, + const char* theModuleName, + int theSavePoint) +{ + if(theSavePoint <= 0) return NULL; + Handle(SALOMEDSImpl_AttributeParameter) main_ap = GetCommonParameters(theID, theSavePoint); + Handle(SALOMEDSImpl_SObject) main_so = main_ap->GetSObject(); + Handle(SALOMEDSImpl_AttributeParameter) par; + + Handle(SALOMEDSImpl_ChildIterator) it = NewChildIterator(main_so); + string moduleName(theModuleName); + for(; it->More(); it->Next()) { + Handle(SALOMEDSImpl_SObject) so(it->Value()); + Handle(SALOMEDSImpl_GenericAttribute) ga; + if(so->FindAttribute(ga, "AttributeParameter")) { + par = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(ga); + if(!par->IsSet("AP_MODULE_NAME", (Parameter_Types)3)) continue; //3 -> PT_STRING + if(par->GetString("AP_MODULE_NAME") == moduleName) return par; + } + } + + Handle(SALOMEDSImpl_StudyBuilder) builder = NewBuilder(); + Handle(SALOMEDSImpl_SObject) so = builder->NewObject(main_so); + par = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(builder->FindOrCreateAttribute(so, "AttributeParameter")); + par->SetString("AP_MODULE_NAME", moduleName); + return par; +} diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx index d87b4ec8d..c22b2cd77 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx @@ -56,6 +56,7 @@ DEFINE_STANDARD_HANDLE( SALOMEDSImpl_Study, MMgt_TShared ) #include "SALOMEDSImpl_UseCaseBuilder.hxx" #include "SALOMEDSImpl_AttributeStudyProperties.hxx" #include "SALOMEDSImpl_AttributeIOR.hxx" +#include "SALOMEDSImpl_AttributeParameter.hxx" #include "SALOMEDSImpl_Callback.hxx" #include "SALOMEDSImpl_Driver.hxx" #include "SALOMEDSImpl_ChildIterator.hxx" @@ -254,9 +255,9 @@ public: Standard_EXPORT virtual bool HasCurrentContext() { return !_current.IsNull(); } Standard_EXPORT virtual bool DumpStudy(const TCollection_AsciiString& thePath, - const TCollection_AsciiString& theBaseName, - bool isPublished, - SALOMEDSImpl_DriverFactory* theFactory); + const TCollection_AsciiString& theBaseName, + bool isPublished, + SALOMEDSImpl_DriverFactory* theFactory); Standard_EXPORT static TCollection_AsciiString GetDumpStudyComment(const char* theComponentName = 0); @@ -268,6 +269,12 @@ public: //This method marks the study as being modified Standard_EXPORT void Modify(); + Standard_EXPORT Handle(SALOMEDSImpl_AttributeParameter) GetCommonParameters(const char* theID, int theSavePoint); + + Standard_EXPORT Handle(SALOMEDSImpl_AttributeParameter) GetModuleParameters(const char* theID, + const char* theModuleName, + int theSavePoint); + public: DEFINE_STANDARD_RTTI( SALOMEDSImpl_Study ) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx index ebf67aeca..f3f68e2da 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx @@ -23,8 +23,6 @@ #include "SALOMEDSImpl_StudyManager.hxx" -using namespace std; - #include #include #include @@ -52,6 +50,8 @@ using namespace std; #include #include +using namespace std; + IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_StudyManager, MMgt_TShared ) IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_StudyManager, MMgt_TShared ) @@ -153,16 +153,16 @@ Handle(SALOMEDSImpl_Study) SALOMEDSImpl_StudyManager::Open(const TCollection_Asc } catch (HDFexception) { -#ifndef WNT - char eStr[strlen(aUrl.ToCString())+17]; -#else +//#ifndef WNT +// char eStr[strlen(aUrl.ToCString())+17]; +//#else char *eStr; eStr = new char[strlen(aUrl.ToCString())+17]; -#endif +//#endif sprintf(eStr,"Can't open file %s",aUrl.ToCString()); -#ifdef WNT +//#ifdef WNT delete [] eStr; -#endif +//#endif _errorCode = TCollection_AsciiString(eStr); return NULL; } @@ -195,11 +195,11 @@ Handle(SALOMEDSImpl_Study) SALOMEDSImpl_StudyManager::Open(const TCollection_Asc } catch (HDFexception) { -#ifndef WNT - char eStr[strlen(aUrl.ToCString())+17]; -#else +//#ifndef WNT +// char eStr[strlen(aUrl.ToCString())+17]; +//#else char *eStr = new char [strlen(aUrl.ToCString())+17]; -#endif +//#endif sprintf(eStr,"Can't open file %s", aUrl.ToCString()); _errorCode = TCollection_AsciiString(eStr); return NULL; @@ -624,7 +624,7 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const TCollection_AsciiString& aUrl, if (Engine != NULL) { - unsigned char* aStream; + Handle(SALOMEDSImpl_TMPFile) aStream; long length; if (theASCII) aStream = Engine->SaveASCII(sco, @@ -643,7 +643,7 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const TCollection_AsciiString& aUrl, HDFdataset *hdf_dataset = new HDFdataset("FILE_STREAM", hdf_sco_group, HDF_STRING, aHDFSize, 1); hdf_dataset->CreateOnDisk(); - hdf_dataset->WriteOnDisk(aStream); //Save the stream in the HDF file + hdf_dataset->WriteOnDisk(aStream->Data()); //Save the stream in the HDF file hdf_dataset->CloseOnDisk(); } @@ -663,8 +663,6 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const TCollection_AsciiString& aUrl, 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); - - if(aStream != NULL) delete [] aStream; } } hdf_sco_group->CloseOnDisk(); @@ -741,6 +739,16 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const TCollection_AsciiString& aUrl, _errorCode = "HDFexception ! "; return false; } + catch(std::exception& exc) + { + _errorCode = const_cast(exc.what()); + return false; + } + catch(...) + { + _errorCode = "Unknown exception ! "; + return false; + } if (theASCII) { // save file in ASCII format HDFascii::ConvertFromHDFToASCII(aUrl.ToCString(), true); } @@ -892,12 +900,11 @@ bool SALOMEDSImpl_StudyManager::CopyLabel(const Handle(SALOMEDSImpl_Study)& theS Handle(SALOMEDSImpl_SObject) aSO = theSourceStudy->FindObjectID(anEntry.ToCString()); int anObjID; long aLen; - unsigned char* aStream = theEngine->CopyFrom(aSO, anObjID, aLen); + Handle(SALOMEDSImpl_TMPFile) aStream = theEngine->CopyFrom(aSO, anObjID, aLen); TCollection_ExtendedString aResStr(""); for(a = 0; a < aLen; a++) { - aResStr += TCollection_ExtendedString(ToExtCharacter((Standard_Character)aStream[a])); + aResStr += TCollection_ExtendedString(ToExtCharacter(Standard_Character(aStream->Get(a)))); } - if(aStream != NULL) delete [] aStream; SALOMEDSImpl_AttributeInteger::Set(aAuxTargetLabel, anObjID); SALOMEDSImpl_AttributeName::Set(aAuxTargetLabel, aResStr); continue; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.cxx new file mode 100644 index 000000000..64f677a01 --- /dev/null +++ b/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.cxx @@ -0,0 +1,40 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// +// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server +// File : SALOMEDSImpl_SObject.cxx +// Author : Sergey RUIN +// Module : SALOME + + +#include "SALOMEDSImpl_TMPFile.hxx" + +#include +#include + + +IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_TMPFile, MMgt_TShared ) +IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_TMPFile, MMgt_TShared ) + +SALOMEDSImpl_TMPFile::TOctet* +SALOMEDSImpl_TMPFile +::Data() +{ + return &Get(0); +} diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx new file mode 100644 index 000000000..6ecd798b4 --- /dev/null +++ b/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx @@ -0,0 +1,47 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// + +#ifndef __SALOMEDSIMPL_TMPFILE_H__ +#define __SALOMEDSIMPL_TMPFILE_H__ + +//Handle definition +#include +#include +#include + + +DEFINE_STANDARD_HANDLE( SALOMEDSImpl_TMPFile, MMgt_TShared ); + + +struct SALOMEDSImpl_TMPFile : public MMgt_TShared +{ + typedef unsigned char TOctet; + + virtual size_t Size() = 0; + + virtual TOctet* Data(); + + virtual TOctet& Get(size_t) = 0; + + DEFINE_STANDARD_RTTI( SALOMEDSImpl_TMPFile ); +}; + + +#endif diff --git a/src/SALOMEDSImpl/Test/Makefile.am b/src/SALOMEDSImpl/Test/Makefile.am new file mode 100644 index 000000000..8ff0435d6 --- /dev/null +++ b/src/SALOMEDSImpl/Test/Makefile.am @@ -0,0 +1,106 @@ +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Paul RASCLE +# Module : KERNEL +# $Header$ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Files to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS= SALOMEDSImplTest.hxx + +# Scripts to be installed +dist_salomescript_SCRIPTS = TestSALOMEDSImpl.py + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This directory defines the subdirectory src in the top source directory. +RPATH=../.. + +# This local variable defines the list of CPPFLAGS common to all target in this package. +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$(srcdir)/$(RPATH)/SALOMETraceCollector/Test \ + -I$(srcdir)/$(RPATH)/NamingService -I$(srcdir)/$(RPATH)/NamingService/Test \ + -I$(srcdir)/$(RPATH)/Utils -I$(srcdir)/$(RPATH)/Utils/Test \ + -I$(srcdir)/$(RPATH)/ResourcesManager \ + -I$(srcdir)/$(RPATH)/LifeCycleCORBA \ + -I$(srcdir)/$(RPATH)/SALOMEDSImpl \ + -I$(top_builddir)/salome_adm/unix \ + -I$(top_builddir)/idl \ + @CAS_CPPFLAGS@ @CAS_CXXFLAGS@ \ + @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ + +# This local variable defines the list of dependant libraries common to all target in this package. +COMMON_LIBS =\ + @CPPUNIT_LIBS@ \ + $(RPATH)/Basics/libSALOMEBasics.la \ + $(RPATH)/ResourcesManager/libSalomeResourcesManager.la \ + $(RPATH)/Container/libSalomeContainer.la \ + $(RPATH)/NamingService/libSalomeNS.la \ + $(RPATH)/Registry/libRegistry.la \ + $(RPATH)/Notification/libSalomeNotification.la \ + $(RPATH)/Utils/Test/libUtilsTest.la \ + $(RPATH)/Utils/libOpUtil.la \ + $(RPATH)/SALOMELocalTrace/Test/libSALOMELocalTraceTest.la \ + $(RPATH)/SALOMELocalTrace/libSALOMELocalTrace.la \ + $(RPATH)/SALOMETraceCollector/Test/libSALOMETraceCollectorTest.la \ + $(RPATH)/SALOMEDSImpl/libSalomeDSImpl.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libSALOMEDSImplTest.la +libSALOMEDSImplTest_la_SOURCES = SALOMEDSImplTest.cxx +libSALOMEDSImplTest_la_CPPFLAGS = $(COMMON_CPPFLAGS) +libSALOMEDSImplTest_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libSALOMEDSImplTest_la_LIBADD = $(COMMON_LIBS) + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = TestSALOMEDSImpl +TestSALOMEDSImpl_SOURCES = TestSALOMEDSImpl.cxx +TestSALOMEDSImpl_CPPFLAGS = $(COMMON_CPPFLAGS) +TestSALOMEDSImpl_LDADD = \ + libSALOMEDSImplTest.la ../libSalomeDSImpl.la \ + $(RPATH)/NamingService/Test/libNamingServiceTest.la \ + $(COMMON_LIBS) + diff --git a/src/SALOMEDSImpl/Test/SALOMEDSImplTest.cxx b/src/SALOMEDSImpl/Test/SALOMEDSImplTest.cxx new file mode 100644 index 000000000..7ce2e5416 --- /dev/null +++ b/src/SALOMEDSImpl/Test/SALOMEDSImplTest.cxx @@ -0,0 +1,129 @@ +// Copyright (C) 2006 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// + +#include "SALOMEDSImplTest.hxx" + +#include +#include +#include +#include +#include +#include "utilities.h" + +#include "SALOMEDSImpl_AttributeParameter.hxx" +#include "SALOMEDSImpl_StudyManager.hxx" +#include "SALOMEDSImpl_Study.hxx" +#include "SALOMEDSImpl_StudyBuilder.hxx" +#include "SALOMEDSImpl_GenericAttribute.hxx" + +#include + +using namespace std; + +// ============================================================================ +/*! + * Set up the environment + */ +// ============================================================================ + +void SALOMEDSImplTest::setUp() +{ + TCollection_AsciiString kernel(getenv("KERNEL_ROOT_DIR")); + TCollection_AsciiString subPath("/share/salome/resources"); + TCollection_AsciiString csf_var = (kernel+subPath); + setenv("CSF_PluginDefaults", csf_var.ToCString(), 0); + setenv("CSF_SALOMEDS_ResourcesDefaults", csf_var.ToCString(), 0); +} + +// ============================================================================ +/*! + * - delete trace classes + */ +// ============================================================================ + +void +SALOMEDSImplTest::tearDown() +{ +} + +// ============================================================================ +/*! + * Check setting int value + */ +// ============================================================================ +void SALOMEDSImplTest::testAttributeParameter() +{ + Handle(SALOMEDSImpl_StudyManager) sm = new SALOMEDSImpl_StudyManager(); + Handle(SALOMEDSImpl_Study) study = sm->NewStudy("Test"); + Handle(SALOMEDSImpl_AttributeParameter) _ap = study->GetCommonParameters("TestComp", 0); + + CPPUNIT_ASSERT(!_ap.IsNull()); + + _ap->SetInt("IntValue", 1); + CPPUNIT_ASSERT(_ap->IsSet("IntValue", PT_INTEGER)); + CPPUNIT_ASSERT(_ap->GetInt("IntValue") == 1); + + _ap->SetReal("RealValue", 1.2); + CPPUNIT_ASSERT(_ap->IsSet("RealValue", PT_REAL)); + CPPUNIT_ASSERT(_ap->GetReal("RealValue") == 1.2); + + _ap->SetString("StringValue", "hello"); + CPPUNIT_ASSERT(_ap->IsSet("StringValue", PT_STRING)); + CPPUNIT_ASSERT(_ap->GetString("StringValue") == "hello"); + + _ap->SetBool("BoolValue", 0); + CPPUNIT_ASSERT(_ap->IsSet("BoolValue", PT_BOOLEAN)); + CPPUNIT_ASSERT(!_ap->GetBool("BoolValue")); + + _ap->SetBool("BoolValue", 0); + CPPUNIT_ASSERT(_ap->IsSet("BoolValue", PT_BOOLEAN)); + CPPUNIT_ASSERT(!_ap->GetBool("BoolValue")); + + vector intArray; + intArray.push_back(0); + intArray.push_back(1); + + _ap->SetIntArray("IntArray", intArray); + CPPUNIT_ASSERT(_ap->IsSet("IntArray", PT_INTARRAY)); + CPPUNIT_ASSERT(_ap->GetIntArray("IntArray")[0] == 0); + CPPUNIT_ASSERT(_ap->GetIntArray("IntArray")[1] == 1); + + vector realArray; + realArray.push_back(0.0); + realArray.push_back(1.1); + + _ap->SetRealArray("RealArray", realArray); + CPPUNIT_ASSERT(_ap->IsSet("RealArray", PT_REALARRAY)); + CPPUNIT_ASSERT(_ap->GetRealArray("RealArray")[0] == 0.0); + CPPUNIT_ASSERT(_ap->GetRealArray("RealArray")[1] == 1.1); + + vector strArray; + strArray.push_back("hello"); + strArray.push_back("world"); + + _ap->SetStrArray("StrArray", strArray); + CPPUNIT_ASSERT(_ap->IsSet("StrArray", PT_STRARRAY)); + CPPUNIT_ASSERT(_ap->GetStrArray("StrArray")[0] == "hello"); + CPPUNIT_ASSERT(_ap->GetStrArray("StrArray")[1] == "world"); + +} + + + diff --git a/src/SALOMEDSImpl/Test/SALOMEDSImplTest.hxx b/src/SALOMEDSImpl/Test/SALOMEDSImplTest.hxx new file mode 100644 index 000000000..0abba8283 --- /dev/null +++ b/src/SALOMEDSImpl/Test/SALOMEDSImplTest.hxx @@ -0,0 +1,39 @@ +// Copyright (C) 2006 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// + +#ifndef _SALOMEDSImplTEST_HXX_ +#define _SALOMEDSImplTEST_HXX_ + +#include + +class SALOMEDSImplTest : public CppUnit::TestFixture +{ + CPPUNIT_TEST_SUITE( SALOMEDSImplTest ); + CPPUNIT_TEST( testAttributeParameter ); + CPPUNIT_TEST_SUITE_END(); + +public: + + void setUp(); + void tearDown(); + void testAttributeParameter(); +}; + +#endif diff --git a/src/SALOMEDSImpl/Test/TestSALOMEDSImpl.cxx b/src/SALOMEDSImpl/Test/TestSALOMEDSImpl.cxx new file mode 100644 index 000000000..2456fc6ed --- /dev/null +++ b/src/SALOMEDSImpl/Test/TestSALOMEDSImpl.cxx @@ -0,0 +1,31 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// + +// --- include all SALOMEDSImpl Test from basics until the present directory + +#include "SALOMEDSImplTest.hxx" + +// --- Registers the fixture into the 'registry' + +CPPUNIT_TEST_SUITE_REGISTRATION( SALOMEDSImplTest ); + +// --- generic Main program from Basic/Test + +#include "BasicMainTest.hxx" diff --git a/src/SALOMEDSImpl/Test/TestSALOMEDSImpl.py b/src/SALOMEDSImpl/Test/TestSALOMEDSImpl.py new file mode 100644 index 000000000..985241ad8 --- /dev/null +++ b/src/SALOMEDSImpl/Test/TestSALOMEDSImpl.py @@ -0,0 +1,29 @@ + +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 = ['TestSALOMEDSImpl'] +ret = os.spawnvp(os.P_WAIT, command[0], command) + +# kill Test process + +TestKiller.killProcess(runSalome.process_id) diff --git a/src/SALOMEDSImpl/testDS.cxx b/src/SALOMEDSImpl/testDS.cxx index 8adcc07b5..0f8f2f61b 100644 --- a/src/SALOMEDSImpl/testDS.cxx +++ b/src/SALOMEDSImpl/testDS.cxx @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -37,6 +38,8 @@ #include "SALOMEDSImpl_StudyBuilder.hxx" #include "SALOMEDSImpl_SObject.hxx" #include "SALOMEDSImpl_SComponent.hxx" +#include "SALOMEDSImpl_AttributeParameter.hxx" + //#include "SALOMEDSImpl_.hxx" int main (int argc, char * argv[]) @@ -81,15 +84,106 @@ int main (int argc, char * argv[]) aBuilder->RemoveObject(aSubSO); cout << "Remove: done" << endl; + cout << "Check AttributeTreeNode " << endl; + aTDFAttr = aBuilder->FindOrCreateAttribute(aSO, "AttributeTreeNode"); + cout << Handle(SALOMEDSImpl_GenericAttribute)::DownCast(aTDFAttr)->Type() << endl; + cout << "Check AttributeTreeNode : done " << endl; + + aTDFAttr = aBuilder->FindOrCreateAttribute(aSO, "AttributeParameter"); + cout << Handle(SALOMEDSImpl_GenericAttribute)::DownCast(aTDFAttr)->Type() << endl; + cout << "Check the attributes on SObject" << endl; Handle(TColStd_HSequenceOfTransient) aSeq = aSO->GetAllAttributes(); for(int i = 1; i <= aSeq->Length(); i++) cout << "Found: " << Handle(SALOMEDSImpl_GenericAttribute)::DownCast(aSeq->Value(i))->Type() << endl; - cout << "Check AttributeTreeNode " << endl; - aTDFAttr = aBuilder->FindOrCreateAttribute(aSO, "AttributeTreeNode"); - cout << Handle(SALOMEDSImpl_GenericAttribute)::DownCast(aTDFAttr)->Type() << endl; - cout << "Check AttributeTreeNode : done " << endl; + + + cout << "Check AttributeParameter " << endl; + + Handle(SALOMEDSImpl_AttributeParameter) AP = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(aTDFAttr); + + cout << "AttributeParameter with type : " << AP->Type() << endl; + + AP->SetInt("1", 123); + cout << "IsSet for int: " << AP->IsSet("1", PT_INTEGER) << " value : " << AP->GetInt("1") << 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; + //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; + /* + for(int i = 2; i < 5; i++) { + TCollection_AsciiString s((double)(1.0/i)); + cout << "Setting for " << i << " value : " << s << endl; + AP->SetString(i, s); + } + */ + + AP->SetBool("1", true); + cout << "IsSet for bool: " << AP->IsSet("1", PT_BOOLEAN) << " value : " << AP->GetBool("1") << endl; + //for(int i = 2; i < 5; i++) AP->SetBool(i, 0); + + 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; iSetRealArray("2", v); + + vector vi; + vi.push_back(1); + vi.push_back(2); + AP->SetIntArray("2", vi); + + vector vs; + vs.push_back("hello, "); + vs.push_back("world!"); + AP->SetStrArray("3", vs); + + TCollection_AsciiString as = AP->Save(); + cout << "AS = " << as << 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; + + 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; + + cout << "Check AttributeParameter : done" << endl; cout << "Test finished " << endl; return 0; diff --git a/src/SALOMELocalTrace/BaseTraceCollector.cxx b/src/SALOMELocalTrace/BaseTraceCollector.cxx index de6121897..d70735f67 100644 --- a/src/SALOMELocalTrace/BaseTraceCollector.cxx +++ b/src/SALOMELocalTrace/BaseTraceCollector.cxx @@ -29,15 +29,15 @@ #include #include -using namespace std; - #include "BaseTraceCollector.hxx" #include "LocalTraceBufferPool.hxx" +using namespace std; + // Class attributes initialisation, for class method BaseTraceCollector::run BaseTraceCollector* BaseTraceCollector::_singleton = 0; -pthread_mutex_t BaseTraceCollector::_singletonMutex; +pthread_mutex_t BaseTraceCollector::_singletonMutex = PTHREAD_MUTEX_INITIALIZER ; sem_t BaseTraceCollector::_sem; int BaseTraceCollector::_threadToClose = 0; pthread_t* BaseTraceCollector::_threadId = 0; // used to control single run diff --git a/src/SALOMELocalTrace/LocalTraceBufferPool.cxx b/src/SALOMELocalTrace/LocalTraceBufferPool.cxx index c7d321ec6..a6ffdb3c0 100644 --- a/src/SALOMELocalTrace/LocalTraceBufferPool.cxx +++ b/src/SALOMELocalTrace/LocalTraceBufferPool.cxx @@ -51,12 +51,12 @@ using namespace std; // Class static attributes initialisation LocalTraceBufferPool* LocalTraceBufferPool::_singleton = 0; -#ifndef WNT -pthread_mutex_t LocalTraceBufferPool::_singletonMutex; -#else +//#ifndef WNT +//pthread_mutex_t LocalTraceBufferPool::_singletonMutex; +//#else pthread_mutex_t LocalTraceBufferPool::_singletonMutex = PTHREAD_MUTEX_INITIALIZER; -#endif +//#endif BaseTraceCollector *LocalTraceBufferPool::_myThreadTrace = 0; // ============================================================================ diff --git a/src/SALOMELocalTrace/Makefile.in b/src/SALOMELocalTrace/Makefile.am similarity index 59% rename from src/SALOMELocalTrace/Makefile.in rename to src/SALOMELocalTrace/Makefile.am index daf7c9d19..f9cec5a2b 100644 --- a/src/SALOMELocalTrace/Makefile.in +++ b/src/SALOMELocalTrace/Makefile.am @@ -21,36 +21,30 @@ # # # -# File : Makefile.in -# Author : Paul RASCLE (EDF) +# File : Makefile.am +# Author : Guillaume BOULANT (CSSI) # Module : SALOME # $Header$ -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl +include $(top_srcdir)/salome_adm/unix/make_common_starter.am +salomeinclude_HEADERS = \ + utilities.h \ + LocalTraceBufferPool.hxx \ + BaseTraceCollector.hxx -@COMMENCE@ +lib_LTLIBRARIES = libSALOMELocalTrace.la -# header files -EXPORT_HEADERS= utilities.h \ - LocalTraceBufferPool.hxx \ - BaseTraceCollector.hxx +libSALOMELocalTrace_la_SOURCES = \ + BaseTraceCollector.cxx \ + BaseTraceCollector.hxx \ + LocalTraceCollector.cxx \ + LocalTraceCollector.hxx \ + FileTraceCollector.cxx \ + FileTraceCollector.hxx \ + LocalTraceBufferPool.cxx \ + LocalTraceBufferPool.hxx -EXPORT_PYSCRIPTS = - -# Libraries targets - -LIB = libSALOMELocalTrace.la -LIB_SRC = BaseTraceCollector.cxx \ - LocalTraceCollector.cxx \ - FileTraceCollector.cxx \ - LocalTraceBufferPool.cxx - -LIBS= @LIBS@ -LDFLAGS+= -lSALOMEBasics - - -@CONCLUDE@ +libSALOMELocalTrace_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libSALOMELocalTrace_la_CPPFLAGS = -I$(srcdir)/../Basics +libSALOMELocalTrace_la_LIBADD = ../Basics/libSALOMEBasics.la diff --git a/src/SALOMELocalTrace/Test/Makefile.am b/src/SALOMELocalTrace/Test/Makefile.am new file mode 100644 index 000000000..3dd30e3d9 --- /dev/null +++ b/src/SALOMELocalTrace/Test/Makefile.am @@ -0,0 +1,78 @@ +# SALOMELocalTrace : log on local machine +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL +# $Header$ + + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# This directory defines the subdirectory src in the top source directory. +SRCROOT=$(srcdir)/../.. + +# +# =============================================================== +# Files to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS = SALOMELocalTraceTest.hxx + +# Executable scripts to be installed +dist_salomescript_SCRIPTS = TestSALOMELocalTrace.py + +# +# =============================================================== +# Libraries targets +# =============================================================== +# + +lib_LTLIBRARIES = libSALOMELocalTraceTest.la +libSALOMELocalTraceTest_la_SOURCES = SALOMELocalTraceTest.cxx +libSALOMELocalTraceTest_la_CPPFLAGS = \ + @CPPUNIT_INCLUDES@ \ + -I$(SRCROOT)/SALOMELocalTrace \ + -I$(SRCROOT)/Basics + +libSALOMELocalTraceTest_la_LIBADD = \ + @CPPUNIT_LIBS@ \ + ../../SALOMELocalTrace/libSALOMELocalTrace.la + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = TestSALOMELocalTrace +TestSALOMELocalTrace_SOURCES = TestSALOMELocalTrace.cxx +TestSALOMELocalTrace_CPPFLAGS = \ + @CPPUNIT_INCLUDES@ \ + -I$(SRCROOT)/Basics/Test + +TestSALOMELocalTrace_LDADD = \ + @CPPUNIT_LIBS@ \ + libSALOMELocalTraceTest.la \ + ../../SALOMELocalTrace/libSALOMELocalTrace.la \ + ../../Basics/libSALOMEBasics.la diff --git a/src/SALOMELocalTrace/Test/Makefile.in b/src/SALOMELocalTrace/Test/Makefile.in deleted file mode 100644 index 172313ee3..000000000 --- a/src/SALOMELocalTrace/Test/Makefile.in +++ /dev/null @@ -1,62 +0,0 @@ -# SALOMELocalTrace : log on local machine -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE (EDF) -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -# header files -EXPORT_HEADERS= SALOMELocalTraceTest.hxx - -EXPORT_PYSCRIPTS = TestSALOMELocalTrace.py - -# Libraries targets - -LIB = libSALOMELocalTraceTest.la -LIB_SRC = SALOMELocalTraceTest.cxx - -# Executables targets - -BIN = TestSALOMELocalTrace -BIN_SRC = - -CXXFLAGS += @CPPUNIT_INCLUDES@ -CPPFLAGS += @CPPUNIT_INCLUDES@ - -LIBS= @LIBS@ @CPPUNIT_LIBS@ - -LDFLAGS+= -lSALOMELocalTrace - -LDFLAGSFORBIN+= \ - -lSALOMELocalTraceTest -lSALOMELocalTrace -lSALOMEBasics - -@CONCLUDE@ diff --git a/src/SALOMETraceCollector/Makefile.am b/src/SALOMETraceCollector/Makefile.am new file mode 100644 index 000000000..431d090da --- /dev/null +++ b/src/SALOMETraceCollector/Makefile.am @@ -0,0 +1,35 @@ +# SALOMETraceCollector +# +# Copyright (C) 2003 CEA/DEN, EDF R&D +# +# File : Makefile.am +# Author : Guillaume BOULANT, CSSI +# Module : KERNEL +# $Header$ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# header files +salomeinclude_HEADERS = \ + SALOMETraceCollector.hxx \ + TraceCollector_WaitForServerReadiness.hxx + +# Libraries targets +lib_LTLIBRARIES = libwith_loggerTraceCollector.la + +libwith_loggerTraceCollector_la_SOURCES =\ + SALOMETraceCollector.cxx \ + TraceCollector_WaitForServerReadiness.cxx + +libwith_loggerTraceCollector_la_CPPFLAGS =\ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(top_builddir)/salome_adm/unix \ + -I$(top_builddir)/idl \ + @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ + +libwith_loggerTraceCollector_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libwith_loggerTraceCollector_la_LIBADD = \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la\ + @CORBA_LIBS@ diff --git a/src/SALOMETraceCollector/Makefile.in b/src/SALOMETraceCollector/Makefile.in deleted file mode 100644 index a05ab828c..000000000 --- a/src/SALOMETraceCollector/Makefile.in +++ /dev/null @@ -1,52 +0,0 @@ -# SALOMELocalTrace : log on local machine -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE (EDF) -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -# header files -EXPORT_HEADERS= SALOMETraceCollector.hxx \ - TraceCollector_WaitForServerReadiness.hxx - -EXPORT_PYSCRIPTS = - -# Libraries targets - -LIB = libwith_loggerTraceCollector.la -LIB_SRC = SALOMETraceCollector.cxx \ - TraceCollector_WaitForServerReadiness.cxx - -LIB_CLIENT_IDL = Logger.idl -LDFLAGS+= -lSALOMELocalTrace - -@CONCLUDE@ diff --git a/src/SALOMETraceCollector/Test/Makefile.am b/src/SALOMETraceCollector/Test/Makefile.am new file mode 100644 index 000000000..dd715ebf3 --- /dev/null +++ b/src/SALOMETraceCollector/Test/Makefile.am @@ -0,0 +1,90 @@ +####################################### library +# SALOMELocalTrace : log on local machine +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL +# $Header$ + + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Files to be installed +# =============================================================== +# + +# header files +salomeinclude_HEADERS= SALOMETraceCollectorTest.hxx + +# Scripts to be installed +dist_salomescript_SCRIPTS = TestSALOMETraceCollector.py + + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This directory defines the subdirectory src in the top source directory. +RPATH=../.. + + +# This local variable defines the list of CPPFLAGS common to all target in this package. +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 + +# This local variable defines the list of dependant libraries common to all target in this package. +COMMON_LIBS =\ + @CPPUNIT_LIBS@ \ + $(RPATH)/SALOMELocalTrace/Test/libSALOMELocalTraceTest.la $(RPATH)/SALOMELocalTrace/libSALOMELocalTrace.la \ + $(RPATH)/Basics/libSALOMEBasics.la + + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libSALOMETraceCollectorTest.la +libSALOMETraceCollectorTest_la_SOURCES = SALOMETraceCollectorTest.cxx +libSALOMETraceCollectorTest_la_CPPFLAGS = $(COMMON_CPPFLAGS) +libSALOMETraceCollectorTest_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libSALOMETraceCollectorTest_la_LIBADD = $(COMMON_LIBS) + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = TestSALOMETraceCollector +TestSALOMETraceCollector_SOURCES = TestSALOMETraceCollector.cxx +TestSALOMETraceCollector_CPPFLAGS = $(COMMON_CPPFLAGS) +TestSALOMETraceCollector_LDADD = libSALOMETraceCollectorTest.la $(COMMON_LIBS) diff --git a/src/SALOMETraceCollector/Test/Makefile.in b/src/SALOMETraceCollector/Test/Makefile.in deleted file mode 100644 index ddc7c53ca..000000000 --- a/src/SALOMETraceCollector/Test/Makefile.in +++ /dev/null @@ -1,64 +0,0 @@ -# SALOMELocalTrace : log on local machine -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE (EDF) -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -# header files -EXPORT_HEADERS= SALOMETraceCollectorTest.hxx - -EXPORT_PYSCRIPTS = TestSALOMETraceCollector.py - -# Libraries targets - -LIB = libSALOMETraceCollectorTest.la -LIB_SRC = SALOMETraceCollectorTest.cxx - -# Executables targets - -BIN = TestSALOMETraceCollector -BIN_SRC = - - -CXXFLAGS += @CPPUNIT_INCLUDES@ -CPPFLAGS += @CPPUNIT_INCLUDES@ - -LIBS= @LIBS@ @CPPUNIT_LIBS@ - -LDFLAGS+= - -LDFLAGSFORBIN+= \ - -lSALOMELocalTraceTest -lSALOMELocalTrace -lSALOMEBasics \ - -lSALOMETraceCollectorTest - -@CONCLUDE@ diff --git a/src/TOOLSDS/Makefile.am b/src/TOOLSDS/Makefile.am new file mode 100644 index 000000000..573736271 --- /dev/null +++ b/src/TOOLSDS/Makefile.am @@ -0,0 +1,55 @@ +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Files to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS = SALOMEDS_Tool.hxx + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This local variable defines the list of CPPFLAGS common to all target in this package. +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@ \ + @CAS_CPPFLAGS@ @CAS_CXXFLAGS@ \ + @HDF5_INCLUDES@ \ + @BOOST_CPPFLAGS@ + +# This local variable defines the list of dependant libraries common to all target in this package. +COMMON_LIBS =\ + ../Utils/libOpUtil.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la\ + @CAS_KERNEL@ + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libTOOLSDS.la +libTOOLSDS_la_SOURCES = \ + SALOMEDS_Tool.cxx + +libTOOLSDS_la_CPPFLAGS = $(COMMON_CPPFLAGS) +libTOOLSDS_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libTOOLSDS_la_LIBADD = $(COMMON_LIBS) + +# +# =============================================================== +# Executables targets +# =============================================================== +# +# Nothing to build + + diff --git a/src/TOOLSDS/Makefile.in b/src/TOOLSDS/Makefile.in deleted file mode 100644 index 1b41aefa7..000000000 --- a/src/TOOLSDS/Makefile.in +++ /dev/null @@ -1,36 +0,0 @@ -#============================================================================== -# File : Makefile.in -# Author : Marc Tajchman -#============================================================================== - -# source path -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_srcdir)/idl - - -@COMMENCE@ - -EXPORT_HEADERS = SALOMEDS_Tool.hxx - -# Libraries targets - -LIB = libTOOLSDS.la -LIB_SRC = \ - SALOMEDS_Tool.cxx \ - -# Executables targets -BIN = -BIN_SRC = -LIB_SERVER_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Exception.idl SALOME_GenericObj.idl -BIN_SERVER_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl -BIN_CLIENT_IDL = - -CPPFLAGS+=$(OCC_INCLUDES) $(HDF5_INCLUDES) $(BOOST_CPPFLAGS) -CXXFLAGS+=$(OCC_CXXFLAGS) $(BOOST_CPPFLAGS) -LDFLAGS+= -lOpUtil $(CAS_KERNEL) - -@CONCLUDE@ - - diff --git a/src/TOOLSDS/SALOMEDS_Tool.cxx b/src/TOOLSDS/SALOMEDS_Tool.cxx index fa13a1eb4..90263d1de 100644 --- a/src/TOOLSDS/SALOMEDS_Tool.cxx +++ b/src/TOOLSDS/SALOMEDS_Tool.cxx @@ -150,112 +150,133 @@ void SALOMEDS_Tool::RemoveTemporaryFiles(const std::string& theDirectory, // function : PutFilesToStream // purpose : converts the files from a list 'theFiles' to the stream //============================================================================ -SALOMEDS::TMPFile* -SALOMEDS_Tool::PutFilesToStream(const std::string& theFromDirectory, - const SALOMEDS::ListOfFileNames& theFiles, - const int theNamesOnly) +namespace { - int i, aLength = theFiles.length(); - if(aLength == 0) -// return NULL; - return (new SALOMEDS::TMPFile); - - //Get a temporary directory for saved a file - TCollection_AsciiString aTmpDir(const_cast(theFromDirectory.c_str())); - - long aBufferSize = 0; - long aCurrentPos; - - int aNbFiles = 0; - int* aFileNameSize= new int[aLength]; - long* aFileSize= new long[aLength]; - - //Determine the required size of the buffer - - for(i=0; i(theFromDirectory.c_str())); + + long aBufferSize = 0; + long aCurrentPos; + + int aNbFiles = 0; + int* aFileNameSize= new int[aLength]; + long* aFileSize= new long[aLength]; - if (!theNamesOnly) { // mpv 15.01.2003: if only file names must be stroed, then size of files is zero - TCollection_AsciiString aFullPath = aTmpDir + CORBA::string_dup(theFiles[i]); - OSD_Path anOSDPath(aFullPath); - OSD_File anOSDFile(anOSDPath); - if(!anOSDFile.Exists()) continue; + //Determine the required size of the buffer + + for(i=0; i(theFiles[i].in()); + OSD_Path anOSDPath(aFullPath); + OSD_File anOSDFile(anOSDPath); + if(!anOSDFile.Exists()) continue; #ifdef WNT - ifstream aFile(aFullPath.ToCString(), ios::binary); + ifstream aFile(aFullPath.ToCString(), ios::binary); #else - ifstream aFile(aFullPath.ToCString()); + ifstream aFile(aFullPath.ToCString()); #endif - aFile.seekg(0, ios::end); - aFileSize[i] = aFile.tellg(); - aBufferSize += aFileSize[i]; //Add a space to store the file - } - aFileNameSize[i] = strlen(theFiles[i])+1; - aBufferSize += aFileNameSize[i]; //Add a space to store the file name - aBufferSize += (theNamesOnly)?4:12; //Add 4 bytes: a length of the file name, - // 8 bytes: length of the file itself - aNbFiles++; - } - - 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) -// return NULL; - return (new SALOMEDS::TMPFile); - - //Initialize 4 bytes of the buffer by 0 - memset(aBuffer, 0, 4); - //Copy the number of files that will be written to the stream - memcpy(aBuffer, &aNbFiles, ((sizeof(int) > 4) ? 4 : sizeof(int))); - - - aCurrentPos = 4; - - for(i=0; i 4) ? 4 : sizeof(int))); + + + aCurrentPos = 4; + + for(i=0; i(theFiles[i].in()); + OSD_Path anOSDPath(aFullPath); + OSD_File anOSDFile(anOSDPath); + if(!anOSDFile.Exists()) continue; #ifdef WNT - aFile = new ifstream(aFullPath.ToCString(), ios::binary); + aFile = new ifstream(aFullPath.ToCString(), ios::binary); #else - aFile = new ifstream(aFullPath.ToCString()); + aFile = new ifstream(aFullPath.ToCString()); #endif - } - //Initialize 4 bytes of the buffer by 0 - memset((aBuffer + aCurrentPos), 0, 4); - //Copy the length of the file name to the buffer - memcpy((aBuffer + aCurrentPos), (aFileNameSize + i), ((sizeof(int) > 4) ? 4 : sizeof(int))); - aCurrentPos += 4; - - //Copy the file name to the buffer - memcpy((aBuffer + aCurrentPos), theFiles[i], aFileNameSize[i]); - 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; + } + //Initialize 4 bytes of the buffer by 0 + memset((aBuffer + aCurrentPos), 0, 4); + //Copy the length of the file name to the buffer + memcpy((aBuffer + aCurrentPos), (aFileNameSize + i), ((sizeof(int) > 4) ? 4 : sizeof(int))); + aCurrentPos += 4; - aFile->seekg(0, ios::beg); - aFile->read((char *)(aBuffer + aCurrentPos), aFileSize[i]); - aFile->close(); - delete(aFile); - aCurrentPos += aFileSize[i]; + //Copy the file name to the buffer + memcpy((aBuffer + aCurrentPos), theFileNames[i], aFileNameSize[i]); + 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]; + } } + + delete[] aFileNameSize; + delete[] aFileSize; + + + CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer; + + return (new SALOMEDS::TMPFile(aBufferSize, aBufferSize, anOctetBuf, 1)); } - - delete[] aFileNameSize; - delete[] aFileSize; - - CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer; - - return (new SALOMEDS::TMPFile(aBufferSize, aBufferSize, anOctetBuf, 1)); +} + + +SALOMEDS::TMPFile* +SALOMEDS_Tool::PutFilesToStream(const std::string& theFromDirectory, + const SALOMEDS::ListOfFileNames& theFiles, + const int theNamesOnly) +{ + SALOMEDS::ListOfFileNames aFileNames(theFiles); + return ::PutFilesToStream(theFromDirectory,theFiles,aFileNames,theNamesOnly); +} + + +SALOMEDS::TMPFile* +SALOMEDS_Tool::PutFilesToStream(const SALOMEDS::ListOfFileNames& theFiles, + const SALOMEDS::ListOfFileNames& theFileNames) +{ + return ::PutFilesToStream("",theFiles,theFileNames,0); } //============================================================================ diff --git a/src/TOOLSDS/SALOMEDS_Tool.hxx b/src/TOOLSDS/SALOMEDS_Tool.hxx index c36de54e7..7c7f33a0f 100644 --- a/src/TOOLSDS/SALOMEDS_Tool.hxx +++ b/src/TOOLSDS/SALOMEDS_Tool.hxx @@ -64,6 +64,10 @@ public: 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); + // Converts a byte sequence to files and places them in static SALOMEDS::ListOfFileNames_var PutStreamToFiles(const SALOMEDS::TMPFile& theStream, const std::string& theToDirectory, diff --git a/src/TestContainer/Makefile.am b/src/TestContainer/Makefile.am new file mode 100644 index 000000000..9d8599c85 --- /dev/null +++ b/src/TestContainer/Makefile.am @@ -0,0 +1,104 @@ +# SALOME TestContainer : test of container creation and its life cycle +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.in +# Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA +# Module : SALOME +# $Header$ + + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Files to be installed +# =============================================================== +# +# header files +# Scripts to be installed +dist_salomescript_DATA = \ + SALOME_TestComponentPy.py \ + TestComponentPy.py \ + TestLogger.py + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This local variable defines the list of CPPFLAGS common to all target in this package. +COMMON_CPPFLAGS=\ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../NamingService \ + -I$(srcdir)/../Utils \ + -I$(srcdir)/../Registry \ + -I$(srcdir)/../Notification \ + -I$(srcdir)/../ResourcesManager \ + -I$(srcdir)/../Container \ + -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 =\ + ../Container/libSalomeContainer.la \ + ../Registry/libRegistry.la \ + ../Notification/libSalomeNotification.la \ + ../ResourcesManager/libSalomeResourcesManager.la \ + ../NamingService/libSalomeNS.la \ + ../Utils/libOpUtil.la \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + ../Basics/libSALOMEBasics.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libSalomeTestComponentEngine.la +libSalomeTestComponentEngine_la_SOURCES = \ + SALOME_TestComponent_i.cxx \ + SALOME_TestComponent_i.hxx + +libSalomeTestComponentEngine_la_CPPFLAGS = $(COMMON_CPPFLAGS) +libSalomeTestComponentEngine_la_LIBADD = $(COMMON_LIBS) + +#LIB_CLIENT_IDL = SALOME_Component.idl SALOME_TestComponent.idl SALOME_Exception.idl + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = TestContainer TestLogger +TestContainer_SOURCES = TestContainer.cxx +TestContainer_CPPFLAGS = $(COMMON_CPPFLAGS) +TestContainer_LDADD = $(COMMON_LIBS) libSalomeTestComponentEngine.la + +TestLogger_SOURCES = TestLogger.cxx +TestLogger_CPPFLAGS = $(COMMON_CPPFLAGS) +TestLogger_LDADD = $(COMMON_LIBS) libSalomeTestComponentEngine.la diff --git a/src/TestContainer/Makefile.in b/src/TestContainer/Makefile.in deleted file mode 100644 index 40a5e8e62..000000000 --- a/src/TestContainer/Makefile.in +++ /dev/null @@ -1,52 +0,0 @@ -# SALOME TestContainer : test of container creation and its life cycle -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - -@COMMENCE@ - -EXPORT_PYSCRIPTS = SALOME_TestComponentPy.py TestComponentPy.py - -# Libraries targets - -LIB = libSalomeTestComponentEngine.la -LIB_SRC = SALOME_TestComponent_i.cxx -LIB_CLIENT_IDL = SALOME_Component.idl SALOME_TestComponent.idl SALOME_Exception.idl - -# Executables targets -BIN = TestContainer TestLogger -BIN_SRC = - -LDFLAGS+= -lSalomeNotification -lSalomeNS -lSalomeContainer -lRegistry -lOpUtil -lSALOMELocalTrace -lSalomeResourcesManager -LDFLAGSFORBIN+= -lSalomeNotification -lSalomeNS -lSalomeContainer -lRegistry -lOpUtil -lSALOMELocalTrace -lSalomeResourcesManager -lSALOMEBasics - - -@CONCLUDE@ diff --git a/src/TestContainer/TestComponentPy.py b/src/TestContainer/TestComponentPy.py index 2dacf6dbb..c1f467441 100755 --- a/src/TestContainer/TestComponentPy.py +++ b/src/TestContainer/TestComponentPy.py @@ -62,7 +62,7 @@ except CosNaming.NamingContext.NotFound, ex: sys.exit(1) container = obj._narrow(Engines.Container) -print container._get_machineName() +print container.getHostName() comp = container.load_impl("SALOME_TestComponentPy","SALOME_TestComponentPy") print comp._get_instanceName() comp.ping() diff --git a/src/TestContainer/TestContainer.cxx b/src/TestContainer/TestContainer.cxx index de2de52a0..b5604d9d1 100644 --- a/src/TestContainer/TestContainer.cxx +++ b/src/TestContainer/TestContainer.cxx @@ -40,7 +40,6 @@ #include "Utils_SINGLETON.hxx" #include "Utils_SALOME_Exception.hxx" #include "Utils_CommException.hxx" -#include "SALOMETraceCollector.hxx" using namespace std; static ostream& operator<<(ostream& os, const CORBA::Exception& e) @@ -81,7 +80,7 @@ int main (int argc, char * argv[]) { // Initializing omniORB ORB_INIT &init = *SINGLETON_::Instance() ; - CORBA::ORB_var &orb = init( argc , argv ) ; + CORBA::ORB_ptr orb = init( argc , argv ) ; // LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb); try @@ -94,6 +93,7 @@ int main (int argc, char * argv[]) CORBA::Object_var obj = _NS.Resolve(containerName.c_str()) ; Engines::Container_var iGenFact = Engines::Container::_narrow(obj); + iGenFact->ping() ; int nbInstances = 5; diff --git a/src/TestContainer/TestLogger.py b/src/TestContainer/TestLogger.py new file mode 100644 index 000000000..2d1aa7e1f --- /dev/null +++ b/src/TestContainer/TestLogger.py @@ -0,0 +1,5 @@ + +from SALOME_utilities import * + +MESSAGE("TestLogger.py : It's OK") + diff --git a/src/TestMPIContainer/Makefile.am b/src/TestMPIContainer/Makefile.am new file mode 100644 index 000000000..9ba474d04 --- /dev/null +++ b/src/TestMPIContainer/Makefile.am @@ -0,0 +1,106 @@ +# SALOME MPIContainer : implemenation of container based on MPI libraries +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : SALOME +# $Header$ + + + +# +# =============================================================== +# _CS_gbo Caution !! This package may not work. I didn't test it +# because no mpi soft is installed on my computer. To be checked. +# =============================================================== +# + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Header to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS = TestMPIComponentEngine.hxx + +# +# =============================================================== +# Local definitions +# =============================================================== +# + +# This local variable defines the list of CPPFLAGS common to all target in this package. +# _CS_gbo See wether it can be shared by all packages in a common include!! +COMMON_CPPFLAGS=\ + @MPI_INCLUDES@ \ + -I$(srcdir)/../Basics \ + -I$(srcdir)/../SALOMELocalTrace \ + -I$(srcdir)/../NamingService \ + -I$(srcdir)/../Utils \ + -I$(srcdir)/../Registry \ + -I$(srcdir)/../Notification \ + -I$(srcdir)/../ResourcesManager \ + -I$(srcdir)/../Container \ + -I$(srcdir)/../MPIContainer \ + -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 =\ + ../Registry/libRegistry.la \ + ../Notification/libSalomeNotification.la \ + ../ResourcesManager/libSalomeResourcesManager.la \ + ../NamingService/libSalomeNS.la \ + ../Utils/libOpUtil.la \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + ../Basics/libSALOMEBasics.la \ + ../Container/libSalomeContainer.la \ + ../MPIContainer/libSalomeMPIContainer.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la\ + @CORBA_LIBS@ + +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libSalomeTestMPIComponentEngine.la +libSalomeTestMPIComponentEngine_la_SOURCES = TestMPIComponentEngine.cxx +libSalomeTestMPIComponentEngine_la_CPPFLAGS = $(COMMON_CPPFLAGS) +libSalomeTestMPIComponentEngine_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libSalomeTestMPIComponentEngine_la_LIBADD = $(COMMON_LIBS) + + + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = TestMPIContainer +TestMPIContainer_SOURCES = TestMPIContainer.cxx +TestMPIContainer_LDADD = libSalomeTestMPIComponentEngine.la $(COMMON_LIBS) @MPI_LIBS@ +TestMPIContainer_CPPFLAGS = $(COMMON_CPPFLAGS) diff --git a/src/TestMPIContainer/Makefile.in b/src/TestMPIContainer/Makefile.in deleted file mode 100644 index 000d291af..000000000 --- a/src/TestMPIContainer/Makefile.in +++ /dev/null @@ -1,39 +0,0 @@ -#============================================================================== -# File : Makefile.in -# Created : mer jui 04 12:58:13 CEST 2003 -# Author : Bernard SECHER, CEA -# Project : SALOME -# Copyright : CEA 2003 -# $Header$ -#============================================================================== - -# source path -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - -@COMMENCE@ - -EXPORT_PYSCRIPTS = - -EXPORT_HEADERS = TestMPIComponentEngine.hxx - -# Libraries targets - -LIB = libSalomeTestMPIComponentEngine.la -LIB_SRC = TestMPIComponentEngine.cxx -LIB_CLIENT_IDL = Logger.idl SALOME_MPIObject.idl SALOME_TestMPIComponent.idl SALOME_Component.idl - -# Executables targets -BIN = TestMPIContainer -BIN_SRC = -BIN_CLIENT_IDL = Logger.idl SALOME_MPIObject.idl SALOME_MPIContainer.idl SALOME_TestMPIComponent.idl SALOME_Exception.idl -BIN_SERVER_IDL = - -LDFLAGSFORBIN+= -lSalomeNotification -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeMPIContainer -lSalomeContainer -lRegistry -lOpUtil -lSALOMELocalTrace -lSALOMEBasics -lSalomeResourcesManager ${MPI_LIBS} - -CXXFLAGS+=${MPI_INCLUDES} -CXX_DEPEND_FLAG+=${MPI_INCLUDES} - -@CONCLUDE@ diff --git a/src/TestMPIContainer/TestMPIContainer.cxx b/src/TestMPIContainer/TestMPIContainer.cxx index 8c7e80a1f..dfe3b7f81 100644 --- a/src/TestMPIContainer/TestMPIContainer.cxx +++ b/src/TestMPIContainer/TestMPIContainer.cxx @@ -39,7 +39,6 @@ # include "Utils_SINGLETON.hxx" #include "SALOME_NamingService.hxx" #include "OpUtil.hxx" -#include "SALOMETraceCollector.hxx" using namespace std; int main (int argc, char * argv[]) diff --git a/src/UnitTests/Makefile.am b/src/UnitTests/Makefile.am new file mode 100644 index 000000000..22bb96bba --- /dev/null +++ b/src/UnitTests/Makefile.am @@ -0,0 +1,83 @@ +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL +# $Header$ + + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Files to be installed +# =============================================================== +# + +# Executable scripts to be installed +dist_salomescript_SCRIPTS = UnitTests.py + +# +# =============================================================== +# Executables targets +# =============================================================== +# + +bin_PROGRAMS = UnitTests +UnitTests_SOURCES = UnitTests.cxx +UnitTests_CPPFLAGS =\ + @CPPUNIT_INCLUDES@ \ + -I$(srcdir)/../Basics -I$(srcdir)/../Basics/Test \ + -I$(srcdir)/../SALOMELocalTrace -I$(srcdir)/../SALOMELocalTrace/Test \ + -I$(srcdir)/../SALOMETraceCollector -I$(srcdir)/../SALOMETraceCollector/Test \ + -I$(srcdir)/../NamingService -I$(srcdir)/../NamingService/Test \ + -I$(srcdir)/../Utils -I$(srcdir)/../Utils/Test \ + -I$(srcdir)/../Registry \ + -I$(srcdir)/../Notification \ + -I$(srcdir)/../ResourcesManager \ + -I$(srcdir)/../LifeCycleCORBA -I$(srcdir)/../LifeCycleCORBA/Test \ + -I$(srcdir)/../SALOMDESImpl -I$(srcdir)/../SALOMEDSImpl/Test \ + -I$(srcdir)/../SALOMDES -I$(srcdir)/../SALOMEDS/Test \ + -I$(top_builddir)/salome_adm/unix \ + -I$(top_builddir)/idl \ + @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ + + +UnitTests_LDADD =\ + @CPPUNIT_LIBS@ \ + ../Basics/libSALOMEBasics.la \ + ../SALOMELocalTrace/libSALOMELocalTrace.la ../SALOMELocalTrace/Test/libSALOMELocalTraceTest.la \ + ../Registry/libRegistry.la \ + ../Notification/libSalomeNotification.la \ + ../ResourcesManager/libSalomeResourcesManager.la \ + ../NamingService/libSalomeNS.la ../NamingService/Test/libNamingServiceTest.la \ + ../Container/libSalomeContainer.la \ + ../SALOMETraceCollector/Test/libSALOMETraceCollectorTest.la \ + ../Utils/libOpUtil.la ../Utils/Test/libUtilsTest.la \ + ../LifeCycleCORBA/libSalomeLifeCycleCORBA.la ../LifeCycleCORBA/Test/libLifeCycleCORBATest.la \ + ../SALOMEDSImpl/libSalomeDSImpl.la ../SALOMEDSImpl/Test/libSALOMEDSImplTest.la \ + ../SALOMEDS/libSalomeDS.la ../SALOMEDS/Test/libSALOMEDSTest.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la\ + @CORBA_LIBS@ + + diff --git a/src/UnitTests/Makefile.in b/src/UnitTests/Makefile.in deleted file mode 100644 index f7651111f..000000000 --- a/src/UnitTests/Makefile.in +++ /dev/null @@ -1,69 +0,0 @@ -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE (EDF) -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -# header files -EXPORT_HEADERS= - -EXPORT_PYSCRIPTS = UnitTests.py - -# Libraries targets - -LIB = -LIB_SRC = - -# Executables targets - -BIN = UnitTests -BIN_SRC = -BIN_CLIENT_IDL = SALOME_Component.idl SALOME_TestComponent.idl \ - SALOME_Exception.idl nstest.idl - -CXXFLAGS += @CPPUNIT_INCLUDES@ -CPPFLAGS += @CPPUNIT_INCLUDES@ - -LIBS= @LIBS@ @CPPUNIT_LIBS@ - -LDFLAGSFORBIN+= \ - -lSALOMELocalTraceTest -lSALOMELocalTrace -lSALOMEBasics \ - -lSALOMETraceCollectorTest \ - -lUtilsTest -lOpUtil \ - -lNamingServiceTest -lSalomeNS \ - -lSalomeContainer -lSalomeResourcesManager \ - -lRegistry -lSalomeNotification \ - -lLifeCycleCORBATest -lSalomeLifeCycleCORBA \ - - - -@CONCLUDE@ diff --git a/src/UnitTests/UnitTests.cxx b/src/UnitTests/UnitTests.cxx index d1198cc21..edebe38ba 100644 --- a/src/UnitTests/UnitTests.cxx +++ b/src/UnitTests/UnitTests.cxx @@ -25,6 +25,8 @@ #include "UtilsTest.hxx" #include "NamingServiceTest.hxx" #include "LifeCycleCORBATest.hxx" +#include "SALOMEDSImplTest.hxx" +#include "SALOMEDSTest.hxx" // --- Registers the fixture into the 'registry' @@ -33,6 +35,8 @@ CPPUNIT_TEST_SUITE_REGISTRATION( SALOMETraceCollectorTest ); CPPUNIT_TEST_SUITE_REGISTRATION( UtilsTest ); CPPUNIT_TEST_SUITE_REGISTRATION( NamingServiceTest ); CPPUNIT_TEST_SUITE_REGISTRATION( LifeCycleCORBATest ); +CPPUNIT_TEST_SUITE_REGISTRATION( SALOMEDSImplTest ); +CPPUNIT_TEST_SUITE_REGISTRATION(SALOMEDSTest ); // --- generic Main program from Basic/Test diff --git a/src/Utils/Makefile.in b/src/Utils/Makefile.am similarity index 67% rename from src/Utils/Makefile.in rename to src/Utils/Makefile.am index c862428f3..617fae441 100644 --- a/src/Utils/Makefile.in +++ b/src/Utils/Makefile.am @@ -21,21 +21,16 @@ # # # -# File : Makefile.in -# Author : Marc Tajchman (CEA) +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) # Module : SALOME # $Header$ -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - -@COMMENCE@ +include $(top_srcdir)/salome_adm/unix/make_common_starter.am # header files -EXPORT_HEADERS= \ +salomeinclude_HEADERS =\ OpUtil.hxx \ Utils_Timer.hxx \ Utils_CorbaException.hxx \ @@ -46,26 +41,37 @@ EXPORT_HEADERS= \ Utils_SINGLETON.hxx \ Utils_DESTRUCTEUR_GENERIQUE.hxx \ Utils_ExceptHandlers.hxx \ - Utils_SignalsHandler.h \ Utils_Mutex.hxx -EXPORT_PYSCRIPTS = Utils_Identity.py SALOME_utilities.py -# Libraries targets +# Scripts to be exported +dist_salomescript_DATA =\ + Utils_Identity.py \ + SALOME_utilities.py -LIB = libOpUtil.la -LIB_SRC = OpUtil.cxx Utils_Timer.cxx duplicate.cxx \ +# Libraries targets +lib_LTLIBRARIES = libOpUtil.la +libOpUtil_la_SOURCES =\ + OpUtil.cxx Utils_Timer.cxx duplicate.cxx \ Utils_CommException.cxx \ Utils_SALOME_Exception.cxx \ Utils_Identity.cxx Utils_ORB_INIT.cxx \ Utils_DESTRUCTEUR_GENERIQUE.cxx \ Utils_ExceptHandlers.cxx \ - Utils_SignalsHandler.cxx \ Utils_Mutex.cxx -LIB_SERVER_IDL = SALOME_Exception.idl +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@ -LDFLAGS+= -lSALOMELocalTrace +libOpUtil_la_LIBADD = \ + ../SALOMELocalTrace/libSALOMELocalTrace.la \ + $(top_builddir)/idl/libSalomeIDLKernel.la\ + @CORBA_LIBS@ -@CONCLUDE@ diff --git a/src/Utils/Test/Makefile.am b/src/Utils/Test/Makefile.am new file mode 100644 index 000000000..5ef20d823 --- /dev/null +++ b/src/Utils/Test/Makefile.am @@ -0,0 +1,88 @@ +####################################### library +# SALOMELocalTrace : log on local machine +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.am +# Author : Guillaume Boulant (CSSI) +# Module : KERNEL +# $Header$ + +include $(top_srcdir)/salome_adm/unix/make_common_starter.am + +# +# =============================================================== +# Files to be installed +# =============================================================== +# +# header files +salomeinclude_HEADERS= UtilsTest.hxx + +# Scripts to be installed +dist_salomescript_SCRIPTS = TestUtils.py + + +# +# =============================================================== +# Local definitions +# =============================================================== +# +# This directory defines the subdirectory src in the top source directory. +RPATH=../.. + +# This local variable defines the list of CPPFLAGS common to all target in this package. +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$(srcdir)/$(RPATH)/SALOMETraceCollector/Test \ + -I$(srcdir)/$(RPATH)/Utils -I$(srcdir)/$(RPATH)/Utils/Test \ + -I$(top_builddir)/salome_adm/unix + +# This local variable defines the list of dependant libraries common to all target in this package. +COMMON_LIBS =\ + @CPPUNIT_LIBS@ \ + $(RPATH)/Utils/libOpUtil.la \ + $(RPATH)/SALOMELocalTrace/Test/libSALOMELocalTraceTest.la $(RPATH)/SALOMELocalTrace/libSALOMELocalTrace.la \ + $(RPATH)/SALOMETraceCollector/Test/libSALOMETraceCollectorTest.la \ + $(RPATH)/Basics/libSALOMEBasics.la +# +# =============================================================== +# Libraries targets +# =============================================================== +# +lib_LTLIBRARIES = libUtilsTest.la +libUtilsTest_la_SOURCES = UtilsTest.cxx +libUtilsTest_la_CPPFLAGS = $(COMMON_CPPFLAGS) +libUtilsTest_la_LDFLAGS = -no-undefined -version-info=0:0:0 +libUtilsTest_la_LIBADD = $(COMMON_LIBS) + +# +# =============================================================== +# Executables targets +# =============================================================== +# +bin_PROGRAMS = TestUtils +TestUtils_SOURCES = TestUtils.cxx +TestUtils_CPPFLAGS = $(COMMON_CPPFLAGS) +TestUtils_LDADD = libUtilsTest.la $(COMMON_LIBS) + diff --git a/src/Utils/Test/Makefile.in b/src/Utils/Test/Makefile.in deleted file mode 100644 index c01a6a22e..000000000 --- a/src/Utils/Test/Makefile.in +++ /dev/null @@ -1,64 +0,0 @@ -# SALOMELocalTrace : log on local machine -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Paul RASCLE (EDF) -# Module : SALOME -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -# header files -EXPORT_HEADERS= UtilsTest.hxx - -EXPORT_PYSCRIPTS = TestUtils.py - -# Libraries targets - -LIB = libUtilsTest.la -LIB_SRC = UtilsTest.cxx - -# Executables targets - -BIN = TestUtils -BIN_SRC = - -CXXFLAGS += @CPPUNIT_INCLUDES@ -CPPFLAGS += @CPPUNIT_INCLUDES@ - -LIBS= @LIBS@ @CPPUNIT_LIBS@ - -LDFLAGS+= - -LDFLAGSFORBIN+= \ - -lSALOMELocalTraceTest -lSALOMELocalTrace -lSALOMEBasics \ - -lSALOMETraceCollectorTest \ - -lUtilsTest -lOpUtil - -@CONCLUDE@ diff --git a/src/Utils/Utils_SignalsHandler.cxx b/src/Utils/Utils_SignalsHandler.cxx deleted file mode 100644 index c96747334..000000000 --- a/src/Utils/Utils_SignalsHandler.cxx +++ /dev/null @@ -1,123 +0,0 @@ -// KERNEL Utils : common utils for KERNEL -// Copyright (C) 2003 CEA -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org or email : webmaster.salome@opencascade.org - - -#include -#include -#include - -#include "Utils_SignalsHandler.h" - - -//============================================================================ -//function : Handler -//purpose : univisal handler for signals -//============================================================================ -static void Handler(int theSigId) -{ - char aMessage[256] = ""; - sprintf(aMessage,"Signal with ID = %d was cautch!",theSigId); - throw std::runtime_error(aMessage); -} - - -//======================================================================= -//function : SetSigHandler -//purpose : Redefine signal handlers. If the handler of the signal is -// set as SIG_IGN. That's why the shells often ignore some -// signal when starting child processes. We keep it. -//======================================================================= -static void SetSignalHandler(Utils_SignalsHandler::TSigHandlerCont& theSigHandlerCont, - int theSigId) -{ - TSigHandler anOldHandler = signal(theSigId,&Handler); - if(anOldHandler == SIG_IGN) - signal(theSigId,SIG_IGN); - theSigHandlerCont[theSigId] = anOldHandler; -} - -static TSigHandler StoreSignalHandler(Utils_SignalsHandler::TSigHandlerCont& theSigHandlerCont, - int theSigId) -{ - TSigHandler anOldHandler = signal(theSigId,&Handler); - signal(theSigId,anOldHandler); - if(anOldHandler == SIG_IGN) - signal(theSigId,SIG_IGN); - theSigHandlerCont[theSigId] = anOldHandler; - return anOldHandler; -} - -static void RestoreSigHandler(TSigHandler theSigHandler, - int theSigId) -{ - signal(theSigId,theSigHandler); -} - - -//======================================================================= -//function : Utils_SignalsHandler -//purpose : Constructor -//======================================================================= -Utils_SignalsHandler::Utils_SignalsHandler() -{ - // asv 28.02.05 : some signals are not defined on Windows.. why? I don't know.. -#ifndef WNT - StoreSignalHandler(mySigHandlerCont,SIGHUP); // floating point exception - StoreSignalHandler(mySigHandlerCont,SIGQUIT); // quit - StoreSignalHandler(mySigHandlerCont,SIGBUS); // bus error - StoreSignalHandler(mySigHandlerCont,SIGSTKFLT); // stack fault. -#endif - StoreSignalHandler(mySigHandlerCont,SIGFPE); // floating point exception - StoreSignalHandler(mySigHandlerCont,SIGINT); // interrupt - StoreSignalHandler(mySigHandlerCont,SIGILL); // illegal instruction - StoreSignalHandler(mySigHandlerCont,SIGTERM); // termination - StoreSignalHandler(mySigHandlerCont,SIGSEGV); // segmentation - //StoreSignalHandler(mySigHandlerCont,SIGABRT); // abort (ANSI). - // portage CCRT - // StoreSignalHandler(mySigHandlerCont,SIGSTKFLT); // stack fault. -} - - -//======================================================================= -//function : Utils_SignalsHandler -//purpose : destructor -//======================================================================= -Utils_SignalsHandler::~Utils_SignalsHandler() -{ - TSigHandlerCont::iterator anIter = mySigHandlerCont.begin(); - TSigHandlerCont::iterator anIterEnd = mySigHandlerCont.end(); - for(; anIter != anIterEnd; anIter++) - RestoreSigHandler(anIter->second,anIter->first); -} - - -//======================================================================= -//function : SetSigHandler -//purpose : sets new handler for pointed signal -//======================================================================= -TSigHandler Utils_SignalsHandler::SetSigHandler(int theSigId, - TSigHandler theSigHandler) -{ - TSigHandler anOldHandler = signal(theSigId,theSigHandler); - if(anOldHandler == SIG_IGN) - signal(theSigId,SIG_IGN); - mySigHandlerCont[theSigId] = anOldHandler; - return anOldHandler; -} diff --git a/src/Utils/Utils_SignalsHandler.h b/src/Utils/Utils_SignalsHandler.h deleted file mode 100644 index 44228ba87..000000000 --- a/src/Utils/Utils_SignalsHandler.h +++ /dev/null @@ -1,63 +0,0 @@ -// KERNEL Utils : common utils for KERNEL -// Copyright (C) 2003 CEA -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org or email : webmaster.salome@opencascade.org - -#ifndef _UTILS_SIGNALSHANDLER_H_ -#define _UTILS_SIGNALSHANDLER_H_ - - -#if defined UTILS_EXPORTS -#if defined WIN32 -#define UTILS_EXPORT __declspec( dllexport ) -#else -#define UTILS_EXPORT -#endif -#else -#if defined WNT -#define UTILS_EXPORT __declspec( dllimport ) -#else -#define UTILS_EXPORT -#endif -#endif - -#include -typedef void (*TSigHandler)(int); - - -class UTILS_EXPORT Utils_SignalsHandler{ - public: - Utils_SignalsHandler(); - ~Utils_SignalsHandler(); - - TSigHandler GetSigHandler(int theSigId); - TSigHandler SetSigHandler(int theSigId, TSigHandler theSigHandler); - typedef std::map TSigHandlerCont; - - private: - TSigHandlerCont mySigHandlerCont; -}; - - -class UTILS_EXPORT Utils_CASSignalsHandler: private Utils_SignalsHandler{ - public: - Utils_CASSignalsHandler(); -}; - - -#endif -- 2.39.2