From 6dd1af68fb168b4df7558ebf8e7ffe6c4abbfc5b Mon Sep 17 00:00:00 2001 From: prascle Date: Wed, 17 Mar 2004 08:13:41 +0000 Subject: [PATCH] PR: mergefrom_BSEC_br1_14Mar04 --- Makefile.in | 6 +- bin/runSalome.py | 7 +- configure.in.base | 37 +- idl/Makefile.in | 6 +- idl/SALOME_MPIContainer.idl | 45 +++ idl/SALOME_MPIObject.idl | 36 ++ idl/SALOME_TestMPIComponent.idl | 24 ++ .../unix/config_files/ac_cxx_depend_flag.m4 | 40 +- salome_adm/unix/config_files/ac_cxx_option.m4 | 45 +++ .../config_files/ac_cxx_template_options.m4 | 39 ++ .../config_files/ac_cxx_use_std_iostream.m4 | 55 +++ .../unix/config_files/ac_cxx_warnings.m4 | 30 ++ .../unix/config_files/ac_linker_options.m4 | 46 +++ salome_adm/unix/config_files/check_cas.m4 | 72 ++-- salome_adm/unix/config_files/check_htmlgen.m4 | 7 - salome_adm/unix/config_files/check_mpi.m4 | 70 ++++ salome_adm/unix/config_files/check_mpich.m4 | 10 +- .../unix/config_files/check_pthreads.m4 | 31 +- salome_adm/unix/config_files/check_pyqt.m4 | 116 +++--- salome_adm/unix/config_files/check_qt.m4 | 8 +- salome_adm/unix/config_files/check_sip.m4 | 17 +- salome_adm/unix/config_files/check_vtk.m4 | 14 +- salome_adm/unix/config_files/production.m4 | 4 +- salome_adm/unix/config_files/python.m4 | 8 +- salome_adm/unix/depend.in | 11 +- salome_adm/unix/make_commence.in | 13 +- salome_adm/unix/make_conclude.in | 2 +- src/Container/Component_i.cxx | 6 +- src/Container/Container_i.cxx | 139 ++++--- src/Container/Makefile.in | 2 +- src/Container/SALOME_Component_i.hxx | 4 +- src/Container/SALOME_Container_i.hxx | 26 +- .../SALOME_DataTypeCatalog_Client.cxx | 4 +- .../SALOME_DataTypeCatalog_Handler.cxx | 2 +- .../SALOME_DataTypeCatalog_Server.cxx | 2 +- .../SALOME_DataTypeCatalog_impl.cxx | 2 +- src/HDFPersist/HDFascii.cc | 2 +- src/HDFPersist/HDFattribute.cc | 7 +- src/HDFPersist/HDFcontainerObject.cc | 2 +- src/HDFPersist/HDFconvert.cc | 12 +- src/HDFPersist/HDFconvert.hxx | 2 +- src/HDFPersist/HDFdataset.cc | 8 +- src/HDFPersist/HDFexception.hxx | 2 +- src/HDFPersist/HDFexplorer.cc | 2 +- src/HDFPersist/HDFfile.cc | 6 +- src/HDFPersist/HDFgroup.cc | 4 +- src/HDFPersist/HDFinternalObject.cc | 2 +- src/HDFPersist/HDFobject.cc | 4 +- src/LifeCycleCORBA/LifeCycleCORBA.py | 21 +- src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx | 40 +- src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx | 6 +- src/LifeCycleCORBA/TestLifeCycleCORBA.cxx | 2 +- src/Loader/InquireServersQThread.cxx | 3 +- src/Loader/SALOME_Session_Loader.cxx | 2 +- src/Logger/SALOME_Logger_Server.cxx | 3 +- src/Logger/SALOME_Trace.cxx | 5 +- src/Logger/SALOME_Trace.hxx | 4 +- src/MPIContainer/MPIContainer_i.cxx | 242 ++++++++++-- src/MPIContainer/MPIContainer_i.hxx | 49 ++- src/MPIContainer/MPIObject_i.cxx | 9 +- src/MPIContainer/MPIObject_i.hxx | 2 +- src/MPIContainer/Makefile.in | 19 +- src/MPIContainer/SALOME_MPIContainer.cxx | 79 ++-- src/MPILifeCycleCORBA/MPILifeCycleCORBA.py | 142 +++++++ src/MPILifeCycleCORBA/MPIsalome.py | 5 + src/MPILifeCycleCORBA/Makefile.in | 38 ++ .../SALOME_MPILifeCycleCORBA.cxx | 357 ++++++++++++++++++ .../SALOME_MPILifeCycleCORBA.hxx | 45 +++ .../TestMPILifeCycleCORBA.cxx | 69 ++++ src/MSG2QM/msg2qm.cxx | 2 +- src/Makefile.in | 6 +- src/ModuleCatalog/Makefile.in | 2 +- .../SALOME_ModuleCatalog_Acomponent_impl.cxx | 2 +- .../SALOME_ModuleCatalog_Client.cxx | 2 +- .../SALOME_ModuleCatalog_Handler.cxx | 2 +- .../SALOME_ModuleCatalog_Server.cxx | 3 +- .../SALOME_ModuleCatalog_impl.cxx | 2 +- src/NOTIFICATION_SWIG/NOTIFICATION_Swig.cxx | 2 +- src/NOTIFICATION_SWIG/NOTIFICATION_Swig.hxx | 2 +- src/NamingService/SALOME_NamingService.cxx | 2 +- src/NamingService/ServiceUnreachable.cxx | 1 - src/Notification/NOTIFICATION.cxx | 3 +- src/Notification/NOTIFICATION_Consumer.cxx | 2 +- src/Notification/NOTIFICATION_Supplier.cxx | 2 +- src/OBJECT/SALOME_AISObject.cxx | 2 +- src/OBJECT/SALOME_AISShape.cxx | 2 +- src/OBJECT/SALOME_Actor.h | 2 +- src/OBJECT/SALOME_InteractiveObject.cxx | 2 +- src/OCCViewer/OCCViewer.cxx | 2 +- src/OCCViewer/OCCViewer_AISSelector.cxx | 2 +- src/OCCViewer/OCCViewer_Selector.cxx | 2 +- src/OCCViewer/OCCViewer_VService.cxx | 2 +- src/OCCViewer/OCCViewer_ViewFrame.cxx | 2 +- src/OCCViewer/OCCViewer_ViewPort.cxx | 2 +- src/OCCViewer/OCCViewer_ViewPort3d.cxx | 2 +- src/OCCViewer/OCCViewer_Viewer3d.cxx | 2 +- src/PatchQt/qsplitterP.cxx | 2 +- src/PatchQt/qworkspaceP.cxx | 2 +- src/Plot2d/Plot2d_Curve.cxx | 2 +- src/Plot2d/Plot2d_CurveContainer.cxx | 2 +- src/Registry/RegistryConnexion.cxx | 2 - src/Registry/RegistryService.cxx | 3 +- src/Registry/RegistryService.hxx | 6 +- src/Registry/SALOME_Registry_Server.cxx | 11 +- src/RegistryDisplay/HelpWindow.cxx | 2 +- src/RegistryDisplay/RegWidget.cxx | 2 +- src/RegistryDisplay/RegWidgetFactory.cxx | 2 +- .../SALOME_RessourcesCatalog_Client.cxx | 4 +- .../SALOME_RessourcesCatalog_Handler.cxx | 2 +- .../SALOME_RessourcesCatalog_impl.cxx | 2 +- src/SALOMEDS/SALOMEDS_AttributeComment_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_AttributeDrawable_i.cxx | 2 +- .../SALOMEDS_AttributeExpandable_i.cxx | 2 +- .../SALOMEDS_AttributeExternalFileDef_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_AttributeFileType_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_AttributeIOR_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_AttributeInteger_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_AttributeLocalID_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_AttributeName_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_AttributeOpened_i.cxx | 2 +- .../SALOMEDS_AttributePersistentRef_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_AttributePixMap_i.cxx | 2 +- .../SALOMEDS_AttributePythonObject_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_AttributeReal_i.cxx | 2 +- .../SALOMEDS_AttributeSelectable_i.cxx | 2 +- .../SALOMEDS_AttributeSequenceOfInteger_i.cxx | 3 +- .../SALOMEDS_AttributeSequenceOfReal_i.cxx | 2 +- .../SALOMEDS_AttributeStudyProperties_i.cxx | 2 +- .../SALOMEDS_AttributeTableOfInteger_i.cxx | 2 +- .../SALOMEDS_AttributeTableOfReal_i.cxx | 2 +- .../SALOMEDS_AttributeTableOfString_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_AttributeTarget_i.cxx | 2 +- .../SALOMEDS_AttributeTextColor_i.cxx | 2 +- ...SALOMEDS_AttributeTextHighlightColor_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_AttributeUserID_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_ChildIterator_i.cxx | 4 +- src/SALOMEDS/SALOMEDS_Client.cxx | 2 +- ..._DataMapIteratorOfDataMapStringLabel_0.cxx | 2 +- ...MEDS_DataMapNodeOfDataMapStringLabel_0.cxx | 2 +- .../SALOMEDS_DataMapStringLabel_0.cxx | 2 +- src/SALOMEDS/SALOMEDS_DrawableAttribute.cxx | 2 +- src/SALOMEDS/SALOMEDS_ExpandableAttribute.cxx | 2 +- src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_IORAttribute.cxx | 2 +- src/SALOMEDS/SALOMEDS_LocalIDAttribute.cxx | 2 +- src/SALOMEDS/SALOMEDS_OCAFApplication.cxx | 2 +- src/SALOMEDS/SALOMEDS_OpenedAttribute.cxx | 2 +- src/SALOMEDS/SALOMEDS_PersRefAttribute.cxx | 2 +- src/SALOMEDS/SALOMEDS_PixMapAttribute.cxx | 2 +- .../SALOMEDS_PythonObjectAttribute.cxx | 2 +- .../SALOMEDS_SComponentIterator_i.cxx | 3 +- src/SALOMEDS/SALOMEDS_SComponent_i.cxx | 3 +- src/SALOMEDS/SALOMEDS_SObject_i.cxx | 4 +- src/SALOMEDS/SALOMEDS_SObject_i.hxx | 6 +- src/SALOMEDS/SALOMEDS_SelectableAttribute.cxx | 2 +- .../SALOMEDS_SequenceOfIntegerAttribute.cxx | 2 +- .../SALOMEDS_SequenceOfRealAttribute.cxx | 2 +- src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_StudyManager_i.cxx | 14 +- .../SALOMEDS_StudyPropertiesAttribute.cxx | 2 +- src/SALOMEDS/SALOMEDS_Study_i.cxx | 2 +- .../SALOMEDS_TableOfIntegerAttribute.cxx | 2 +- .../SALOMEDS_TableOfIntegerAttribute.hxx | 4 +- .../SALOMEDS_TableOfRealAttribute.cxx | 2 +- .../SALOMEDS_TableOfRealAttribute.hxx | 4 +- .../SALOMEDS_TableOfStringAttribute.cxx | 2 +- src/SALOMEDS/SALOMEDS_TargetAttribute.cxx | 2 +- src/SALOMEDS/SALOMEDS_TextColorAttribute.cxx | 2 +- .../SALOMEDS_TextHighlightColorAttribute.cxx | 2 +- src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_UseCaseIterator_i.cxx | 4 +- src/SALOMEGUI/PyInterp_PyQt.cxx | 3 +- src/SALOMEGUI/PyInterp_base.cxx | 1 - src/SALOMEGUI/PyInterp_base.h | 2 +- src/SALOMEGUI/QAD_Application.cxx | 2 +- src/SALOMEGUI/QAD_Config.cxx | 2 +- src/SALOMEGUI/QAD_Desktop.cxx | 2 +- src/SALOMEGUI/QAD_DirListDlg.cxx | 2 +- src/SALOMEGUI/QAD_FileDlg.cxx | 2 +- src/SALOMEGUI/QAD_FileValidator.cxx | 2 +- src/SALOMEGUI/QAD_Help.cxx | 2 +- src/SALOMEGUI/QAD_HelpWindow.cxx | 2 +- src/SALOMEGUI/QAD_LeftFrame.cxx | 2 +- src/SALOMEGUI/QAD_ListMenuIdAction.cxx | 2 +- src/SALOMEGUI/QAD_ListPopupMenu.cxx | 2 +- src/SALOMEGUI/QAD_ListView.cxx | 2 +- src/SALOMEGUI/QAD_Menus.cxx | 2 +- src/SALOMEGUI/QAD_Message.cxx | 2 +- src/SALOMEGUI/QAD_MessageBox.cxx | 2 +- src/SALOMEGUI/QAD_ObjectBrowser.cxx | 2 +- src/SALOMEGUI/QAD_ObjectBrowserItem.cxx | 2 +- src/SALOMEGUI/QAD_Operation.cxx | 2 +- src/SALOMEGUI/QAD_OperatorMenus.cxx | 2 +- src/SALOMEGUI/QAD_ParserSettings.cxx | 3 +- src/SALOMEGUI/QAD_Popup.cxx | 2 +- src/SALOMEGUI/QAD_PyEditor.cxx | 2 +- src/SALOMEGUI/QAD_PyInterp.cxx | 3 +- src/SALOMEGUI/QAD_PyInterp_mono.cxx | 3 +- src/SALOMEGUI/QAD_ResourceMgr.cxx | 2 +- src/SALOMEGUI/QAD_RightFrame.cxx | 2 +- src/SALOMEGUI/QAD_Settings.cxx | 2 +- src/SALOMEGUI/QAD_SpinBoxDbl.cxx | 2 +- src/SALOMEGUI/QAD_Splitter.cxx | 2 +- src/SALOMEGUI/QAD_Study.cxx | 2 +- src/SALOMEGUI/QAD_StudyFrame.cxx | 2 +- src/SALOMEGUI/QAD_Tools.cxx | 2 +- src/SALOMEGUI/QAD_ViewFrame.cxx | 2 +- src/SALOMEGUI/QAD_XmlHandler.cxx | 2 +- src/SALOMEGUI/SALOMEGUI_AboutDlg.cxx | 2 +- .../SALOMEGUI_ActivateComponentDlg.cxx | 2 +- src/SALOMEGUI/SALOMEGUI_Application.cxx | 2 +- src/SALOMEGUI/SALOMEGUI_CloseDlg.cxx | 2 +- src/SALOMEGUI/SALOMEGUI_Desktop.cxx | 2 +- .../SALOMEGUI_ExternalBrowserDlg.cxx | 2 +- src/SALOMEGUI/SALOMEGUI_ImportOperation.cxx | 2 +- src/SALOMEGUI/SALOMEGUI_LoadStudiesDlg.cxx | 2 +- src/SALOMEGUI/SALOMEGUI_NameDlg.cxx | 2 +- src/SALOMEGUI/SALOMEGUI_OpenWith.cxx | 2 +- .../SALOMEGUI_QtCatchCorbaException.cxx | 2 +- src/SALOMEGUI/SALOMEGUI_SetValueDlg.cxx | 2 +- src/SALOMEGUI/SALOMEGUI_SetupCurveDlg.cxx | 2 +- .../SALOMEGUI_StudyPropertiesDlg.cxx | 2 +- src/SALOMEGUI/SALOMEGUI_Swig.cxx | 2 +- src/SALOMEGUI/SALOMEGUI_TableDlg.cxx | 2 +- src/SALOMEGUI/SALOMEGUI_TrihedronSizeDlg.cxx | 2 +- src/SALOMEGUI/SALOMEGUI_ViewChoiceDlg.cxx | 2 +- ...MapIteratorOfDataMapOfIOMapOfInteger_0.cxx | 2 +- ...DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx | 4 +- .../SALOME_DataMapOfIOMapOfInteger_0.cxx | 2 +- src/SALOMEGUI/SALOME_Filter.cxx | 2 +- src/SALOMEGUI/SALOME_ListIO.hxx | 2 + src/SALOMEGUI/SALOME_ListIO_0.cxx | 2 +- .../SALOME_ListIteratorOfListIO_0.cxx | 2 +- .../SALOME_ListIteratorOfListOfFilter_0.cxx | 2 +- src/SALOMEGUI/SALOME_ListNodeOfListIO_0.cxx | 4 +- .../SALOME_ListNodeOfListOfFilter_0.cxx | 5 +- src/SALOMEGUI/SALOME_ListOfFilter.hxx | 2 + src/SALOMEGUI/SALOME_ListOfFilter_0.cxx | 2 +- src/SALOMEGUI/SALOME_NumberFilter.cxx | 2 +- src/SALOMEGUI/SALOME_Selection.cxx | 2 +- src/SALOMEGUI/SALOME_TypeFilter.cxx | 2 +- src/SALOMELocalTrace/SALOME_Log.cxx | 3 +- src/SALOMELocalTrace/SALOME_Log.hxx | 2 +- src/SALOME_PY/SalomePy.cxx | 2 +- src/SALOME_PYQT/Makefile.in | 4 +- src/SALOME_PYQT/SALOME_PYQT_GUI.cxx | 2 +- src/SALOME_PYQT/SalomePyQt.cxx | 2 +- src/SUPERVGraph/SUPERVGraph.cxx | 2 +- src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx | 2 +- src/Session/SALOME_Session_QThread.cxx | 2 +- src/Session/SALOME_Session_i.cxx | 2 +- src/TOOLSDS/SALOMEDS_Tool.cxx | 6 +- src/TOOLSGUI/ToolsGUI.cxx | 2 +- src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.cxx | 2 +- src/TestContainer/SALOME_TestComponent_i.cxx | 2 +- src/TestContainer/TestContainer.cxx | 2 +- src/TestContainer/TestLogger.cxx | 2 +- src/TestMPIContainer/Makefile.in | 37 ++ .../TestMPIComponentEngine.cxx | 77 ++++ .../TestMPIComponentEngine.hxx | 40 ++ src/TestMPIContainer/TestMPIContainer.cxx | 134 +++++++ src/Utils/Utils_CommException.cxx | 1 - src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx | 2 +- src/Utils/Utils_ORB_INIT.cxx | 1 - src/Utils/Utils_SALOME_Exception.cxx | 15 +- src/Utils/Utils_SALOME_Exception.hxx | 6 +- src/Utils/Utils_Timer.cxx | 2 +- src/Utils/utilities.h | 2 + src/VTKViewer/VTKViewer.cxx | 2 +- src/VTKViewer/VTKViewer_RenderWindow.cxx | 2 +- src/VTKViewer/VTKViewer_ViewFrame.cxx | 8 +- 272 files changed, 2275 insertions(+), 680 deletions(-) create mode 100644 idl/SALOME_MPIContainer.idl create mode 100644 idl/SALOME_MPIObject.idl create mode 100644 idl/SALOME_TestMPIComponent.idl create mode 100644 salome_adm/unix/config_files/ac_cxx_option.m4 create mode 100644 salome_adm/unix/config_files/ac_cxx_template_options.m4 create mode 100644 salome_adm/unix/config_files/ac_cxx_use_std_iostream.m4 create mode 100644 salome_adm/unix/config_files/ac_cxx_warnings.m4 create mode 100644 salome_adm/unix/config_files/ac_linker_options.m4 create mode 100644 salome_adm/unix/config_files/check_mpi.m4 create mode 100644 src/MPILifeCycleCORBA/MPILifeCycleCORBA.py create mode 100644 src/MPILifeCycleCORBA/MPIsalome.py create mode 100644 src/MPILifeCycleCORBA/Makefile.in create mode 100644 src/MPILifeCycleCORBA/SALOME_MPILifeCycleCORBA.cxx create mode 100644 src/MPILifeCycleCORBA/SALOME_MPILifeCycleCORBA.hxx create mode 100644 src/MPILifeCycleCORBA/TestMPILifeCycleCORBA.cxx create mode 100644 src/TestMPIContainer/Makefile.in create mode 100644 src/TestMPIContainer/TestMPIComponentEngine.cxx create mode 100644 src/TestMPIContainer/TestMPIComponentEngine.hxx create mode 100644 src/TestMPIContainer/TestMPIContainer.cxx diff --git a/Makefile.in b/Makefile.in index 2aeee3a55..393764350 100644 --- a/Makefile.in +++ b/Makefile.in @@ -151,7 +151,11 @@ install-include: $(include_list) # install script in $(bindir) : install-bin: $(BIN_SCRIPT) $(INSTALL) -d $(bindir) - $(INSTALL_PROGRAM) $^ $(bindir) + for f in X $(BIN_SCRIPT); do \ + if test $$f != X; then \ + (cp -p ./bin/$$f $(bindir) || exit 1); \ + fi; \ + done uninstall: uninstall-idl diff --git a/bin/runSalome.py b/bin/runSalome.py index b9ccbd48a..3586e5542 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -392,7 +392,12 @@ def startSalome(): import SALOME session=clt.waitNS("/Kernel/Session",SALOME.Session) - + if os.getenv("HOSTNAME") == None: + if os.getenv("HOST") == None: + os.environ["HOSTNAME"]="localhost" + else: + os.environ["HOSTNAME"]=os.getenv("HOST") + theComputer = os.getenv("HOSTNAME") computerSplitName = theComputer.split('.') theComputer = computerSplitName[0] diff --git a/configure.in.base b/configure.in.base index c76d5a728..99e1272e1 100644 --- a/configure.in.base +++ b/configure.in.base @@ -14,7 +14,7 @@ # # Created from configure.in.base # - +AS_SHELL_SANITIZES AC_INIT(src) AC_CONFIG_AUX_DIR(salome_adm/unix/config_files) AC_CANONICAL_HOST @@ -48,6 +48,10 @@ echo Build root directory : $ROOT_BUILDDIR 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 @@ -86,7 +90,7 @@ dnl Fix up the INSTALL macro if it s a relative path. We want the dnl full-path to the binary instead. case "$INSTALL" in *install-sh*) - INSTALL='\${top_srcdir}'/salome_adm/unix/config_files/install-sh + INSTALL="${ROOT_SRCDIR}/salome_adm/unix/config_files/install-sh -c" ;; esac @@ -100,16 +104,28 @@ cc_ok=no dnl inutil car libtool dnl AC_PROG_CC AC_PROG_CXX +AC_CXX_WARNINGS +AC_CXX_TEMPLATE_OPTIONS AC_DEPEND_FLAG -# AC_CC_WARNINGS([ansi]) +#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) +dnl +dnl Check if we use std iostream by default or if we must add +dnl a compiler directive for that +dnl + +AC_CXX_USE_STD_IOSTREAM + dnl dnl Well we use sstream which is not in gcc pre-2.95.3 dnl We must test if it exists. If not, add it in include ! @@ -117,12 +133,21 @@ dnl AC_CXX_HAVE_SSTREAM +dnl +dnl --------------------------------------------- +dnl testing linker +dnl --------------------------------------------- +dnl + +AC_LINKER_OPTIONS + dnl dnl --------------------------------------------- dnl testing MPICH dnl --------------------------------------------- dnl +CHECK_MPI CHECK_MPICH echo @@ -284,7 +309,9 @@ echo --------------------------------------------- echo echo Configure -variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok" +variables="cc_ok mpi_ok mpich_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok" + +AC_SUBST(pyqt_ok) for var in $variables do @@ -347,7 +374,7 @@ dnl copy shells and utilities contained in the bin directory dnl excluding .in files (treated in AC-OUTPUT below) and CVS dnl directory -cd bin +cd $ROOT_BUILDDIR/bin for i in $ROOT_SRCDIR/bin/* do local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"` diff --git a/idl/Makefile.in b/idl/Makefile.in index 8033ab2b0..2615b1f63 100644 --- a/idl/Makefile.in +++ b/idl/Makefile.in @@ -21,9 +21,9 @@ IDL_FILES = \ SALOME_Component.idl \ SALOME_TestComponent.idl \ SALOME_Registry.idl \ - TypeData.idl \ - MPIObject.idl \ - MPIContainer.idl \ + SALOME_MPIObject.idl \ + SALOME_MPIContainer.idl \ + SALOME_TestMPIComponent.idl \ Logger.idl \ SALOME_GenericObj.idl diff --git a/idl/SALOME_MPIContainer.idl b/idl/SALOME_MPIContainer.idl new file mode 100644 index 000000000..8265c7380 --- /dev/null +++ b/idl/SALOME_MPIContainer.idl @@ -0,0 +1,45 @@ +// 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 : SALOME_MPIContainer.idl + +#ifndef _SALOME_MPICONTAINER_IDL_ +#define _SALOME_MPICONTAINER_IDL_ + +#include "SALOME_Component.idl" +#include "SALOME_MPIObject.idl" + +module Engines +{ + interface MPIContainer:Container,MPIObject + { + // start MPI container executable + MPIContainer start_MPIimpl( in string ContainerName, in short nbproc ); + + // asynchronous version to load and remove parallel component in parallel + oneway void SPload_impl(in string nameToRegister, in string componentName); + oneway void SPremove_impl(in Component component_i); + oneway void SPfinalize_removal(); + }; +} ; + +#endif + diff --git a/idl/SALOME_MPIObject.idl b/idl/SALOME_MPIObject.idl new file mode 100644 index 000000000..a480f51f1 --- /dev/null +++ b/idl/SALOME_MPIObject.idl @@ -0,0 +1,36 @@ +// 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 : MPIObject.idl + +#ifndef _SALOME_MPIOBJECT_IDL_ +#define _SALOME_MPIOBJECT_IDL_ + +module Engines +{ + typedef sequence IORTab; + interface MPIObject + { + attribute IORTab tior; + } ; +} ; + +#endif diff --git a/idl/SALOME_TestMPIComponent.idl b/idl/SALOME_TestMPIComponent.idl new file mode 100644 index 000000000..ad8623f35 --- /dev/null +++ b/idl/SALOME_TestMPIComponent.idl @@ -0,0 +1,24 @@ +//============================================================================= +// File : SALOME_MPITestComponent.idl +// Created : mer jui 04 12:08:17 CEST 2003 +// Author : Bernard SECHER, CEA +// Project : SALOME +// Copyright : CEA 2003 +// $Header$ +//============================================================================= + +#include "SALOME_Component.idl" +#include "SALOME_MPIObject.idl" + +module Engines +{ + + interface TestMPIComponent : Component, MPIObject + { + // version synchrone (process 0) + void Coucou(in long L); + // version asynchrone (autres process) + oneway void SPCoucou(in long L); + }; + +}; diff --git a/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 b/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 index 7c87413dd..5dd873fd2 100644 --- a/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 +++ b/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 @@ -35,17 +35,34 @@ ac_cv_depend_flag, echo "conftest.o: conftest.c" > conftest.verif echo "int main() { return 0; }" > conftest.c +dnl Evolution portage sur CCRT/osf system + case $host_os in + osf*) +dnl sur CCRT/osf pas d'equivalent de l'option -MG de gcc avec compilo natif +dnl on utilise donc gnu pour generer les dependances. + DEPCC=gcc + DEPCXX=g++ + DEPCXXFLAGS="-Wno-deprecated -funsigned-char" + DIFFFLAGS="-w" + ;; + *) + DEPCC=${CC-cc} + DEPCXX=${CXX-c++} + DEPCXXFLAGS="\${CXXFLAGS}" + DIFFFLAGS="-b -B" + ;; + esac C_DEPEND_FLAG= for ac_C_DEPEND_FLAG in -xM -MM -M ; do rm -f conftest.d conftest.err - ${CC-cc} ${ac_C_DEPEND_FLAG} -c conftest.c 1> conftest.d 2> conftest.err + ${DEPCC} ${ac_C_DEPEND_FLAG} -c conftest.c 1> conftest.d 2> conftest.err if test -f conftest.u ; then mv conftest.u conftest.d fi rm -f conftest - diff -b -B conftest.d conftest.verif > conftest + diff ${DIFFFLAGS} conftest.d conftest.verif > conftest if test ! -s conftest ; then C_DEPEND_FLAG=${ac_C_DEPEND_FLAG} break @@ -54,12 +71,12 @@ ac_cv_depend_flag, dnl use gcc option -MG : asume unknown file will be construct later rm -f conftest.d conftest.err - ${CC-cc} ${C_DEPEND_FLAG} -MG -c conftest.c 1> conftest.d 2> conftest.err + ${DEPCC} ${C_DEPEND_FLAG} -MG -c conftest.c 1> conftest.d 2> conftest.err if test -f conftest.u ; then mv conftest.u conftest.d fi rm -f conftest - diff -b -B conftest.d conftest.verif > conftest + diff ${DIFFFLAGS} conftest.d conftest.verif > conftest if test ! -s conftest ; then C_DEPEND_FLAG=${C_DEPEND_FLAG}" -MG" fi @@ -70,7 +87,7 @@ dnl use gcc option -MG : asume unknown file will be construct later exit fi - echo -n " C : " ${C_DEPEND_FLAG} + printf " C : ${DEPCC} ${C_DEPEND_FLAG}" AC_LANG_CPLUSPLUS echo "conftest.o: conftest.cxx" > conftest.verif @@ -80,13 +97,13 @@ dnl use gcc option -MG : asume unknown file will be construct later for ac_CXX_DEPEND_FLAG in -xM -MM -M ; do rm -f conftest.d conftest.err - ${CXX-c++} ${ac_CXX_DEPEND_FLAG} -c conftest.cxx 1> conftest.d 2> conftest.err + ${DEPCXX} ${ac_CXX_DEPEND_FLAG} -c conftest.cxx 1> conftest.d 2> conftest.err if test -f conftest.u ; then mv conftest.u conftest.d fi rm -f conftest - diff -b -B conftest.d conftest.verif > conftest + diff ${DIFFFLAGS} conftest.d conftest.verif > conftest if test ! -s conftest ; then CXX_DEPEND_FLAG=${ac_CXX_DEPEND_FLAG} break @@ -95,12 +112,12 @@ dnl use gcc option -MG : asume unknown file will be construct later dnl use g++ option -MG : asume unknown file will be construct later rm -f conftest.d conftest.err - ${CXX-c++} ${CXX_DEPEND_FLAG} -MG -c conftest.cxx 1> conftest.d 2> conftest.err + ${DEPCXX} ${CXX_DEPEND_FLAG} -MG -c conftest.cxx 1> conftest.d 2> conftest.err if test -f conftest.u ; then mv conftest.u conftest.d fi rm -f conftest - diff -b -B conftest.d conftest.verif > conftest + diff ${DIFFFLAGS} conftest.d conftest.verif > conftest if test ! -s conftest ; then CXX_DEPEND_FLAG=${CXX_DEPEND_FLAG}" -MG" fi @@ -112,9 +129,12 @@ dnl use g++ option -MG : asume unknown file will be construct later exit fi - echo -n " C++ : " ${CXX_DEPEND_FLAG} + printf " C++ : ${DEPCXX} ${CXX_DEPEND_FLAG}" AC_LANG_RESTORE + AC_SUBST(DEPCC) + AC_SUBST(DEPCXX) + AC_SUBST(DEPCXXFLAGS) AC_SUBST(C_DEPEND_FLAG) AC_SUBST(CXX_DEPEND_FLAG) ]) diff --git a/salome_adm/unix/config_files/ac_cxx_option.m4 b/salome_adm/unix/config_files/ac_cxx_option.m4 new file mode 100644 index 000000000..4219c5a07 --- /dev/null +++ b/salome_adm/unix/config_files/ac_cxx_option.m4 @@ -0,0 +1,45 @@ +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 +dnl @synopsis AC_CXX_OPTION(-option,variable where we add option if ok,action if ok; action if not ok) +dnl +dnl Check options for C++ compiler +dnl +dnl @author Bernard Secher - 15/01/2004 +dnl +AC_DEFUN([AC_CXX_OPTION], [ + AC_MSG_CHECKING(CXXFLAGS for $CXX in $1) + cat > 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 + 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/ac_cxx_template_options.m4 b/salome_adm/unix/config_files/ac_cxx_template_options.m4 new file mode 100644 index 000000000..4192ec011 --- /dev/null +++ b/salome_adm/unix/config_files/ac_cxx_template_options.m4 @@ -0,0 +1,39 @@ +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 +dnl @synopsis AC_CXX_TEMPLATE_OPTIONS +dnl +dnl Check template options for C++ compiler +dnl +dnl @author Bernard Secher (CEA) - 04/12/2003 +dnl +AC_DEFUN([AC_CXX_TEMPLATE_OPTIONS],[ +dnl + for opt in -ftemplate-depth-42 "-pending_instantiations 42" ; do + AC_CXX_OPTION($opt,CXXTMPDPTHFLAGS,flag=yes,flag=no) + if test "$flag" = "yes"; then + break + fi + AC_SUBST(CXXTMPDPTHFLAGS) + done +dnl + AC_CXX_OPTION(-tweak,CXXFLAGS) +]) diff --git a/salome_adm/unix/config_files/ac_cxx_use_std_iostream.m4 b/salome_adm/unix/config_files/ac_cxx_use_std_iostream.m4 new file mode 100644 index 000000000..88685ce56 --- /dev/null +++ b/salome_adm/unix/config_files/ac_cxx_use_std_iostream.m4 @@ -0,0 +1,55 @@ +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 +dnl @synopsis AC_CXX_USE_STD_IOSTREAM +dnl +dnl If the C++ library use std iostream +dnl +dnl @author Bernard Secher (CEA) - 05/12/2003 +dnl +AC_DEFUN([AC_CXX_USE_STD_IOSTREAM], +[ + +AC_MSG_CHECKING(whether the compiler use std iostream) + +cat > conftest.cxx < +int main(int argc, char **argv) {std::cout << "Hello" << std::endl; return 0;} +EOF + +fUSE_STD_IOSTREAM=no +for ac_CXX_USE_STD_IOSTREAM in "" -D__USE_STD_IOSTREAM ; do + if $CXX ${ac_CXX_USE_STD_IOSTREAM} conftest.cxx > /dev/null 2>&1; then + CXXFLAGS="$CXXFLAGS ${ac_CXX_USE_STD_IOSTREAM}" + if test x${ac_CXX_USE_STD_IOSTREAM} = x; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(${ac_CXX_USE_STD_IOSTREAM}) + fi + fUSE_STD_IOSTREAM=yes + break + fi +done +if test $fUSE_STD_IOSTREAM = no; then + AC_MSG_RESULT(no) +fi + +]) diff --git a/salome_adm/unix/config_files/ac_cxx_warnings.m4 b/salome_adm/unix/config_files/ac_cxx_warnings.m4 new file mode 100644 index 000000000..862f5e83c --- /dev/null +++ b/salome_adm/unix/config_files/ac_cxx_warnings.m4 @@ -0,0 +1,30 @@ +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 +dnl @synopsis AC_CXX_WARNINGS +dnl +dnl Check warning flags for C++ compiler to control warning messages +dnl +dnl @author Bernard Secher (CEA) - 04/12/2003 +dnl +AC_DEFUN([AC_CXX_WARNINGS],[ + AC_CXX_OPTION(-Wno-deprecated,CXXFLAGS) +]) diff --git a/salome_adm/unix/config_files/ac_linker_options.m4 b/salome_adm/unix/config_files/ac_linker_options.m4 new file mode 100644 index 000000000..392107c77 --- /dev/null +++ b/salome_adm/unix/config_files/ac_linker_options.m4 @@ -0,0 +1,46 @@ +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 +dnl @synopsis AC_LINKER_OPTIONS +dnl +dnl Check warning flags for C++ compiler to control warning messages +dnl +dnl @author Bernard Secher (CEA) - 04/12/2003 +dnl +AC_DEFUN([AC_LINKER_OPTIONS],[ + for opt in "-Xlinker -export-dynamic" -transitive_link; do + AC_CXX_OPTION($opt,LDEXPDYNFLAGS,flag=yes,flag=no) + if test "$flag" = "yes"; then + break + fi + done + AC_SUBST(LDEXPDYNFLAGS) +dnl + case $host_os in + osf*) + STDLIB="-lcxxstd" + ;; + *) + STDLIB="-lstdc++" + ;; + esac + AC_SUBST(STDLIB) +]) diff --git a/salome_adm/unix/config_files/check_cas.m4 b/salome_adm/unix/config_files/check_cas.m4 index 405cefa83..fcf45bbf9 100644 --- a/salome_adm/unix/config_files/check_cas.m4 +++ b/salome_adm/unix/config_files/check_cas.m4 @@ -36,7 +36,6 @@ AC_SUBST(CAS_MODELER) AC_SUBST(CAS_OCAF) AC_SUBST(CAS_DATAEXCHANGE) AC_SUBST(CAS_LDFLAGS) - AC_SUBST(CAS_LDPATH) CAS_CPPFLAGS="" @@ -58,7 +57,7 @@ case $host_os in irix6.*) casdir=Linux ;; - osf4.*) + osf*) casdir=Linux ;; solaris2.*) @@ -69,6 +68,20 @@ case $host_os in ;; esac +AC_MSG_CHECKING(for OpenCascade directories) +if test -d ${CASROOT}/${casdir}/lib; then + CAS_LDPATH="-L$CASROOT/$casdir/lib " + AC_MSG_RESULT(yes) +else + if test -d ${CASROOT}/lib; then + CAS_LDPATH="-L$CASROOT/lib " + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi +fi + + dnl were is OCC ? if test -z $CASROOT; then AC_MSG_WARN(You must provide CASROOT variable : see OCC installation manual) @@ -86,32 +99,31 @@ fi if test "x$occ_ok" = "xyes"; then +dnl test c++ compiler flag for unsigned character + for opt in -funsigned-char -unsigned ; do + AC_CXX_OPTION($opt,CXXFLAGS,flag=yes,flag=no) + if test "$flag" = "yes"; then + break + fi + done + dnl cascade headers CPPFLAGS_old="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -DLIN -DLINTEL -DCSFDB -DNO_CXX_EXCEPTION -DNo_exception -I$CASROOT/inc -Wno-deprecated" - CXXFLAGS_old="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -funsigned-char" + CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DLIN -DLINTEL -DCSFDB -DNO_CXX_EXCEPTION -DNo_exception -I$CASROOT/inc" + CPPFLAGS="$CPPFLAGS $CAS_CPPFLAGS" AC_CHECK_HEADER(Standard_Type.hxx,occ_ok=yes ,occ_ok=no) - CPPFLAGS="$CPPFLAGS_old" - CXXFLAGS="$CXXFLAGS_old" fi if test "x$occ_ok" = xyes ; then - CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DLIN -DLINTEL -DCSFDB -DNO_CXX_EXCEPTION -DNo_exception -I$CASROOT/inc" - CAS_CXXFLAGS="-funsigned-char" - AC_MSG_CHECKING(for OpenCascade libraries) - CPPFLAGS_old="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $CAS_CPPFLAGS -Wno-deprecated" - CXXFLAGS_old="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS $CAS_CXXFLAGS" LIBS_old="$LIBS" - LIBS="$LIBS -L$CASROOT/$casdir/lib -lTKernel" + LIBS="$LIBS $CAS_LDPATH -lTKernel" + AC_CACHE_VAL(salome_cv_lib_occ,[ AC_TRY_LINK( #include @@ -123,28 +135,36 @@ if test "x$occ_ok" = xyes ; then ]) occ_ok="$salome_cv_lib_occ" - CPPFLAGS="$CPPFLAGS_old" - CXXFLAGS="$CXXFLAGS_old" - LIBS="$LIBS_old" fi +CPPFLAGS="$CPPFLAGS_old" +LIBS="$LIBS_old" if test "x$occ_ok" = xno ; then AC_MSG_RESULT(no) AC_MSG_WARN(Opencascade libraries not found) else AC_MSG_RESULT(yes) - CAS_LDPATH="-L$CASROOT/$casdir/lib " CAS_KERNEL="$CAS_LDPATH -lTKernel -lTKMath" - CAS_OCAF="$CAS_LDPATH -lPTKernel -lTKCAF -lFWOSPlugin -lTKPShape -lTKPCAF -lTKStdSchema -lTKShapeSchema -lPAppStdPlugin -lTKPAppStd -lTKCDF" -dnl CAS_VIEWER="-L$CASROOT/$casdir/lib -lTKOpenGl -lTKV3d -lTKV2d -lTKService" + + # E.A. compatibility version 4 and 5.x + CAS_OCAF="$CAS_LDPATH -lPTKernel -lTKCAF -lFWOSPlugin -lTKPShape -lTKPCAF -lTKStdSchema -lTKShapeSchema -lPAppStdPlugin" + if test $OCC_VERSION_MAJOR -lt 5 ; then + CAS_OCAF="$CAS_OCAF -lTKPAppStd" + fi + CAS_OCAF="$CAS_OCAF -lTKCDF" + CAS_VIEWER="$CAS_LDPATH -lTKOpenGl -lTKV3d -lTKService" -# CAS_MODELER="-L$CASROOT/$casdir/lib -lTKG2d -lTKG3d -lTKGeomBase -lTKBRep -lTKGeomAlgo -lTKTopAlgo -lTKPrim -lTKBool -lTKHLR -lTKFillet -lTKFeat -lTKOffset" CAS_MODELER="$CAS_LDPATH -lTKG2d -lTKG3d -lTKGeomBase -lTKBRep -lTKGeomAlgo -lTKTopAlgo -lTKPrim -lTKBool -lTKHLR -lTKFillet -lTKOffset" -dnl CAS_DATAEXCHANGE="-L$CASROOT/$casdir/lib -lTKXSBase -lTKIGES -lTKSTEP -lTKShHealing -lTKShHealingStd -lTKSTL -lTKVRML " - CAS_DATAEXCHANGE="$CAS_LDPATH -lTKXSBase -lTKIGES -lTKSTEP -lTKShHealing -lTKShHealingStd" + + # E.A. compatibility version 4 and 5.x + CAS_DATAEXCHANGE="$CAS_LDPATH -lTKXSBase -lTKIGES -lTKSTEP -lTKShHealing" + if test $OCC_VERSION_MAJOR -lt 5 ; then + CAS_DATAEXCHANGE="$CAS_DATAEXCHANGE -lTKShHealingStd" + fi + + CAS_LDFLAGS="$CAS_KERNEL $CAS_OCAF $CAS_VIEWER $CAS_MODELER $CAS_DATAEXCHANGE" - - + fi AC_LANG_RESTORE diff --git a/salome_adm/unix/config_files/check_htmlgen.m4 b/salome_adm/unix/config_files/check_htmlgen.m4 index 026f80d07..cb65ed3d0 100644 --- a/salome_adm/unix/config_files/check_htmlgen.m4 +++ b/salome_adm/unix/config_files/check_htmlgen.m4 @@ -14,11 +14,7 @@ AC_PATH_PROG(DOXYGEN,doxygen) if test "x$DOXYGEN" = "x" then doxygen_ok=no - AC_MSG_RESULT(no) AC_MSG_WARN(doxygen not found) -else - dnl AC_SUBST(DOXYGEN) - AC_MSG_RESULT(yes) fi AC_CHECKING(for graphviz) @@ -31,10 +27,7 @@ AC_PATH_PROG(DOT,dot) if test "x$DOT" = "x" ; then graphviz_ok=no - AC_MSG_RESULT(no) AC_MSG_WARN(graphviz not found) -else - AC_MSG_RESULT(yes) fi ])dnl diff --git a/salome_adm/unix/config_files/check_mpi.m4 b/salome_adm/unix/config_files/check_mpi.m4 new file mode 100644 index 000000000..51f271a9f --- /dev/null +++ b/salome_adm/unix/config_files/check_mpi.m4 @@ -0,0 +1,70 @@ +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_MPI],[ + +AC_REQUIRE([AC_PROG_CC])dnl + +AC_ARG_WITH(mpi, + --with-mpi=DIR root directory path of MPICH installation, + WITHMPI="yes",WITHMPI="no") + +MPI_INCLUDES="" +MPI_LIBS="" +if test "$WITHMPI" = yes; then + + echo + echo --------------------------------------------- + echo testing mpi + echo --------------------------------------------- + echo + + if test "x$withval" != "xyes"; then + MPI_HOME=$withval + MPI_INCLUDES="-I$MPI_HOME/include" + MPI_LIBS="-L$MPI_HOME/lib" + fi + + CPPFLAGS_old="$CPPFLAGS" + CPPFLAGS="$MPI_INCLUDES $CPPFLAGS" + AC_CHECK_HEADER(mpi.h,WITHMPI="yes",WITHMPI="no") + CPPFLAGS="$CPPFLAGS_old" + + if test "$WITHMPI" = "yes";then + LDFLAGS_old="$LDFLAGS" + LDFLAGS="$MPI_LIBS $LDFLAGS" + AC_CHECK_LIB(elan,elan_init,MPI_LIBS="$MPI_LIBS -lelan") + AC_CHECK_LIB(mpi,MPI_Init,WITHMPI="yes",WITHMPI="no") + LDFLAGS="$LDFLAGS_old" + fi + + if test "$WITHMPI" = "yes";then + mpi_ok=yes + MPI_LIBS="$MPI_LIBS -lmpi" + fi + +fi +AC_SUBST(MPI_INCLUDES) +AC_SUBST(MPI_LIBS) +AC_SUBST(WITHMPI) + +])dnl diff --git a/salome_adm/unix/config_files/check_mpich.m4 b/salome_adm/unix/config_files/check_mpich.m4 index cb4af5388..c68a72757 100644 --- a/salome_adm/unix/config_files/check_mpich.m4 +++ b/salome_adm/unix/config_files/check_mpich.m4 @@ -52,13 +52,15 @@ if test "$WITHMPICH" = yes; then if test "$WITHMPICH" = "yes";then LDFLAGS_old="$LDFLAGS" LDFLAGS="$MPICH_LIBS $LDFLAGS" - AC_CHECK_LIB(mpich,MPI_Init, - AC_CHECK_LIB(pmpich, PMPI_Init,WITHMPICH="yes",WITHMPICH="no"), - WITHMPICH="no") + AC_CHECK_LIB(mpich,MPI_Init,WITHMPICH="yes",WITHMPICH="no") LDFLAGS="$LDFLAGS_old" fi - MPICH_LIBS="$MPICH_LIBS -lpmpich -lmpich" + if test "$WITHMPICH" = "yes";then + mpich_ok=yes + MPICH_LIBS="$MPICH_LIBS -lmpich" + fi + fi AC_SUBST(MPICH_INCLUDES) diff --git a/salome_adm/unix/config_files/check_pthreads.m4 b/salome_adm/unix/config_files/check_pthreads.m4 index 0608c4a40..983bfc200 100644 --- a/salome_adm/unix/config_files/check_pthreads.m4 +++ b/salome_adm/unix/config_files/check_pthreads.m4 @@ -30,22 +30,21 @@ dnl@id $Id$ dnl ---------------------------------------------------------------- dnl CHECK_PTHREADS AC_DEFUN(CHECK_PTHREADS,[ -AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl -AC_CHECK_HEADER(pthread.h,AC_DEFINE(HAVE_PTHREAD_H)) -AC_CHECK_LIB(posix4,nanosleep, LIBS_PTHREADS="-lposix4",LIBS_PTHREADS="") -AC_CHECK_LIB(pthread,pthread_mutex_lock, - LIBS_PTHREADS="-lpthread $LIBS_PTHREADS") -AC_MSG_CHECKING([parameters for using pthreads]) -case $build_os in - freebsd*) - CFLAGS_PTHREADS="-pthread" - CXXFLAGS_PTHREADS="-pthread" - ;; - *) - ;; -esac -AC_MSG_RESULT(["flags: $CFLAGS_PTHREADS\;libs: $LIBS_PTHREADS"]) -threads_ok=yes +AC_CXX_OPTION(-pthread,CPPFLAGS,flag=yes,flag=no) + +if test $flag = no; then + AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl + AC_CHECK_HEADER(pthread.h,AC_DEFINE(HAVE_PTHREAD_H)) + AC_CHECK_LIB(posix4,nanosleep, LIBS_PTHREADS="-lposix4",LIBS_PTHREADS="") + AC_CHECK_LIB(pthread,pthread_mutex_lock, + LIBS_PTHREADS="-lpthread $LIBS_PTHREADS",LIBS_PTHREADS="") +fi + +if test $flag = no && x$LIBS_PTHREADS = x; then + threads_ok=no +else + threads_ok=yes +fi ])dnl dnl dnl diff --git a/salome_adm/unix/config_files/check_pyqt.m4 b/salome_adm/unix/config_files/check_pyqt.m4 index e0d320185..8977452d2 100644 --- a/salome_adm/unix/config_files/check_pyqt.m4 +++ b/salome_adm/unix/config_files/check_pyqt.m4 @@ -3,31 +3,6 @@ dnl Copyright (C) 2003 CEA/DEN, EDF R&D AC_DEFUN([CHECK_PYQT],[ AC_REQUIRE([CHECK_PYTHON])dnl -AC_CHECKING(for pyqt) - -pyqt_ok=no - -PYTHON_SITE_PACKPYQT=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages -AC_CHECK_FILES($PYTHON_SITE_PACKPYQT/qt.py $PYTHON_SITE_PACKPYQT/libqtcmodule.so,pyqt_ok=yes,pyqt_ok=no) -if test "x$pyqt_ok" = xyes ; then - PYQT_INCLUDES="-I $PYTHON_SITE_PACKPYQT" - PYQT_LIBS="-L$PYTHON_SITE_PACKPYQT -lqtcmodule" -fi - -if test "x$pyqt_ok" = xyes ; then - AC_CHECK_FILES(/usr/share/sip/qt/qtmod.sip,pyqt_ok=yes,pyqt_ok=no) - if test "x$pyqt_ok" = xyes ; then - PYQT_SIPS="/usr/share/sip/qt" - fi - AC_SUBST(PYQT_INCLUDES) - AC_SUBST(PYQT_LIBS) - AC_SUBST(PYQT_SIPS) - AC_MSG_RESULT(yes) -else - - pyqt_ok=yes - dnl were is pyqt ? - AC_ARG_WITH(pyqt, [ --with-pyqt=DIR root directory path to PyQt installation ], [PYQTDIR="$withval" @@ -47,67 +22,62 @@ AC_ARG_WITH(pyuic, AC_MSG_RESULT("select $withval as pyqt executable") ]) +AC_CHECKING(for pyqt) -if test -z $PYQTDIR; then - PYQTDIR="/usr/lib/python${PYTHON_VERSION}/site-packages" -else - if test -z $PYQT_SIPS; then - PYQT_SIPS="$PYQTDIR/sip" - fi - if test -z $PYUIC; then - AC_CHECK_FILE("$PYQTDIR/pyuic",pyqt_ok=yes,pyqt_ok=no) - if test "x$pyqt_ok" = xyes ; then - PYUIC="$PYQTDIR/pyuic" - else - AC_PATH_PROG(PYUIC, pyuic) - fi - fi -fi +pyqt_ok=no -if test -z $PYQT_SIPS; then - PYQT_SIPS="/usr/share/sip/qt" +if test "x$PYQTDIR" = x; then + PYQTDIR="/usr" fi -if test -z $PYUIC; then - PYUIC="/usr/bin/pyuic" +if test "x$PYQT_SIPS" = x; then + PYQT_SIPS="/usr/share/sip/qt" fi -PYQT_ROOT=$PYQTDIR -PYQT_INCLUDES="-I$PYQT_SIPS" -PYQT_LIBS="-L$PYQTDIR -lqtcmodule" +if test -d $PYQTDIR/lib/python${PYTHON_VERSION}/site-packages; then + PYQTLIB=$PYQTDIR/lib/python${PYTHON_VERSION}/site-packages +else + if test -d $PYQTDIR/lib; then + PYQTLIB=$PYQTDIR/lib + else + PYQTLIB=$PYQTDIR + fi +fi -AC_CHECK_FILES($PYQTDIR/qt.py $PYQTDIR/qt/qt.py $PYQTDIR/lib/qt.py,pyqt_ok=yes,pyqt_ok=no) -if test "x$pyqt_ok" = xno ; then - AC_MSG_WARN(qt.py not found) +if test -d $PYQTDIR/bin; then + PYQTBIN=$PYQTDIR/bin else - AC_CHECK_FILE("$PYQTDIR/libqtcmodule.so",pyqt_ok=yes,pyqt_ok=no) - if test "x$pyqt_ok" = xyes ; then - PYQT_ROOT=$PYQTDIR - PYQT_LIBS="-L$PYQTDIR -lqtcmodule" - fi - if test "x$pyqt_ok" = xno ; then - AC_CHECK_FILE("$PYQTDIR/lib/libqtcmodule.so",pyqt_ok=yes,pyqt_ok=no) - if test "x$pyqt_ok" = xyes ; then - PYQT_ROOT=$PYQTDIR - PYQT_LIBS="-L$PYQTDIR/lib -lqtcmodule" - fi - fi - - AC_CHECK_FILE("$PYQT_SIPS/copying.sip",pyqt_ok=$pyqt_ok,pyqt_ok=no) - if test "x$pyqt_ok" = xyes ; then - PYQT_INCLUDES="-I$PYQT_SIPS" - fi + PYQTBIN=$PYQTDIR fi -AC_SUBST(PYQT_ROOT) -AC_SUBST(PYQT_INCLUDES) -AC_SUBST(PYUIC) -AC_SUBST(PYQT_SIPS) -AC_SUBST(PYQT_LIBS) +AC_CHECK_FILE("$PYQTBIN/pyuic",pyqt_ok=yes,pyqt_ok=no) + +if test "x$pyqt_ok" = xyes ; then + AC_CHECK_FILES("$PYQTLIB/qt.py",pyqt_ok=yes,pyqt_ok=no) +fi + +if test "x$pyqt_ok" = xyes ; then + AC_CHECK_FILE("$PYQTLIB/libqtcmodule.so",pyqt_ok=yes,pyqt_ok=no) +fi -AC_MSG_RESULT(for pyqt: $pyqt_ok) +if test "x$pyqt_ok" = xyes ; then + AC_CHECK_FILES("$PYQT_SIPS/qtmod.sip",pyqt_ok=yes,pyqt_ok=no) +fi +if test "x$pyqt_ok" = xyes ; then + AC_CHECK_FILE("$PYQT_SIPS/copying.sip",pyqt_ok=yes,pyqt_ok=no) +fi +if test "x$pyqt_ok" = xyes ; then + PYQT_ROOT=$PYQTDIR + PYQT_INCLUDES="-I$PYQT_SIPS" + PYQT_LIBS="-L$PYQTLIB -lqtcmodule" + AC_SUBST(PYQT_ROOT) + AC_SUBST(PYQT_INCLUDES) + AC_SUBST(PYQT_LIBS) + AC_SUBST(PYQT_SIPS) + AC_SUBST(PYUIC) fi + ])dnl dnl diff --git a/salome_adm/unix/config_files/check_qt.m4 b/salome_adm/unix/config_files/check_qt.m4 index 753521cf9..55d70ebdd 100644 --- a/salome_adm/unix/config_files/check_qt.m4 +++ b/salome_adm/unix/config_files/check_qt.m4 @@ -80,7 +80,6 @@ QT_ROOT=$QTDIR if test "x$qt_ok" = "xyes" then - AC_MSG_CHECKING(include of qt headers) CPPFLAGS_old=$CPPFLAGS CPPFLAGS="$CPPFLAGS -I$QTDIR/include" @@ -92,11 +91,10 @@ then if test "x$qt_ok" = "xno" then - AC_MSG_RESULT(qt headers not found, or too old qt version, in $QTDIR/include) - AC_MSG_RESULT(QTDIR environment variable may be wrong) + AC_MSG_WARN(qt headers not found, or too old qt version, in $QTDIR/include) + AC_MSG_WARN(QTDIR environment variable may be wrong) else - AC_MSG_RESULT(yes) - QT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT" + QT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT" QT_MT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT" fi fi diff --git a/salome_adm/unix/config_files/check_sip.m4 b/salome_adm/unix/config_files/check_sip.m4 index feecb0dde..48a025918 100644 --- a/salome_adm/unix/config_files/check_sip.m4 +++ b/salome_adm/unix/config_files/check_sip.m4 @@ -28,10 +28,17 @@ else sip_vers=new ;; 3.5*) sip_vers=new ;; + 3.6*) + sip_vers=new ;; + 3.7*) + sip_vers=new ;; + 3.8*) + sip_vers=new ;; + 3.9*) + sip_vers=new ;; *) sip_vers=no ;; esac - sip_ok=no if test "x$sip_vers" = "xold" @@ -44,11 +51,11 @@ else if test "x$sip_vers" = "xnew" then - if test -d ${SIPDIR}/include ; then - sip_ok=yes + sip_ok=yes + if test -d ${SIPDIR}/include/python${PYTHON_VERSION} ; then SIP_ROOT="$SIPDIR" - SIP_INCLUDES="${PYTHON_INCLUDES} -I${SIPDIR}/include" - SIP_LIBS="-L${SIPDIR}/lib -lsip" + SIP_INCLUDES="${PYTHON_INCLUDES} -I${SIPDIR}/include/python${PYTHON_VERSION}" + SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages -lsip" else sip_ok=yes SIP_ROOT="$SIPDIR" diff --git a/salome_adm/unix/config_files/check_vtk.m4 b/salome_adm/unix/config_files/check_vtk.m4 index 1b1a8d1a1..4b4b1454f 100644 --- a/salome_adm/unix/config_files/check_vtk.m4 +++ b/salome_adm/unix/config_files/check_vtk.m4 @@ -48,10 +48,16 @@ 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 LOCAL_INCLUDES="$OGL_INCLUDES" -LOCAL_LIBS="-lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid $OGL_LIBS -L$x_libraries -lX11 -lXt" -TRY_LINK_LIBS="-lvtkCommon $OGL_LIBS -L$x_libraries -lX11 -lXt" +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 @@ -64,7 +70,7 @@ fi dnl vtk headers CPPFLAGS_old="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES -Wno-deprecated" +CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES" AC_CHECK_HEADER(vtkPlane.h,vtk_ok="yes",vtk_ok="no") @@ -82,7 +88,7 @@ AC_CHECK_HEADER(vtkPlane.h,vtk_ok="yes",vtk_ok="no") # LIBS="$LIBS $TRY_LINK_LIBS" LIBS="$LIBS $LOCAL_LIBS" CPPFLAGS_old="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $VTK_INCLUDES -Wno-deprecated" + CPPFLAGS="$CPPFLAGS $VTK_INCLUDES" dnl VTKPY_MODULES="$VTKHOME/python" diff --git a/salome_adm/unix/config_files/production.m4 b/salome_adm/unix/config_files/production.m4 index aa161181a..aa6da52d4 100644 --- a/salome_adm/unix/config_files/production.m4 +++ b/salome_adm/unix/config_files/production.m4 @@ -55,7 +55,7 @@ enable_production=AC_ENABLE_PRODUCTION_DEFAULT)dnl if test "X$enable_production" = "Xyes"; then CFLAGS="$CFLAGS -O" - CXXFLAGS="$CXXFLAGS -O -Wno-deprecated " + CXXFLAGS="$CXXFLAGS -O " fi ]) @@ -89,7 +89,7 @@ enable_debug=AC_ENABLE_DEBUG_DEFAULT)dnl if test "X$enable_debug" = "Xyes"; then CFLAGS="$CFLAGS -g -D_DEBUG_ " - CXXFLAGS="$CXXFLAGS -g -D_DEBUG_ -Wno-deprecated " + CXXFLAGS="$CXXFLAGS -g -D_DEBUG_ " fi ]) diff --git a/salome_adm/unix/config_files/python.m4 b/salome_adm/unix/config_files/python.m4 index b86c21d35..b99b9d138 100644 --- a/salome_adm/unix/config_files/python.m4 +++ b/salome_adm/unix/config_files/python.m4 @@ -126,8 +126,8 @@ fi]) AC_MSG_CHECKING([if we need libdb]) PY_NEEDOPENDB=`nm $PYTHON_LIBA | grep dbopen | grep U` if test "x$PY_NEEDOPENDB" != "x"; then - PYTHON_LIBS="$PYTHON_LIBS -ldb" AC_MSG_RESULT(yes) + AC_CHECK_LIB(db,dbopen,PYTHON_LIBS="$PYTHON_LIBS -ldb",db_ok=no) else AC_MSG_RESULT(no) fi @@ -135,8 +135,8 @@ fi]) AC_MSG_CHECKING([if we need libdl]) PY_NEEDOPENDL=`nm $PYTHON_LIBA | grep dlopen | grep U` if test "x$PY_NEEDOPENDL" != "x"; then - PYTHON_LIBS="$PYTHON_LIBS -ldl" AC_MSG_RESULT(yes) + AC_CHECK_LIB(dl,dlopen,PYTHON_LIBS="$PYTHON_LIBS -ldl",dl_ok=no) else AC_MSG_RESULT(no) fi @@ -144,8 +144,8 @@ fi]) AC_MSG_CHECKING([if we need libutil]) PY_NEEDOPENPTY=`nm $PYTHON_LIBA | grep openpty | grep U` if test "x$PY_NEEDOPENPTY" != "x"; then - PYTHON_LIBS="$PYTHON_LIBS -lutil" AC_MSG_RESULT(yes) + AC_CHECK_LIB(util,openpty,PYTHON_LIBS="$PYTHON_LIBS -lutil",openpty_ok=no) else AC_MSG_RESULT(no) fi @@ -153,8 +153,8 @@ fi]) AC_MSG_CHECKING([if we need tcltk]) PY_NEEDTCLTK=`nm $PYTHON_LIBA | grep Tcl_Init | grep U` if test "x$PY_NEEDTCLTK" != "x"; then - PYTHON_LIBS="$PYTHON_LIBS -ltcl -ltk" AC_MSG_RESULT(yes) + AC_CHECK_LIB(tcl,Tcl_Init,PYTHON_LIBS="$PYTHON_LIBS -ltcl -ltk",tclinit_ok=no) else AC_MSG_RESULT(no) fi diff --git a/salome_adm/unix/depend.in b/salome_adm/unix/depend.in index 09a46645a..4b801243f 100644 --- a/salome_adm/unix/depend.in +++ b/salome_adm/unix/depend.in @@ -20,6 +20,11 @@ ## otherwise the file is changed and a backup is saved by appending a ## tilde to the file name. ## + +DEPCC = @DEPCC@ +DEPCXX = @DEPCXX@ +DEPCXXFLAGS = @DEPCXXFLAGS@ + $(srcdir)/Dependencies: .depend @if test "$(srcdir)" != "."; then \ echo '## This file is machine generated on GNU systems.' >$@; \ @@ -43,7 +48,7 @@ depend:.depend echo Building dependencies for $$dep; \ obj=`basename $$dep .c`.lo; \ sed '\%^'"$$obj"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \ - $(CC) $(C_DEPEND_FLAG) $(CPPFLAGS) $$dep 2>/dev/null | \ + $(DEPCC) $(C_DEPEND_FLAG) $(CPPFLAGS) $$dep 2>/dev/null | \ sed 's% $(srcdir)/% $$(srcdir)/%g' | \ sed 's% $(top_srcdir)/% $$(top_srcdir)/%g' | \ sed 's% $(top_builddir)/% $$(top_builddir)/%g' | \ @@ -53,7 +58,7 @@ depend:.depend echo Building dependencies for $$dep; \ obj=`basename $$dep .cc`.lo; \ sed '\%^'"$$obj"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \ - $(CXX) $(CXX_DEPEND_FLAG) $(CXXFLAGS) $(CPPFLAGS) $$dep 2>/dev/null | \ + $(DEPCXX) $(CXX_DEPEND_FLAG) $(DEPCXXFLAGS) $(CPPFLAGS) $$dep 2>/dev/null | \ sed 's% $(srcdir)/% $$(srcdir)/%g' | \ sed 's% $(top_srcdir)/% $$(top_srcdir)/%g' | \ sed 's% $(top_builddir)/% $$(top_builddir)/%g' | \ @@ -63,7 +68,7 @@ depend:.depend echo Building dependencies for $$dep; \ obj=`basename $$dep .cxx`.lo; \ sed '\%^'"$$obj"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \ - $(CXX) $(CXX_DEPEND_FLAG) $(CXXFLAGS) $(CPPFLAGS) $$dep 2>/dev/null | \ + $(DEPCXX) $(CXX_DEPEND_FLAG) $(DEPCXXFLAGS) $(CPPFLAGS) $$dep 2>/dev/null | \ sed 's% $(srcdir)/% $$(srcdir)/%g' | \ sed 's% $(top_srcdir)/% $$(top_srcdir)/%g' | \ sed 's% $(top_builddir)/% $$(top_builddir)/%g' | \ diff --git a/salome_adm/unix/make_commence.in b/salome_adm/unix/make_commence.in index a970492b1..0f6b4ac3b 100644 --- a/salome_adm/unix/make_commence.in +++ b/salome_adm/unix/make_commence.in @@ -2,7 +2,8 @@ inc_builddir=$(top_builddir)/include/salome @SET_MAKE@ -SHELL=/bin/sh +# Modifcation B. Secher portage sur osf +SHELL=@SHELL@ # header missing @@ -10,9 +11,10 @@ HAVE_SSTREAM=@HAVE_SSTREAM@ LIBS=@LIBS@ -LDFLAGS=@LDFLAGS@ -L$(top_builddir)/lib/salome -Xlinker -rpath-link -Xlinker -L$(top_builddir)/lib/salome +# LDFLAGS=@LDFLAGS@ -L$(top_builddir)/lib/salome -Xlinker -rpath-link -Xlinker -L$(top_builddir)/lib/salome +LDFLAGS= @LDFLAGS@ -L$(top_builddir)/lib/salome # add libstdc++ to link c++ library with libtool ! -LDFLAGS+= -lstdc++ +LDFLAGS+= @STDLIB@ CP=@CP@ @@ -73,6 +75,7 @@ SIP_LIBS = @SIP_LIBS@ # PYQT PYQT_SIPS = @PYQT_SIPS@ +PYQT_INCLUDES = @PYQT_INCLUDES@ PYQT_LIBS = @PYQT_LIBS@ # openGL @@ -112,8 +115,10 @@ CAS_VIEWER=@CAS_VIEWER@ CAS_MODELER=@CAS_MODELER@ CAS_DATAEXCHANGE=@CAS_DATAEXCHANGE@ CAS_LDPATH=@CAS_LDPATH@ +# MPI +MPI_INCLUDES=@MPI_INCLUDES@ +MPI_LIBS=@MPI_LIBS@ # MPICH - MPICH_INCLUDES=@MPICH_INCLUDES@ MPICH_LIBS=@MPICH_LIBS@ diff --git a/salome_adm/unix/make_conclude.in b/salome_adm/unix/make_conclude.in index fe43d0e54..cc2fb2be6 100644 --- a/salome_adm/unix/make_conclude.in +++ b/salome_adm/unix/make_conclude.in @@ -95,7 +95,7 @@ $(BIN:%=$(top_builddir)/bin/salome/%) $(TEST_PROGS:%=$(top_builddir)/bin/salome/ ln -sf $(CURDIR)/$< $@ $(BIN) $(TEST_PROGS): %: %.lo $(BIN_OBJ) - $(CXX) $(CXXFLAGS) -o $@ $^ $(BIN_LIB) $(LDFLAGS) $(LIBS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(BIN_LIB) $(LDFLAGS) $(LIBS) # copy python scripts in $(top_builddir)/bin/salome # diff --git a/src/Container/Component_i.cxx b/src/Container/Component_i.cxx index 09d463416..3d31862b7 100644 --- a/src/Container/Component_i.cxx +++ b/src/Container/Component_i.cxx @@ -26,13 +26,13 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOME_Component_i.hxx" #include "RegistryConnexion.hxx" #include "OpUtil.hxx" #include #include #include "utilities.h" +using namespace std; extern bool _Sleeping ; static Engines_Component_i * theEngines_Component ; @@ -182,7 +182,7 @@ char* Engines_Component_i::nodeName() { return CORBA::string_dup( _nodeName.c_str() ) ; } -bool Engines_Component_i::Killer( int ThreadId , int signum ) { +bool Engines_Component_i::Killer( pthread_t ThreadId , int signum ) { if ( ThreadId ) { if ( signum == 0 ) { if ( pthread_cancel( ThreadId ) ) { @@ -305,7 +305,7 @@ long Engines_Component_i::CpuUsed() { return cpu ; } -long Engines_Component_i::CpuUsed_impl() { +CORBA::Long Engines_Component_i::CpuUsed_impl() { long cpu = 0 ; if ( _ThreadId || _Executed ) { if ( _ThreadId > 0 ) { diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index ecff86fdd..e16c47ad7 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include #include CORBA_SERVER_HEADER(SALOME_Component) #include "SALOME_Container_i.hxx" @@ -38,6 +37,7 @@ using namespace std; #include #include "utilities.h" +using namespace std; bool _Sleeping = false ; @@ -52,15 +52,23 @@ char ** _ArgV ; extern "C" {void ActSigIntHandler() ; } extern "C" {void SigIntHandler(int, siginfo_t *, void *) ; } +Engines_Container_i::Engines_Container_i () : + _numInstance(0) +{ +} + Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, char *containerName , - int argc , char* argv[] ) : + int argc , char* argv[], + bool regist, + bool activ ) : _numInstance(0) { _pid = (long)getpid(); - ActSigIntHandler() ; + if(regist) + ActSigIntHandler() ; _ArgC = argc ; _ArgV = argv ; @@ -77,7 +85,7 @@ Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb, } string hostname = GetHostname(); MESSAGE(hostname << " " << getpid() << " Engines_Container_i starting argc " - << _argc << " Thread " << pthread_self() ) ; + << _argc << " Thread " << pthread_self() ) ; i = 0 ; while ( _argv[ i ] ) { MESSAGE(" argv" << i << " " << _argv[ i ]) ; @@ -104,43 +112,25 @@ Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb, _orb = CORBA::ORB::_duplicate(orb) ; _poa = PortableServer::POA::_duplicate(poa) ; - MESSAGE("activate object"); - _id = _poa->activate_object(this); - -// _NS = new SALOME_NamingService(_orb); - _NS = SINGLETON_::Instance() ; - ASSERT(SINGLETON_::IsAlreadyExisting()) ; - _NS->init_orb( orb ) ; - - Engines::Container_ptr pCont - = Engines::Container::_narrow(_this()); - SCRUTE(_containerName); - _NS->Register(pCont, _containerName.c_str()); -} + // Pour les containers paralleles: il ne faut pas activer le container generique, mais le container specialise + if(activ){ + MESSAGE("activate object"); + _id = _poa->activate_object(this); + } -// Constructeur pour composant parallele : ne pas faire appel au naming service -Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - char *containerName, - int flag ) - : _numInstance(0) -{ - _pid = (long)getpid(); - string hostname = GetHostname(); - SCRUTE(hostname); + // Pour les containers paralleles: il ne faut pas enregistrer le container generique, mais le container specialise + if(regist){ - _containerName = "/Containers/"; - if (strlen(containerName)== 0) - { - _containerName += hostname; - } - else - { - _containerName += containerName; - } + // _NS = new SALOME_NamingService(_orb); + _NS = SINGLETON_::Instance() ; + ASSERT(SINGLETON_::IsAlreadyExisting()) ; + _NS->init_orb( orb ) ; - _orb = CORBA::ORB::_duplicate(orb) ; - _poa = PortableServer::POA::_duplicate(poa) ; + Engines::Container_ptr pCont + = Engines::Container::_narrow(_this()); + SCRUTE(_containerName); + _NS->Register(pCont, _containerName.c_str()); + } } @@ -166,6 +156,7 @@ void Engines_Container_i::ping() MESSAGE("Engines_Container_i::ping() pid "<< getpid()); } + // Kill current container bool Engines_Container_i::Kill_impl() { MESSAGE("Engines_Container_i::Kill() pid "<< getpid() << " containerName " << _containerName.c_str() << " machineName " @@ -173,6 +164,7 @@ bool Engines_Container_i::Kill_impl() { exit( 0 ) ; } +// Launch a new container from the current container Engines::Container_ptr Engines_Container_i::start_impl( const char* ContainerName ) { MESSAGE("start_impl argc " << _argc << " ContainerName " << ContainerName @@ -203,7 +195,7 @@ Engines::Container_ptr Engines_Container_i::start_impl( } if ( !nilvar ) { _numInstanceMutex.unlock() ; - MESSAGE("start_impl container found without runSession") ; + MESSAGE("start_impl container found without new launch") ; return Engines::Container::_narrow(obj); } int i = 0 ; @@ -211,12 +203,8 @@ Engines::Container_ptr Engines_Container_i::start_impl( MESSAGE(" argv" << i << " " << _argv[ i ]) ; i++ ; } -// string shstr( "rsh -n " ) ; -// shstr += machineName() ; -// shstr += " " ; -// shstr += _argv[ 0 ] ; -// string shstr( _argv[ 0 ] ) ; - string shstr( "./runSession SALOME_Container " ) ; + string shstr = string(getenv("KERNEL_ROOT_DIR")) + "/bin/salome/SALOME_Container "; +// string shstr( "./runSession SALOME_Container " ) ; shstr += ContainerName ; if ( _argc == 4 ) { shstr += " " ; @@ -230,38 +218,37 @@ Engines::Container_ptr Engines_Container_i::start_impl( MESSAGE("system(" << shstr << ")") ; int status = system( shstr.c_str() ) ; if (status == -1) { - INFOS("Engines_Container_i::start_impl runSession(SALOME_Container) failed (system command status -1)") ; + INFOS("Engines_Container_i::start_impl SALOME_Container failed (system command status -1)") ; } else if (status == 217) { - INFOS("Engines_Container_i::start_impl runSession(SALOME_Container) failed (system command status 217)") ; - } - INFOS(machineName() << " Engines_Container_i::start_impl runSession(SALOME_Container) done"); -#if 0 - pid_t pid = fork() ; - if ( pid == 0 ) { - string anExe( _argv[ 0 ] ) ; - anExe += "runSession" ; - char * args[ 6 ] ; - args[ 0 ] = "runSession" ; - args[ 1 ] = "SALOME_Container" ; - args[ 2 ] = strdup( ContainerName ) ; - args[ 3 ] = strdup( _argv[ 2 ] ) ; - args[ 4 ] = strdup( _argv[ 3 ] ) ; - args[ 5 ] = NULL ; - MESSAGE("execl(" << anExe.c_str() << " , " << args[ 0 ] << " , " - << args[ 1 ] << " , " << args[ 2 ] << " , " << args[ 3 ] - << " , " << args[ 4 ] << ")") ; - int status = execv( anExe.c_str() , args ) ; - if (status == -1) { - INFOS("Engines_Container_i::start_impl execl failed (system command status -1)") ; - perror( "Engines_Container_i::start_impl execl error ") ; - } - else { - INFOS(machineName() << " Engines_Container_i::start_impl execl done"); - } - exit(0) ; + INFOS("Engines_Container_i::start_impl SALOME_Container failed (system command status 217)") ; } -#endif + INFOS(machineName() << " Engines_Container_i::start_impl SALOME_Container launch done"); + +// pid_t pid = fork() ; +// if ( pid == 0 ) { +// string anExe( _argv[ 0 ] ) ; +// anExe += "runSession" ; +// char * args[ 6 ] ; +// args[ 0 ] = "runSession" ; +// args[ 1 ] = "SALOME_Container" ; +// args[ 2 ] = strdup( ContainerName ) ; +// args[ 3 ] = strdup( _argv[ 2 ] ) ; +// args[ 4 ] = strdup( _argv[ 3 ] ) ; +// args[ 5 ] = NULL ; +// MESSAGE("execl(" << anExe.c_str() << " , " << args[ 0 ] << " , " +// << args[ 1 ] << " , " << args[ 2 ] << " , " << args[ 3 ] +// << " , " << args[ 4 ] << ")") ; +// int status = execv( anExe.c_str() , args ) ; +// if (status == -1) { +// INFOS("Engines_Container_i::start_impl execl failed (system command status -1)") ; +// perror( "Engines_Container_i::start_impl execl error ") ; +// } +// else { +// INFOS(machineName() << " Engines_Container_i::start_impl execl done"); +// } +// exit(0) ; +// } obj = Engines::Container::_nil() ; try { @@ -283,7 +270,7 @@ Engines::Container_ptr Engines_Container_i::start_impl( } _numInstanceMutex.unlock() ; if ( !nilvar ) { - MESSAGE("start_impl container found after runSession(SALOME_Container)") ; + MESSAGE("start_impl container found after new launch of SALOME_Container") ; } return Engines::Container::_narrow(obj); } @@ -294,7 +281,7 @@ Engines::Container_ptr Engines_Container_i::start_impl( INFOS(machineName() << "Caught unknown exception."); } _numInstanceMutex.unlock() ; - MESSAGE("start_impl container not found after runSession(SALOME_Container)") ; + MESSAGE("start_impl container not found after new launch of SALOME_Container") ; return Engines::Container::_nil() ; } diff --git a/src/Container/Makefile.in b/src/Container/Makefile.in index 87f372867..23f857fe7 100644 --- a/src/Container/Makefile.in +++ b/src/Container/Makefile.in @@ -55,6 +55,6 @@ CPPFLAGS+= $(PYTHON_INCLUDES) LDFLAGS+= -lSalomeNS -lRegistry -lOpUtil -lSalomeNotification -lSALOMELocalTrace -LIBS += -Xlinker -export-dynamic $(PYTHON_LIBS) +LIBS += @LDEXPDYNFLAGS@ $(PYTHON_LIBS) @CONCLUDE@ diff --git a/src/Container/SALOME_Component_i.hxx b/src/Container/SALOME_Component_i.hxx index fc537d1c8..07c56bcb7 100644 --- a/src/Container/SALOME_Component_i.hxx +++ b/src/Container/SALOME_Component_i.hxx @@ -79,14 +79,14 @@ public: void Names( const char * graphName , const char * nodeName ) ; char * graphName() ; char * nodeName() ; - bool Killer( int ThreadId , int signum ); + bool Killer( pthread_t ThreadId , int signum ); bool Kill_impl(); bool Stop_impl(); bool Suspend_impl(); bool Resume_impl(); void SetCurCpu() ; long CpuUsed() ; - long CpuUsed_impl() ; + CORBA::Long CpuUsed_impl() ; protected: string _instanceName ; diff --git a/src/Container/SALOME_Container_i.hxx b/src/Container/SALOME_Container_i.hxx index 61ce9d308..613f3ecf7 100644 --- a/src/Container/SALOME_Container_i.hxx +++ b/src/Container/SALOME_Container_i.hxx @@ -50,25 +50,27 @@ public: Engines_Container_i(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, char * containerName , - int argc, char* argv[]); -// Constructeur pour composant parallele : ne pas faire appel au naming service - Engines_Container_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - char * containerName, - int flag); + int argc, char* argv[], + bool regist = true, + bool activ = true); virtual ~Engines_Container_i(); - + // Launch a new container from the current container Engines::Container_ptr start_impl(const char* ContainerName); + // Load component in current container Engines::Component_ptr load_impl(const char* nameToRegister, const char* componentName); + + // Unload component from current container void remove_impl(Engines::Component_ptr component_i); void finalize_removal(); char* name(); char* machineName(); void ping(); + + // Kill current container bool Kill_impl() ; char* getHostName(); long getPID(); @@ -76,17 +78,17 @@ public: protected: SALOME_NamingService *_NS ; - string _library_path; - string _containerName; + std::string _library_path; + std::string _containerName; CORBA::ORB_var _orb; PortableServer::POA_var _poa; PortableServer::ObjectId * _id ; int _numInstance ; - map handle_map ; - map remove_map ; + std::map handle_map ; + std::map remove_map ; omni_mutex _numInstanceMutex ; // if several threads on the same object -private: + //private: int _argc ; char** _argv ; diff --git a/src/DataTypeCatalog/SALOME_DataTypeCatalog_Client.cxx b/src/DataTypeCatalog/SALOME_DataTypeCatalog_Client.cxx index 083cc4b14..81008bcc6 100644 --- a/src/DataTypeCatalog/SALOME_DataTypeCatalog_Client.cxx +++ b/src/DataTypeCatalog/SALOME_DataTypeCatalog_Client.cxx @@ -24,14 +24,14 @@ // File : SALOME_DataTypeCatalog_Client.cxx // Module : SALOME -using namespace std; /* $Header$ */ -#include +#include #include "SALOME_NamingService.hxx" #include "SALOME_DataTypeCatalog.hh" #include #include "utilities.h" +using namespace std; int main(int argc,char **argv) { diff --git a/src/DataTypeCatalog/SALOME_DataTypeCatalog_Handler.cxx b/src/DataTypeCatalog/SALOME_DataTypeCatalog_Handler.cxx index 55217510a..2721fe1bf 100644 --- a/src/DataTypeCatalog/SALOME_DataTypeCatalog_Handler.cxx +++ b/src/DataTypeCatalog/SALOME_DataTypeCatalog_Handler.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; #define WRITE_CATA_DATA_TYPE #include "SALOME_DataTypeCatalog_Handler.hxx" +using namespace std; //---------------------------------------------------------------------- // Function : SALOME_DataTypeCatalog_Handler diff --git a/src/DataTypeCatalog/SALOME_DataTypeCatalog_Server.cxx b/src/DataTypeCatalog/SALOME_DataTypeCatalog_Server.cxx index a29401c51..2d3eb86b3 100644 --- a/src/DataTypeCatalog/SALOME_DataTypeCatalog_Server.cxx +++ b/src/DataTypeCatalog/SALOME_DataTypeCatalog_Server.cxx @@ -26,7 +26,7 @@ // Module : SALOME // $Header$ -#include +#include #include "SALOME_NamingService.hxx" #include "SALOME_DataTypeCatalog_impl.hxx" #include "utilities.h" diff --git a/src/DataTypeCatalog/SALOME_DataTypeCatalog_impl.cxx b/src/DataTypeCatalog/SALOME_DataTypeCatalog_impl.cxx index fdcdd0738..72b51ce38 100644 --- a/src/DataTypeCatalog/SALOME_DataTypeCatalog_impl.cxx +++ b/src/DataTypeCatalog/SALOME_DataTypeCatalog_impl.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOME_DataTypeCatalog_impl.hxx" #include +using namespace std; //---------------------------------------------------------------------- // Function : SALOME_DataTypeCatalogImpl diff --git a/src/HDFPersist/HDFascii.cc b/src/HDFPersist/HDFascii.cc index 49cc43099..e5719df68 100644 --- a/src/HDFPersist/HDFascii.cc +++ b/src/HDFPersist/HDFascii.cc @@ -1,4 +1,3 @@ -using namespace std; // File : SALOMEDS_Tool.cxx // Created : Mon Oct 21 16:24:34 2002 // Author : Sergey RUIN @@ -19,6 +18,7 @@ using namespace std; #include #include #include +using namespace std; bool CreateAttributeFromASCII(HDFinternalObject *father, FILE* fp); bool CreateDatasetFromASCII(HDFcontainerObject *father, FILE *fp); diff --git a/src/HDFPersist/HDFattribute.cc b/src/HDFPersist/HDFattribute.cc index b87cb0799..d4ec7b9c5 100644 --- a/src/HDFPersist/HDFattribute.cc +++ b/src/HDFPersist/HDFattribute.cc @@ -24,7 +24,6 @@ // File : HDFattribute.cc // Module : SALOME -using namespace std; extern "C" { #include "hdfi.h" @@ -32,6 +31,7 @@ extern "C" #include "HDFexception.hxx" #include "HDFattribute.hxx" #include "HDFinternalObject.hxx" +using namespace std; HDFattribute::HDFattribute(char *name,HDFinternalObject *father,hdf_type type, size_t size) : HDFobject(name) @@ -101,9 +101,12 @@ hdf_type HDFattribute::GetType() size_t HDFattribute::GetSize() { + int size; if(_size == 0) { - if((_size = HDFattrGetSize(_id)) < 0) + if((size = HDFattrGetSize(_id)) < 0) throw HDFexception("Can't determine the size of data in the attribute"); + else + _size = size; } return _size; } diff --git a/src/HDFPersist/HDFcontainerObject.cc b/src/HDFPersist/HDFcontainerObject.cc index 2f5398bd7..1a84b1db1 100644 --- a/src/HDFPersist/HDFcontainerObject.cc +++ b/src/HDFPersist/HDFcontainerObject.cc @@ -24,7 +24,6 @@ // File : HDFcontainerObject.cc // Module : SALOME -using namespace std; extern "C" { #include "hdfi.h" @@ -32,6 +31,7 @@ extern "C" #include "HDFcontainerObject.hxx" #include "HDFexception.hxx" #include "utilities.h" +using namespace std; HDFcontainerObject::HDFcontainerObject(char *name) : HDFinternalObject(name) diff --git a/src/HDFPersist/HDFconvert.cc b/src/HDFPersist/HDFconvert.cc index 2a6fe9b76..991b00e6c 100644 --- a/src/HDFPersist/HDFconvert.cc +++ b/src/HDFPersist/HDFconvert.cc @@ -24,8 +24,8 @@ // File : HDFconvert.cc // Module : SALOME -using namespace std; #include "HDFconvert.hxx" +using namespace std; int HDFConvert::FromAscii(const string& file, const HDFcontainerObject & hdf_container, const string& nomdataset) { @@ -68,10 +68,10 @@ int HDFConvert::FromAscii(const string& file, const HDFcontainerObject & hdf_con #endif // Creation du Dataset utilisateur - hdf_dataset = new HDFdataset::HDFdataset( (char *) nomdataset.c_str(), /*discard const */ - (HDFcontainerObject*) &hdf_container, /*discard const, pas de constructeur par référence */ - HDF_STRING, - &length_long,1); + hdf_dataset = new HDFdataset( (char *) nomdataset.c_str(), /*discard const */ + (HDFcontainerObject*) &hdf_container, /*discard const, pas de constructeur par référence */ + HDF_STRING, + &length_long,1); // Cree le Dataset sur le disk hdf_dataset->CreateOnDisk(); @@ -98,5 +98,7 @@ int HDFConvert::FromAscii(const string& file, const HDFcontainerObject & hdf_con perror("HDFConvert::FromAscii"); return -1; }; + + return 0; }; diff --git a/src/HDFPersist/HDFconvert.hxx b/src/HDFPersist/HDFconvert.hxx index 1e3b9c896..dcc0552d4 100644 --- a/src/HDFPersist/HDFconvert.hxx +++ b/src/HDFPersist/HDFconvert.hxx @@ -52,7 +52,7 @@ private: public: -static int FromAscii(const string& file, const HDFcontainerObject& hdf_container, const string& nomdataset); +static int FromAscii(const std::string& file, const HDFcontainerObject& hdf_container, const std::string& nomdataset); }; diff --git a/src/HDFPersist/HDFdataset.cc b/src/HDFPersist/HDFdataset.cc index 07d75e11c..fcd8375b4 100644 --- a/src/HDFPersist/HDFdataset.cc +++ b/src/HDFPersist/HDFdataset.cc @@ -24,17 +24,17 @@ // File : HDFdataset.cc // Module : SALOME -using namespace std; extern "C" { #include "hdfi.h" -#include } +#include #include "HDFdataset.hxx" #include "HDFcontainerObject.hxx" #include "HDFexception.hxx" -#include +#include +using namespace std; herr_t dataset_attr(hid_t loc_id, const char *attr_name, void *operator_data) { @@ -157,7 +157,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/HDFexception.hxx b/src/HDFPersist/HDFexception.hxx index b23d32101..a913f62e1 100644 --- a/src/HDFPersist/HDFexception.hxx +++ b/src/HDFPersist/HDFexception.hxx @@ -31,6 +31,6 @@ class HDFexception { public : HDFexception(const char *message) { - cerr << message << endl; + std::cerr << message << std::endl; } }; diff --git a/src/HDFPersist/HDFexplorer.cc b/src/HDFPersist/HDFexplorer.cc index 2e86f820e..114732d48 100644 --- a/src/HDFPersist/HDFexplorer.cc +++ b/src/HDFPersist/HDFexplorer.cc @@ -24,11 +24,11 @@ // File : HDFexplorer.cc // Module : SALOME -using namespace std; #include "HDFcontainerObject.hxx" #include "HDFexception.hxx" #include "HDFinternalObject.hxx" #include "HDFexplorer.hxx" +using namespace std; HDFexplorer::HDFexplorer(HDFcontainerObject *container) { diff --git a/src/HDFPersist/HDFfile.cc b/src/HDFPersist/HDFfile.cc index 469430a34..c43a33320 100644 --- a/src/HDFPersist/HDFfile.cc +++ b/src/HDFPersist/HDFfile.cc @@ -24,16 +24,16 @@ // File : HDFfile.cc // Module : SALOME -using namespace std; extern "C" { #include "hdfi.h" #include -#include } -#include +#include +#include #include "HDFfile.hxx" #include "HDFexception.hxx" +using namespace std; herr_t file_attr(hid_t loc_id, const char *attr_name, void *operator_data) { diff --git a/src/HDFPersist/HDFgroup.cc b/src/HDFPersist/HDFgroup.cc index b08f4de6e..ebeba2992 100644 --- a/src/HDFPersist/HDFgroup.cc +++ b/src/HDFPersist/HDFgroup.cc @@ -24,14 +24,14 @@ // File : HDFgroup.cc // Module : SALOME -using namespace std; extern "C" { #include "hdfi.h" -#include } +#include #include "HDFgroup.hxx" #include "HDFexception.hxx" +using namespace std; herr_t group_attr(hid_t loc_id, const char *attr_name, void *operator_data) { diff --git a/src/HDFPersist/HDFinternalObject.cc b/src/HDFPersist/HDFinternalObject.cc index 2cf6ed011..7ef6fb8e7 100644 --- a/src/HDFPersist/HDFinternalObject.cc +++ b/src/HDFPersist/HDFinternalObject.cc @@ -24,12 +24,12 @@ // File : HDFinternalObject.cc // Module : SALOME -using namespace std; extern "C" { #include "hdfi.h" } #include "HDFinternalObject.hxx" +using namespace std; HDFinternalObject::HDFinternalObject(char *name) : HDFobject(name) diff --git a/src/HDFPersist/HDFobject.cc b/src/HDFPersist/HDFobject.cc index 81fc689c8..eed36fdab 100644 --- a/src/HDFPersist/HDFobject.cc +++ b/src/HDFPersist/HDFobject.cc @@ -24,14 +24,14 @@ // File : HDFobject.cc // Module : SALOME -using namespace std; #include "HDFobject.hxx" extern "C" { #include "hdfi.h" -#include } +#include #include "utilities.h" +using namespace std; HDFobject::HDFobject(char *name) { diff --git a/src/LifeCycleCORBA/LifeCycleCORBA.py b/src/LifeCycleCORBA/LifeCycleCORBA.py index 9c683e51f..550a88ff9 100644 --- a/src/LifeCycleCORBA/LifeCycleCORBA.py +++ b/src/LifeCycleCORBA/LifeCycleCORBA.py @@ -97,8 +97,13 @@ class LifeCycleCORBA: #------------------------------------------------------------------------- def ComputerPath(self, ComputerName ): + # Modification provisoire B. Secher en attendant + # le gestionnaire de ressources 21/10/2003 + # Le KERNEL_ROOT_DIR sera a lire dans le catalogue de machines + # en attendant on suppose qu'il est identique au KERNEL_ROOT_DIR local try: - path = self._catalog.GetPathPrefix( ComputerName ) + #path = self._catalog.GetPathPrefix( ComputerName ) + path = os.getenv("KERNEL_ROOT_DIR") + "/bin/salome/" except SALOME_ModuleCatalog.NotFound, ex: path = "" return path @@ -137,14 +142,14 @@ class LifeCycleCORBA: else : rshstr = "rsh -n " + theComputer + " " path = self.ComputerPath( theComputer ) - if path != "" : - rshstr = rshstr + path + "/../bin/" - else : - rshstr = rshstr + os.getenv( "SALOME_ROOT_DIR" ) + "/bin/" +## if path != "" : +## rshstr = rshstr + path + "/../bin/" +## else : +## rshstr = rshstr + os.getenv( "KERNEL_ROOT_DIR" ) + "/bin/" if theContainer == "FactoryServer" : - rshstr = rshstr + "./runSession ./SALOME_Container " + rshstr = rshstr + path + "SALOME_Container " else : - rshstr = rshstr + "./runSession ./SALOME_ContainerPy.py '" + rshstr = rshstr + path + "SALOME_ContainerPy.py '" rshstr = rshstr + theContainer + " -" omniORBcfg = os.getenv( "OMNIORB_CONFIG" ) file = os.open( omniORBcfg , os.O_RDONLY ) @@ -177,7 +182,7 @@ class LifeCycleCORBA: return aContainer return aContainer - #os.system("rsh -n dm2s0017 /export/home/SALOME_ROOT/bin/runSession SALOME_Container -ORBInitRef NameService=corbaname::dm2s0017:1515") + #os.system("rsh -n dm2s0017 /export/home/KERNEL_ROOT/bin/runSession SALOME_Container -ORBInitRef NameService=corbaname::dm2s0017:1515") #------------------------------------------------------------------------- diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx index 844d02448..6e48df6b9 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx @@ -26,11 +26,11 @@ // Module : SALOME // $Header$ -using namespace std; #include #include #include #include +using namespace std; #include "OpUtil.hxx" #include "utilities.h" @@ -91,19 +91,24 @@ string SALOME_LifeCycleCORBA::ContainerName( string SALOME_LifeCycleCORBA::ComputerPath( const char * theComputer ) { - CORBA::String_var path; - CORBA::Object_var obj = _NS->Resolve("/Kernel/ModulCatalog"); - SALOME_ModuleCatalog::ModuleCatalog_var Catalog = - SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj) ; - try { - path = Catalog->GetPathPrefix( theComputer ); - } - catch (SALOME_ModuleCatalog::NotFound&) { - MESSAGE("GetPathPrefix(" << theComputer << ") not found!"); - path = "" ; - } +// CORBA::String_var path; +// CORBA::Object_var obj = _NS->Resolve("/Kernel/ModulCatalog"); +// SALOME_ModuleCatalog::ModuleCatalog_var Catalog = +// SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj) ; +// try { +// path = Catalog->GetPathPrefix( theComputer ); +// } +// catch (SALOME_ModuleCatalog::NotFound&) { +// MESSAGE("GetPathPrefix(" << theComputer << ") not found!"); +// path = "" ; +// } +// Modification provisoire B. Secher en attendant le gestionnaire de ressources +// 21/10/2003 +// Le KERNEL_ROOT_DIR sera a lire dans le catalogue de machines +// en attendant on suppose qu'il est identique au KERNEL_ROOT_DIR local + string path = string(getenv("KERNEL_ROOT_DIR")) + "/bin/salome/"; SCRUTE( path ) ; - return CORBA::string_dup( path ) ; + return path; } Engines::Container_var SALOME_LifeCycleCORBA::FindContainer(const char *containerName ) { @@ -162,7 +167,7 @@ Engines::Container_var SALOME_LifeCycleCORBA::FindOrStartContainer( } aFactoryServer = FindContainer( FactoryServer.c_str() ) ; if ( CORBA::is_nil( aFactoryServer ) ) { -// rsh -n ikkyo /export/home/rahuel/SALOME_ROOT/bin/runSession SALOME_Container -ORBInitRef NameService=corbaname::dm2s0017:1515 & +// rsh -n machine_name ${KERNEL_ROOT_DIR}/bin/salome SALOME_Container -ORBInitRef NameService=corbaname::localhost:1515 & string rsh( "" ) ; if ( theComputer!= GetHostname() ) { rsh += "rsh -n " ; @@ -171,11 +176,8 @@ Engines::Container_var SALOME_LifeCycleCORBA::FindOrStartContainer( } string path = ComputerPath( theComputer.c_str() ) ; SCRUTE( path ) ; - if ( path[0] != '\0' ) { - rsh += path ; - rsh += "/../bin/" ; - } - rsh += "runSession " ; + rsh += path; +// rsh += "runSession " ; if ( pyCont ) { rsh += "SALOME_ContainerPy.py " ; rsh += "FactoryServerPy -" ; diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx index 2338fe34c..d562f43f3 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx @@ -54,12 +54,12 @@ public: protected: SALOME_NamingService *_NS; Engines::Container_var _FactoryServer ; - -private: + std::string ComputerPath( const char * theComputer ) ; std::string ContainerName( const char * aComputerContainer , std::string * theComputer , std::string * theContainer ) ; - std::string ComputerPath( const char * theComputer ) ; + +private: Engines::Container_var FindOrStartContainer(const std::string aComputerContainer , const std::string theComputer , const std::string theContainer ) ; diff --git a/src/LifeCycleCORBA/TestLifeCycleCORBA.cxx b/src/LifeCycleCORBA/TestLifeCycleCORBA.cxx index b67b988b6..603c32814 100644 --- a/src/LifeCycleCORBA/TestLifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/TestLifeCycleCORBA.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "utilities.h" #include #include @@ -36,6 +35,7 @@ using namespace std; #include "SALOME_NamingService.hxx" #include "SALOME_LifeCycleCORBA.hxx" #include +using namespace std; int main (int argc, char * argv[]) { diff --git a/src/Loader/InquireServersQThread.cxx b/src/Loader/InquireServersQThread.cxx index b80547c9d..cd77e0a8b 100644 --- a/src/Loader/InquireServersQThread.cxx +++ b/src/Loader/InquireServersQThread.cxx @@ -7,7 +7,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "InquireServersQThread.h" #include @@ -36,6 +35,7 @@ using namespace std; #include "SALOME_NamingService.hxx" #include "utilities.h" #include "OpUtil.hxx" +using namespace std; #include CORBA_CLIENT_HEADER(SALOME_Session) #include CORBA_CLIENT_HEADER(SALOME_Registry) @@ -193,6 +193,7 @@ void InquireServersGUI::customEvent( QCustomEvent* pe ) int InquireServersGUI::getExitStatus() { myThread->getExitStatus(); + return 0; } InquireServersQThread::InquireServersQThread( InquireServersGUI* r ) diff --git a/src/Loader/SALOME_Session_Loader.cxx b/src/Loader/SALOME_Session_Loader.cxx index 3aff04564..c15bf1162 100644 --- a/src/Loader/SALOME_Session_Loader.cxx +++ b/src/Loader/SALOME_Session_Loader.cxx @@ -7,7 +7,6 @@ // Module : SALOME // $Header$ -using namespace std; /*! \file SALOME_Session_loader.cxx */ @@ -19,6 +18,7 @@ using namespace std; #include "Utils_SINGLETON.hxx" #include "SALOME_NamingService.hxx" #include "utilities.h" +using namespace std; //! CORBA client for SALOME Session server : launch GUI /*! diff --git a/src/Logger/SALOME_Logger_Server.cxx b/src/Logger/SALOME_Logger_Server.cxx index 5d1b3a4a7..bb772db84 100644 --- a/src/Logger/SALOME_Logger_Server.cxx +++ b/src/Logger/SALOME_Logger_Server.cxx @@ -8,12 +8,13 @@ // Author : Vasily Rusyaev // Module : SALOME -using namespace std; #include + #include "SALOME_Logger_Server.hxx" #include #include #include +using namespace std; omni_mutex Logger::myLock; ///////////////////////////////////////////////////////////////////// diff --git a/src/Logger/SALOME_Trace.cxx b/src/Logger/SALOME_Trace.cxx index d139476c1..2fb550990 100644 --- a/src/Logger/SALOME_Trace.cxx +++ b/src/Logger/SALOME_Trace.cxx @@ -8,14 +8,15 @@ // Author : Vasily Rusyaev // Module : SALOME -using namespace std; #include "SALOME_Trace.hxx" #include #include -//#include #include #include +#include "SALOME_Trace.hxx" +using namespace std; + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/src/Logger/SALOME_Trace.hxx b/src/Logger/SALOME_Trace.hxx index 90fbfd06f..0a8e0f625 100644 --- a/src/Logger/SALOME_Trace.hxx +++ b/src/Logger/SALOME_Trace.hxx @@ -42,10 +42,10 @@ # endif /* WNT */ -using namespace std; - #include + #include "Logger.hh" +using namespace std; class SALOME_Trace : public ostrstream { diff --git a/src/MPIContainer/MPIContainer_i.cxx b/src/MPIContainer/MPIContainer_i.cxx index 8201d24f0..ad729c45a 100644 --- a/src/MPIContainer/MPIContainer_i.cxx +++ b/src/MPIContainer/MPIContainer_i.cxx @@ -24,30 +24,38 @@ // File : MPIContainer_i.cxx // Module : SALOME -using namespace std; #include #include #include #include "MPIContainer_i.hxx" +#include "SALOME_NamingService.hxx" +#include "Utils_SINGLETON.hxx" +#include "OpUtil.hxx" #include "utilities.h" +using namespace std; -MPIContainer_i::MPIContainer_i(int nbproc, int numproc, - CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - char * containerName) - : Engines_Container_i(orb,poa,containerName,0), MPIObject_i(nbproc,numproc) +// L'appel au registry SALOME ne se fait que pour le process 0 +Engines_MPIContainer_i::Engines_MPIContainer_i(int nbproc, int numproc, + CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + char * containerName, + int argc, char *argv[]) + : Engines_Container_i(orb,poa,containerName,argc,argv,false,false), MPIObject_i(nbproc,numproc) { + MESSAGE("[" << numproc << "] activate object"); _id = _poa->activate_object(this); - MESSAGE("[" << _numproc << "] containerName=" << _containerName); - if( _numproc == 0 ){ + if(numproc==0){ + + // _NS = new SALOME_NamingService(_orb); _NS = SINGLETON_::Instance() ; ASSERT(SINGLETON_::IsAlreadyExisting()) ; _NS->init_orb( orb ) ; Engines::Container_ptr pCont = Engines::Container::_narrow(POA_Engines::MPIContainer::_this()); - _NS->Register(pCont, _containerName.c_str()); + SCRUTE(_containerName); + _NS->Register(pCont, _containerName.c_str()); } // Root recupere les ior des container des autre process @@ -55,41 +63,165 @@ MPIContainer_i::MPIContainer_i(int nbproc, int numproc, BCastIOR(_orb,pobj,true); } -MPIContainer_i::~MPIContainer_i(void) +Engines_MPIContainer_i::Engines_MPIContainer_i(int nbproc, int numproc) + : Engines_Container_i(), MPIObject_i(nbproc,numproc) +{ +} + +Engines_MPIContainer_i::~Engines_MPIContainer_i(void) { + MESSAGE("[" << _numproc << "] Engines_MPIContainer_i::~Engines_MPIContainer_i()"); if( !handle_map.empty() ){ - MESSAGE("[" << _numproc << "] MPIContainer_i::~MPIContainer_i: warning destroy a not empty container"); + MESSAGE("[" << _numproc << "] Engines_MPIContainer_i::~Engines_MPIContainer_i: warning destroy a not empty container"); } } +// Start MPI Container +Engines::MPIContainer_ptr Engines_MPIContainer_i::start_MPIimpl( + const char* ContainerName, + CORBA::Short nbproc ) +{ + + char nbp[1024]; + + MESSAGE("[" << _numproc << "] start_impl argc " << _argc << " ContainerName " << ContainerName + << hex << this << dec) ; + _numInstanceMutex.lock() ; // lock on the instance number + + CORBA::Object_var obj = Engines::MPIContainer::_nil() ; + bool nilvar = true ; + try { + string cont("/Containers/"); + cont += machineName() ; + cont += "/" ; + cont += ContainerName; + INFOS("[" << _numproc << "] " << machineName() << " start_impl unknown container " << cont.c_str() + << " try to Resolve" ); + obj = _NS->Resolve( cont.c_str() ); + nilvar = CORBA::is_nil( obj ) ; + if ( nilvar ) { + INFOS("[" << _numproc << "] " << machineName() << " start_impl unknown container " + << ContainerName); + } + } + catch (ServiceUnreachable&) { + INFOS("[" << _numproc << "] " << machineName() << "Caught exception: Naming Service Unreachable"); + } + catch (...) { + INFOS("[" << _numproc << "] " << machineName() << "Caught unknown exception."); + } + if ( !nilvar ) { + _numInstanceMutex.unlock() ; + MESSAGE("[" << _numproc << "] start_impl container found without new launch") ; + return Engines::MPIContainer::_narrow(obj); + } + int i = 0 ; + while ( _argv[ i ] ) { + MESSAGE("[" << _numproc << "] argv" << i << " " << _argv[ i ]) ; + i++ ; + } + sprintf(nbp,"mpirun -np %d SALOME_MPIContainer ",nbproc); + string shstr(nbp); + shstr += ContainerName ; + if ( _argc == 4 ) { + shstr += " " ; + shstr += _argv[ 2 ] ; + shstr += " " ; + shstr += _argv[ 3 ] ; + } + shstr += " > /tmp/" ; + shstr += ContainerName ; + shstr += ".log 2>&1 &" ; + MESSAGE("system(" << shstr << ")") ; + int status = system( shstr.c_str() ) ; + if (status == -1) { + INFOS("[" << _numproc << "] Engines_MPIContainer_i::start_impl SALOME_MPIContainer failed (system command status -1)") ; + } + else if (status == 217) { + INFOS("[" << _numproc << "] Engines_MPIContainer_i::start_impl SALOME_MPIContainer failed (system command status 217)") ; + } + INFOS("[" << _numproc << "] " << machineName() << " Engines_MPIContainer_i::start_impl SALOME_MPIContainer launch done"); + + obj = Engines::MPIContainer::_nil() ; + try { + string cont("/Containers/"); + cont += machineName() ; + cont += "/" ; + cont += ContainerName; + nilvar = true ; + int count = 20 ; + while ( nilvar && count >= 0) { + sleep( 1 ) ; + obj = _NS->Resolve(cont.c_str()); + nilvar = CORBA::is_nil( obj ) ; + if ( nilvar ) { + INFOS("[" << _numproc << "] " << count << ". " << machineName() + << " start_impl unknown container " << cont.c_str()); + count -= 1 ; + } + } + _numInstanceMutex.unlock() ; + if ( !nilvar ) { + MESSAGE("[" << _numproc << "] start_impl container found after new launch of SALOME_MPIContainer") ; + } + return Engines::MPIContainer::_narrow(obj); + } + catch (ServiceUnreachable&) { + INFOS("[" << _numproc << "] " << machineName() << "Caught exception: Naming Service Unreachable"); + } + catch (...) { + INFOS("[" << _numproc << "] " << machineName() << "Caught unknown exception."); + } + _numInstanceMutex.unlock() ; + MESSAGE("[" << _numproc << "] start_impl MPI container not found after new launch of SALOME_MPIContainer") ; + return Engines::MPIContainer::_nil() ; +} + // Load component -Engines::Component_ptr MPIContainer_i::load_impl(const char* nameToRegister, +Engines::Component_ptr Engines_MPIContainer_i::load_impl(const char* nameToRegister, const char* componentName) { int ip; - Engines::Component_var iobject; - Engines::MPIObject_var pobj; - char cproc[4]; if( _numproc == 0 ){ // Invocation du chargement du composant dans les autres process for(ip= 1;ip<_nbproc;ip++) - (Engines::MPIContainer::_narrow((*_tior)[ip]))->load_impl(nameToRegister, + (Engines::MPIContainer::_narrow((*_tior)[ip]))->SPload_impl(nameToRegister, componentName); } + return Lload_impl(nameToRegister,componentName); + +} + +// Load component +void Engines_MPIContainer_i::SPload_impl(const char* nameToRegister, + const char* componentName) +{ + Lload_impl(nameToRegister,componentName); +} + +Engines::Component_ptr Engines_MPIContainer_i::Lload_impl( + const char* nameToRegister, + const char* componentName) +{ + Engines::Component_var iobject; + Engines::MPIObject_var pobj; + char cproc[4]; + sprintf(cproc,"_%d",_numproc); - BEGIN_OF("[" << _numproc << "] MPIContainer_i::load_impl"); + BEGIN_OF("[" << _numproc << "] MPIContainer_i::Lload_impl"); _numInstanceMutex.lock() ; // lock on the instance number _numInstance++ ; char _aNumI[12]; sprintf(_aNumI,"%d",_numInstance) ; - _numInstanceMutex.unlock() ; string _impl_name = componentName; - string instanceName = string(nameToRegister) + "_inst_" + _aNumI + cproc; + string _nameToRegister = nameToRegister; + string instanceName = _nameToRegister + "_inst_" + _aNumI + cproc; + MESSAGE("[" << _numproc << "] instanceName=" << instanceName); string absolute_impl_name(_impl_name); MESSAGE("[" << _numproc << "] absolute_impl_name=" << absolute_impl_name); @@ -100,7 +232,7 @@ Engines::Component_ptr MPIContainer_i::load_impl(const char* nameToRegister, return Engines::Component::_nil() ; } - string factory_name = string(nameToRegister) + string("Engine_factory"); + string factory_name = _nameToRegister + string("Engine_factory"); MESSAGE("[" << _numproc << "] factory_name=" << factory_name) ; PortableServer::ObjectId * (*MPIComponent_factory) (int,int, @@ -121,6 +253,7 @@ Engines::Component_ptr MPIContainer_i::load_impl(const char* nameToRegister, if ((error = dlerror()) != NULL){ // Try to load a sequential component MESSAGE("[" << _numproc << "] Try to load a sequential component"); + _numInstanceMutex.unlock() ; iobject = Engines_Container_i::load_impl(nameToRegister,componentName); if( CORBA::is_nil(iobject) ) return Engines::Component::_duplicate(iobject); } @@ -128,32 +261,32 @@ Engines::Component_ptr MPIContainer_i::load_impl(const char* nameToRegister, // Instanciation du composant parallele MESSAGE("[" << _numproc << "] Try to load a parallel component"); PortableServer::ObjectId * id = (MPIComponent_factory) - (_nbproc,_numproc,_orb, _poa, _id, instanceName.c_str(), nameToRegister); + (_nbproc,_numproc,_orb, _poa, _id, instanceName.c_str(), _nameToRegister.c_str()); // get reference from id CORBA::Object_var o = _poa->id_to_reference(*id); pobj = Engines::MPIObject::_narrow(o) ; - iobject = Engines::Component::_narrow(pobj) ; + iobject = Engines::Component::_narrow(o) ; } - // Root recupere les ior des composants des autre process - BCastIOR(_orb,pobj,false); - if( _numproc == 0 ){ // utiliser + tard le registry ici : // register the engine under the name containerName.dir/nameToRegister.object - string component_registerName = _containerName + "/" + nameToRegister; + string component_registerName = _containerName + "/" + _nameToRegister; _NS->Register(iobject, component_registerName.c_str()) ; } - _numInstanceMutex.lock() ; // lock on the add on handle_map (necessary ?) handle_map[instanceName] = handle; _numInstanceMutex.unlock() ; - END_OF("[" <<_numproc << "] MPIContainer_i::load_impl"); + + // Root recupere les ior des composants des autre process + BCastIOR(_orb,pobj,false); + + END_OF("[" <<_numproc << "] MPIContainer_i::Lload_impl"); return Engines::Component::_duplicate(iobject); } -void MPIContainer_i::remove_impl(Engines::Component_ptr component_i) +void Engines_MPIContainer_i::remove_impl(Engines::Component_ptr component_i) { int ip; Engines::Component_ptr cptr; @@ -168,10 +301,29 @@ void MPIContainer_i::remove_impl(Engines::Component_ptr component_i) for(ip= 1;ip<_nbproc;ip++){ spcptr = Engines::MPIObject::_narrow((*(pcptr->tior()))[ip]); cptr = (Engines::Component_ptr)spcptr; - (Engines::MPIContainer::_narrow((*_tior)[ip]))->remove_impl(cptr); + (Engines::MPIContainer::_narrow((*_tior)[ip]))->SPremove_impl(cptr); } } + Lremove_impl(component_i); +} + +void Engines_MPIContainer_i::SPremove_impl(Engines::Component_ptr component_i) +{ + Lremove_impl(component_i); +} + +void Engines_MPIContainer_i::Lremove_impl(Engines::Component_ptr component_i) +{ + int ip; + Engines::Component_ptr cptr; + Engines::MPIObject_ptr pcptr; + Engines::MPIObject_ptr spcptr; + + BEGIN_OF("[" << _numproc << "] MPIContainer_i::Lremove_impl"); + + ASSERT(! CORBA::is_nil(component_i)); + string instanceName = component_i->instanceName() ; MESSAGE("[" << _numproc << "] unload component " << instanceName); component_i->destroy() ; @@ -190,29 +342,45 @@ void MPIContainer_i::remove_impl(Engines::Component_ptr component_i) { MESSAGE("[" << _numproc << "] stay " << (*im).first); } + + END_OF("[" << _numproc << "] MPIContainer_i::Lremove_impl"); + } -void MPIContainer_i::finalize_removal() +void Engines_MPIContainer_i::finalize_removal() { int ip; - MESSAGE("[" << _numproc << "] finalize unload : dlclose"); - if( _numproc == 0 ){ // Invocation de la destruction du composant dans les autres process for(ip= 1;ip<_nbproc;ip++) - (Engines::MPIContainer::_narrow((*_tior)[ip]))->finalize_removal(); + (Engines::MPIContainer::_narrow((*_tior)[ip]))->SPfinalize_removal(); } + Lfinalize_removal(); +} + +void Engines_MPIContainer_i::SPfinalize_removal() +{ + Lfinalize_removal(); +} + +void Engines_MPIContainer_i::Lfinalize_removal() +{ + BEGIN_OF("[" << _numproc << "] MPIContainer_i::Lfinalize_removal"); + map::iterator im ; - _numInstanceMutex.lock() ; // lock on the explore remove_map & dlclose + // lock on the explore remove_map & dlclose + _numInstanceMutex.lock() ; for (im = remove_map.begin() ; im != remove_map.end() ; im ++) { void * handle = (*im).second ; - dlclose(handle) ; MESSAGE("[" << _numproc << "] dlclose " << (*im).first); + dlclose(handle) ; } + MESSAGE("[" << _numproc << "] remove_map.clear()"); remove_map.clear() ; _numInstanceMutex.unlock() ; - MESSAGE("[" << _numproc << "] remove_map.clear()"); + + END_OF("[" << _numproc << "] MPIContainer_i::Lfinalize_removal"); } diff --git a/src/MPIContainer/MPIContainer_i.hxx b/src/MPIContainer/MPIContainer_i.hxx index 390f6ce73..7d9ddc9a2 100644 --- a/src/MPIContainer/MPIContainer_i.hxx +++ b/src/MPIContainer/MPIContainer_i.hxx @@ -28,34 +28,55 @@ #define _SALOME_PCONTAINER_ #include -#include CORBA_SERVER_HEADER(MPIContainer) +#include CORBA_SERVER_HEADER(SALOME_MPIContainer) #include "SALOME_Container_i.hxx" -#include "SALOME_NamingService.hxx" -#include "Utils_SINGLETON.hxx" -#include "OpUtil.hxx" #include "MPIObject_i.hxx" -class MPIContainer_i : public POA_Engines::MPIContainer, - public Engines_Container_i, - public MPIObject_i +class Engines_MPIContainer_i : public POA_Engines::MPIContainer, + public Engines_Container_i, + public MPIObject_i { public: // Constructor - MPIContainer_i( int nbproc, int numproc, - CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - char * containerName); + Engines_MPIContainer_i( int nbproc, int numproc, + CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + char * containerName, + int argc, char *argv[]); + Engines_MPIContainer_i(int nbproc, int numproc); // Destructor - ~MPIContainer_i(); + ~Engines_MPIContainer_i(); - // Load a component + // Launch a new MPI container from the current container + Engines::MPIContainer_ptr start_MPIimpl(const char* ContainerName, + CORBA::Short nbproc); + + // Load a component in current MPI container + // synchronous version for process 0 Engines::Component_ptr load_impl(const char* nameToRegister, const char* componentName); + // asynchronous version for other process + void SPload_impl(const char* nameToRegister, const char* componentName); - // Unload a component + // Unload a component from current MPI container + // synchronous version for process 0 void remove_impl(Engines::Component_ptr component_i); + // asynchronous version for other process + void SPremove_impl(Engines::Component_ptr component_i); + + // synchronous version for process 0 void finalize_removal(); + // asynchronous version for other process + void SPfinalize_removal(); + + private: + // local version to not duplicate code + // called by synchronous and asynchronous version + Engines::Component_ptr Lload_impl(const char* nameToRegister, + const char* componentName); + void Lremove_impl(Engines::Component_ptr component_i); + void Lfinalize_removal(); }; #endif diff --git a/src/MPIContainer/MPIObject_i.cxx b/src/MPIContainer/MPIObject_i.cxx index 218c01c9d..177a61ffb 100644 --- a/src/MPIContainer/MPIObject_i.cxx +++ b/src/MPIContainer/MPIObject_i.cxx @@ -24,10 +24,10 @@ // File : MPIObject_i.cxx // Module : SALOME -using namespace std; #include "MPIObject_i.hxx" #include "utilities.h" #include +using namespace std; MPIObject_i::MPIObject_i() { @@ -109,18 +109,21 @@ void MPIObject_i::BCastIOR(CORBA::ORB_ptr orb, Engines::MPIObject_var pobj, } else{ // On envoie l'IOR au process 0 - n = strlen((char*)sior); + ior = sior._retn(); + n = strlen(ior) + 1; err = MPI_Send(&n,1,MPI_INTEGER,0,_numproc,MPI_COMM_WORLD); if(err){ MESSAGE("[" << _numproc << "] MPI_SEND error"); exit(1); } - err = MPI_Send((char*)sior,n,MPI_CHARACTER,0,2*_numproc,MPI_COMM_WORLD); + err = MPI_Send(ior,n,MPI_CHARACTER,0,2*_numproc,MPI_COMM_WORLD); if(err){ MESSAGE("[" << _numproc << "] MPI_SEND error"); exit(1); } } + MPI_Barrier(MPI_COMM_WORLD); + } diff --git a/src/MPIContainer/MPIObject_i.hxx b/src/MPIContainer/MPIObject_i.hxx index e504bb829..47243a19b 100644 --- a/src/MPIContainer/MPIObject_i.hxx +++ b/src/MPIContainer/MPIObject_i.hxx @@ -28,7 +28,7 @@ #define _SALOME_POBJECT_I_H_ #include -#include CORBA_SERVER_HEADER(MPIObject) +#include CORBA_SERVER_HEADER(SALOME_MPIObject) class MPIObject_i: public POA_Engines::MPIObject { diff --git a/src/MPIContainer/Makefile.in b/src/MPIContainer/Makefile.in index da4e295d9..c8af02841 100644 --- a/src/MPIContainer/Makefile.in +++ b/src/MPIContainer/Makefile.in @@ -44,15 +44,24 @@ EXPORT_HEADERS = \ LIB = libSalomeMPIContainer.la LIB_SRC = MPIObject_i.cxx MPIContainer_i.cxx -LIB_SERVER_IDL = TypeData.idl MPIObject.idl MPIContainer.idl +LIB_SERVER_IDL = SALOME_MPIObject.idl SALOME_MPIContainer.idl # Executables targets BIN = SALOME_MPIContainer BIN_SRC = -BIN_SERVER_IDL = TypeData.idl MPIObject.idl MPIContainer.idl +BIN_SERVER_IDL = SALOME_MPIObject.idl SALOME_MPIContainer.idl -CXXFLAGS+=${MPICH_INCLUDES} -CXX_DEPEND_FLAG+=${MPICH_INCLUDES} -LDFLAGS+= -lSalomeContainer -lSalomeNS -lRegistry -lOpUtil ${MPICH_LIBS} +LDFLAGS+= -lSalomeContainer -lSalomeNS -lRegistry -lOpUtil -lSalomeNotification -lSALOMELocalTrace +ifeq (@WITHMPICH@,yes) + CXXFLAGS+=${MPICH_INCLUDES} + CXX_DEPEND_FLAG+=${MPICH_INCLUDES} + LDFLAGS+= ${MPICH_LIBS} +endif + +ifeq (@WITHMPI@,yes) + CXXFLAGS+=${MPI_INCLUDES} + CXX_DEPEND_FLAG+=${MPI_INCLUDES} + LDFLAGS+= ${MPI_LIBS} +endif @CONCLUDE@ diff --git a/src/MPIContainer/SALOME_MPIContainer.cxx b/src/MPIContainer/SALOME_MPIContainer.cxx index f11dbb26d..d6fb4474f 100644 --- a/src/MPIContainer/SALOME_MPIContainer.cxx +++ b/src/MPIContainer/SALOME_MPIContainer.cxx @@ -1,52 +1,31 @@ -// 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 : SALOME_MPIContainer.cxx -// Module : SALOME - -using namespace std; #include #include "MPIContainer_i.hxx" +#include "Utils_ORB_INIT.hxx" +#include "Utils_SINGLETON.hxx" #include "utilities.h" #include +using namespace std; int main(int argc, char* argv[]) { int nbproc, numproc; - MPIContainer_i * myContainer; + int flag; + Engines_MPIContainer_i * myContainer=NULL; BEGIN_OF(argv[0]) try { MESSAGE("Connection MPI"); - MPI_Init(&argc,&argv); MPI_Comm_size(MPI_COMM_WORLD,&nbproc); MPI_Comm_rank(MPI_COMM_WORLD,&numproc); - MESSAGE("Initialisation CORBA"); + MESSAGE("[" << numproc << "] Initialisation CORBA"); // Initialise the ORB. - CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); + // CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); + ORB_INIT &init = *SINGLETON_::Instance() ; + ASSERT(SINGLETON_::IsAlreadyExisting()) ; + CORBA::ORB_var &orb = init( argc , argv ) ; // Obtain a reference to the root POA. CORBA::Object_var obj = orb->resolve_initial_references("RootPOA"); @@ -86,35 +65,37 @@ int main(int argc, char* argv[]) containerName = argv[1] ; } - MESSAGE("Chargement container sur proc: " << numproc); - myContainer = new MPIContainer_i(nbproc,numproc,orb,factory_poa, containerName); - MESSAGE("Fin chargement container"); + MESSAGE("[" << numproc << "] Chargement container"); + myContainer = new Engines_MPIContainer_i(nbproc,numproc,orb,factory_poa, containerName,argc,argv); pman->activate(); orb->run(); orb->destroy(); - delete myContainer; - MPI_Finalize(); } - catch(CORBA::SystemException&) { - INFOS("Caught CORBA::SystemException.") + catch(CORBA::SystemException&){ + INFOS("Caught CORBA::SystemException."); } - catch(PortableServer::POA::WrongPolicy&) - { - INFOS("Caught CORBA::WrongPolicyException.") + catch(PortableServer::POA::WrongPolicy&){ + INFOS("Caught CORBA::WrongPolicyException."); } - catch(PortableServer::POA::ServantAlreadyActive&) - { - INFOS("Caught CORBA::ServantAlreadyActiveException") + catch(PortableServer::POA::ServantAlreadyActive&){ + INFOS("Caught CORBA::ServantAlreadyActiveException"); } - catch(CORBA::Exception&) { - INFOS("Caught CORBA::Exception.") + catch(CORBA::Exception&){ + INFOS("Caught CORBA::Exception."); } - catch(...) { - INFOS("Caught unknown exception.") - } + catch(...){ + INFOS("Caught unknown exception."); + } + + if(myContainer) + delete myContainer; + MPI_Initialized(&flag); + if(flag) + MPI_Finalize(); + END_OF(argv[0]); } diff --git a/src/MPILifeCycleCORBA/MPILifeCycleCORBA.py b/src/MPILifeCycleCORBA/MPILifeCycleCORBA.py new file mode 100644 index 000000000..eb255d862 --- /dev/null +++ b/src/MPILifeCycleCORBA/MPILifeCycleCORBA.py @@ -0,0 +1,142 @@ +#============================================================================== +# File : MPILifeCycleCORBA.py +# Created : ven may 30 08:42:01 CEST 2003 +# Author : Bernard SECHER, CEA +# Project : SALOME +# Copyright : CEA 2003 +# $Header$ +#============================================================================== + +from LifeCycleCORBA import * + +class MPILifeCycleCORBA(LifeCycleCORBA): + #------------------------------------------------------------------------- + + def __init__(self, orb): + MESSAGE( "MPILifeCycleCORBA::__init__" ) + LifeCycleCORBA.__init__(self, orb) + + #------------------------------------------------------------------------- + + def FindOrStartMPIContainer(self, theComputer , theMPIContainerRoot, nbproc ): + theMPIContainer = theMPIContainerRoot + "_" + str(nbproc) + MESSAGE( "FindOrStartMPIContainer" + theComputer + theMPIContainer ) + aMPIContainer = self.FindContainer( theComputer + "/" + theMPIContainer ) + if aMPIContainer is None : + if (theMPIContainerRoot == "MPIFactoryServer") | (theMPIContainerRoot == "MPIFactoryServerPy") : + if theComputer == os.getenv("HOSTNAME") : + rshstr = "" + else : + rshstr = "rsh -n " + theComputer + " " + path = self.ComputerPath( theComputer ) +## if path != "" : +## rshstr = rshstr + path + "/../bin/salome/" +## else : +## rshstr = rshstr + os.getenv( "KERNEL_ROOT_DIR" ) + "/bin/" +# rshstr = rshstr + os.getenv( "PWD" ) + "/" + if theMPIContainerRoot == "MPIFactoryServer" : + rshstr = rshstr + "mpirun -np " + str(nbproc) + " " + path + "SALOME_MPIContainer " + else : + rshstr = rshstr + path + "SALOME_MPIContainerPy.py '" + rshstr = rshstr + theMPIContainer + " -" + omniORBcfg = os.getenv( "OMNIORB_CONFIG" ) +# omniORBcfg = os.getenv( "HOME" ) + "/.omniORB.cfg" + file = os.open( omniORBcfg , os.O_RDONLY ) + ORBInitRef = os.read(file,132) + if ORBInitRef[len(ORBInitRef)-1] == '\n' : + ORBInitRef,bsn = ORBInitRef.split('\n') + os.close( file ) + rshstr = rshstr + ORBInitRef + if theMPIContainerRoot == "MPIFactoryServerPy" : + rshstr = rshstr + "'" + rshstr = rshstr + " > /tmp/" + theMPIContainer + "_" + rshstr = rshstr + theComputer + rshstr = rshstr + ".log 2>&1 &" + os.system( rshstr ) + MESSAGE( "FindOrStartMPIContainer" + rshstr + " done" ) + else : + if theMPIContainer.find('Py') == -1 : + aMPIContainer = self.FindContainer( theComputer + "/" + "MPIFactoryServer_" + str(nbproc) ) + else : + aMPIContainer = self.FindContainer( theComputer + "/" + "MPIFactoryServerPy_" + str(nbproc) ) + aMPIContainer = aMPIContainer.start_impl( theMPIContainer ) + + count = 21 + while aMPIContainer is None : + time.sleep(1) + count = count - 1 + MESSAGE( str(count) + ". Waiting for " + theComputer + "/" + theMPIContainer ) + aMPIContainer = self.FindContainer( theComputer + "/" + theMPIContainer ) + if count == 0 : + return aMPIContainer + + return aMPIContainer + #os.system("rsh -n dm2s0017 /export/home/SALOME_ROOT/bin/runSession SALOME_Container -ORBInitRef NameService=corbaname::dm2s0017:1515") + + #------------------------------------------------------------------------- + + def FindOrLoadMPIComponent(self, MPIcontainerName, MPIcomponentName, nbproc): + + theComputer,theMPIContainerRoot = self.ContainerName( MPIcontainerName ) + theMPIContainer = theMPIContainerRoot + "_" + str(nbproc) + name = [CosNaming.NameComponent(theComputer,"dir"), + CosNaming.NameComponent(theMPIContainer,"dir"), + CosNaming.NameComponent(MPIcomponentName,"object")] + try: + obj = self._containerRootContext.resolve(name) + except CosNaming.NamingContext.NotFound, ex: + MESSAGE( "component " + MPIcomponentName + " not found, trying to load" ) + MPIcontainer = self.FindContainer(theComputer + "/" + theMPIContainer) + if MPIcontainer is None: + MESSAGE( "MPIcontainer " + theComputer + "/" + theMPIContainer + " not found in Naming Service, trying to start" ) + if (theMPIContainerRoot != "MPIFactoryServer") & (theMPIContainerRoot != "MPIFactoryServerPy") : + if theMPIContainer.find('Py') == -1 : + theMPIFactorycontainerRoot = "MPIFactoryServer" + theMPIFactorycontainer = theMPIFactorycontainerRoot + "_" + str(nbproc) + else : + theMPIFactorycontainerRoot = "MPIFactoryServerPy" + theMPIFactorycontainer = theMPIFactorycontainerRoot + "_" + str(nbproc) + MPIFactorycontainer = self.FindContainer(theComputer + "/" + theMPIFactorycontainer) + if MPIFactorycontainer is None: + MESSAGE( "MPIcontainer " + theComputer + "/" + theMPIFactorycontainer + " not found in Naming Service, trying to start" ) + MPIFactorycontainer = self.FindOrStartMPIContainer(theComputer,theMPIFactorycontainerRoot,nbproc) + else: + MPIFactorycontainer = self.FindOrStartMPIContainer(theComputer,theMPIContainerRoot,nbproc) + if MPIFactorycontainer != None : + MPIcontainer = self.FindOrStartMPIContainer(theComputer,theMPIContainerRoot,nbproc) + + if MPIcontainer != None: + compoinfo = self._catalog.GetComponent(MPIcomponentName) + if compoinfo is None: + MESSAGE( "MPIcomponent " + MPIcomponentName + " not found in Module Catalog" ) + else: + try: + machineName = theComputer + path = compoinfo.GetPathPrefix(machineName) + "/" + except SALOME_ModuleCatalog.NotFound, ex: + MESSAGE( "machine " + machineName + " not found in Module Catalog" ) + MESSAGE( "trying localhost" ) + try: + path = compoinfo.GetPathPrefix("localhost") + "/" + except SALOME_ModuleCatalog.NotFound, ex: + path = "" + implementation = path + "lib" + MPIcomponentName + "Engine.so" + MESSAGE( "Trying to load " + implementation ) + try: + MPIcomponent = MPIcontainer.load_impl(MPIcomponentName, implementation) + MESSAGE( "component " + MPIcomponent._get_instanceName() + " launched !" ) + return MPIcomponent + except: + MESSAGE( "component " + MPIcomponentName + " NOT launched !" ) + + else: + try: + MPIcomponent = obj._narrow(Engines.Component) + if MPIcomponent is None: + MESSAGE( MPIcomponentName + " is not a component !" ) + else: + MESSAGE( "MPIcomponent " + MPIcomponent._get_instanceName() + " found !" ) + return MPIcomponent + except: + MESSAGE( MPIcomponentName + " failure" ) + return None diff --git a/src/MPILifeCycleCORBA/MPIsalome.py b/src/MPILifeCycleCORBA/MPIsalome.py new file mode 100644 index 000000000..789641fd1 --- /dev/null +++ b/src/MPILifeCycleCORBA/MPIsalome.py @@ -0,0 +1,5 @@ +import salome +from MPILifeCycleCORBA import * + +# create an LifeCycleCORBA instance +lcc = MPILifeCycleCORBA(salome.orb) diff --git a/src/MPILifeCycleCORBA/Makefile.in b/src/MPILifeCycleCORBA/Makefile.in new file mode 100644 index 000000000..ab76b0360 --- /dev/null +++ b/src/MPILifeCycleCORBA/Makefile.in @@ -0,0 +1,38 @@ +#============================================================================== +# File : Makefile.in +# Created : lun jui 2 20:32:24 CEST 2001 +# Author : Paul RASCLE, EDF - Marc Tajchman, CEA +# Project : SALOME +# Copyright : EDF 2001 +# $Header$ +#============================================================================== + +# source path +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@:@top_srcdir@/idl + + +@COMMENCE@ + +EXPORT_HEADERS = SALOME_MPILifeCycleCORBA.hxx + +EXPORT_PYSCRIPTS = MPIsalome.py MPILifeCycleCORBA.py + +# Libraries targets + +LIB = libSalomeMPILifeCycleCORBA.la +LIB_SRC = SALOME_MPILifeCycleCORBA.cxx +LIB_CLIENT_IDL = SALOME_MPIObject.idl SALOME_MPIContainer.idl \ + SALOME_Component.idl SALOME_ModuleCatalog.idl + +# Executables targets +BIN = TestMPILifeCycleCORBA +BIN_SRC = +BIN_CLIENT_IDL = Logger.idl SALOME_MPIObject.idl SALOME_MPIContainer.idl SALOME_TestMPIComponent.idl + +LDFLAGS += -lSalomeNS -lSalomeLifeCycleCORBA -lOpUtil -lSALOMELocalTrace + +@CONCLUDE@ + diff --git a/src/MPILifeCycleCORBA/SALOME_MPILifeCycleCORBA.cxx b/src/MPILifeCycleCORBA/SALOME_MPILifeCycleCORBA.cxx new file mode 100644 index 000000000..cfa9f4c77 --- /dev/null +++ b/src/MPILifeCycleCORBA/SALOME_MPILifeCycleCORBA.cxx @@ -0,0 +1,357 @@ +//============================================================================= +// File : SALOME_MPILifeCycleCORBA.cxx +// Created : mar jui 03 14:55:50 CEST 2003 +// Author : Bernard SECHER CEA +// Project : SALOME +// Copyright : CEA 2003 +// $Header$ +//============================================================================= + +#include +#include +#include +#include +#include +#include + +#include "OpUtil.hxx" +#include "utilities.h" + +#include + +#include "SALOME_MPILifeCycleCORBA.hxx" +#include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog) +#include "SALOME_NamingService.hxx" +using namespace std; + +SALOME_MPILifeCycleCORBA::SALOME_MPILifeCycleCORBA() : + SALOME_LifeCycleCORBA() +{ + _MPIFactoryServer = NULL; +} + +SALOME_MPILifeCycleCORBA::SALOME_MPILifeCycleCORBA(SALOME_NamingService *ns) : + SALOME_LifeCycleCORBA(ns) +{ + _MPIFactoryServer = NULL; +} + +SALOME_MPILifeCycleCORBA::~SALOME_MPILifeCycleCORBA() +{ +} + +Engines::MPIContainer_var SALOME_MPILifeCycleCORBA::FindOrStartMPIContainer( + const string theComputer , + const string theMPIContainerRoot, + const int nbproc) +{ + char nbp[1024]; + + sprintf(nbp,"_%d",nbproc); + string theMPIContainer = theMPIContainerRoot + nbp; + string aComputerContainer = theComputer + "/" + theMPIContainer; + + SCRUTE( aComputerContainer ) ; + SCRUTE( theComputer ) ; + SCRUTE( theMPIContainer ) ; + + // On recherche si le containe rest deja lance + Engines::MPIContainer_var aMPIContainer = Engines::MPIContainer::_narrow(FindContainer(aComputerContainer.c_str())); + + //On a trouve le container: on renvoie une poigne dessus + if ( !CORBA::is_nil( aMPIContainer ) ) { + MESSAGE("MPIContainer " << aComputerContainer << " found!!!"); + return aMPIContainer ; + } + // On a pas trouve le container + else { + MESSAGE("MPIContainer " << aComputerContainer << " not found!!!"); + // On recherche un container generique + bool pyCont = false ; + int len = theMPIContainer.length() ; + if ( !strcmp( &theMPIContainerRoot.c_str()[len-2] , "Py" ) ) { + pyCont = true ; + } + string MPIFactoryServer = theComputer ; + if ( pyCont ) { + MPIFactoryServer += "/MPIFactoryServerPy" ; + } + else { + MPIFactoryServer += "/MPIFactoryServer" ; + } + MPIFactoryServer += nbp; + Engines::MPIContainer_var aMPIFactoryServer = Engines::MPIContainer::_narrow(FindContainer( MPIFactoryServer.c_str())); + + // On n'a pas trouve le container generique: on lance le container demande + if ( CORBA::is_nil( aMPIFactoryServer ) ) { +// rsh -n ikkyo /export/home/rahuel/SALOME_ROOT/bin/runSession SALOME_Container -ORBInitRef NameService=corbaname::dm2s0017:1515 & + string rsh( "" ) ; + if ( theComputer!= GetHostname() ) { + rsh += "rsh -n " ; + rsh += theComputer ; + rsh += " " ; + } + string path = ComputerPath( theComputer.c_str() ) ; + SCRUTE( path ) ; + // rsh += "runSession " ; + if ( pyCont ) { + MESSAGE("MPI python container not implemented"); + return Engines::MPIContainer::_nil(); +// rsh += "SALOME_MPIContainerPy.py " ; +// rsh += "MPIFactoryServerPy -" ; + } + else { + sprintf(nbp,"mpirun -np %d %sSALOME_MPIContainer ",nbproc,path.c_str()); + rsh += nbp; + rsh += theMPIContainer +" -" ; + } + string omniORBcfg( getenv( "OMNIORB_CONFIG" ) ) ; + ifstream omniORBfile( omniORBcfg.c_str() ) ; + char ORBInitRef[12] ; + char nameservice[132] ; + omniORBfile >> ORBInitRef ; + rsh += ORBInitRef ; + rsh += " " ; + omniORBfile >> nameservice ; + omniORBfile.close() ; + char * bsn = strchr( nameservice , '\n' ) ; + if ( bsn ) { + bsn[ 0 ] = '\0' ; + } + rsh += nameservice ; + if ( pyCont ) { + rsh += " > /tmp/MPIFactoryServerPy_" ; + } + else { + rsh += " > /tmp/MPIFactoryServer_" ; + } + sprintf(nbp,"%d_",nbproc); + rsh += nbp; + rsh += theComputer ; + rsh += ".log 2>&1 &" ; + SCRUTE( rsh ); + int status = system( rsh.c_str() ) ; + if (status == -1) { + INFOS("SALOME_MPILifeCycleCORBA::FindOrStartMPIContainer rsh failed (system command status -1)") ; + } + else if (status == 217) { + INFOS("SALOME_MPILifeCycleCORBA::FindOrStartContainer rsh failed (system command status 217)") ; + } + else { + int count = 21 ; + while ( CORBA::is_nil( aMPIFactoryServer ) && count ) { + sleep( 1 ) ; + count-- ; + if ( count != 10 ) + MESSAGE( count << ". Waiting for FactoryServer on " << theComputer) + aMPIFactoryServer = Engines::MPIContainer::_narrow(FindContainer( MPIFactoryServer.c_str())); + } + if ( CORBA::is_nil( aMPIFactoryServer ) ) { + INFOS("SALOME_MPILifeCycleCORBA::FindOrStartMPIContainer rsh failed") ; + } + else if ( strcmp( theComputer.c_str() , GetHostname().c_str() ) ) { + _MPIFactoryServer = aMPIFactoryServer ; + } + } + } + // On a trouve le container generique distant: on se sert de lui + // pour lancer un nouveau container MPI + // a revoir... + if ( !CORBA::is_nil( aMPIFactoryServer ) ) { + if ( strcmp( theMPIContainer.c_str() , "MPIFactoryServer" ) || + strcmp( theMPIContainer.c_str() , "MPIFactoryServerPy" ) ) { + MESSAGE("MPI Container not found ! trying to start " << aComputerContainer); + Engines::MPIContainer_var myMPIContainer = aMPIFactoryServer->start_MPIimpl( theMPIContainer.c_str(), nbproc ) ; + if ( !CORBA::is_nil( myMPIContainer ) ) { + MESSAGE("MPIContainer " << aComputerContainer << " started"); + return myMPIContainer ; + } + else { + MESSAGE("MPIContainer " << aComputerContainer << " NOT started"); + } + } + else { + MESSAGE("MPIContainer " << aComputerContainer << " started"); + return aMPIFactoryServer ; + } + } + } + return Engines::MPIContainer::_nil(); +} + +// Engines::Component_var SALOME_MPILifeCycleCORBA::FindOrLoad_MPIComponent +// (const char *MPIcontainerName, +// const char *MPIcomponentName, +// const char *implementation, +// const int nbproc) +// { +// BEGIN_OF("FindOrLoad_MPIComponent(1)"); +// ASSERT(_NS != NULL); +// string theComputer ; +// string theMPIContainer ; +// string theComputerContainer = ContainerName( MPIcontainerName , +// &theComputer , +// &theMPIContainer ) ; +// Engines::MPIContainer_var cont = FindOrStartMPIContainer( theComputerContainer , +// theComputer , +// theMPIContainer, +// nbproc) ; +// // ASSERT(!CORBA::is_nil(cont)); + +// string path( theComputerContainer ); +// path = path + "/"; +// path = path + MPIcomponentName; +// SCRUTE(path); +// try +// { +// CORBA::Object_var obj = _NS->Resolve(path.c_str()); +// if (CORBA::is_nil(obj)) +// { +// MESSAGE("MPIComponent not found ! trying to load " << path); +// Engines::Component_var compo +// = cont->load_impl(MPIcomponentName, implementation); +// // ASSERT(!CORBA::is_nil(compo)); +// MESSAGE("MPIComponent launched !" << path); +// return compo; +// } +// else +// { +// MESSAGE("MPIComponent found !" << path); +// Engines::Component_var compo = Engines::Component::_narrow(obj); +// // ASSERT(!CORBA::is_nil(compo)); +// try +// { +// compo->ping(); +// } +// catch (CORBA::COMM_FAILURE&) +// { +// INFOS("Caught CORBA::SystemException CommFailure. Engine " +// << path << "does not respond" ); +// } +// return compo; +// } +// } +// catch (ServiceUnreachable&) +// { +// INFOS("Caught exception: Naming Service Unreachable"); +// } +// catch (...) +// { +// INFOS("Caught unknown exception."); +// } +// return Engines::Component::_nil(); +// } + +Engines::Component_var SALOME_MPILifeCycleCORBA::FindOrLoad_MPIComponent + (const char *MPIcontainerName, + const char *MPIcomponentName, + const int nbproc) +{ + + char nbp[1024]; + + sprintf(nbp,"_%d",nbproc); +// BEGIN_OF("FindOrLoad_Component(2)"); + ASSERT(_NS != NULL); + string theComputer ; + string theMPIContainerRoot ; + string theMPIContainer; + string theComputerContainer = ContainerName( MPIcontainerName , + &theComputer , + &theMPIContainerRoot ) ; + theMPIContainer = theMPIContainerRoot + nbp; + Engines::MPIContainer_var cont = FindOrStartMPIContainer( theComputer , + theMPIContainerRoot, + nbproc ) ; + + if ( CORBA::is_nil( cont ) ) { + MESSAGE("MPIContainer not found ! " << theComputerContainer ); + return Engines::Component::_nil(); + } + +// char * machine = cont->machineName() ; + const char * machine = theComputer.c_str() ; + + string path( theComputerContainer ); + path += nbp; + path += "/"; + path += MPIcomponentName; + SCRUTE(path); + + try { + CORBA::Object_var obj = _NS->Resolve(path.c_str()); + if ( CORBA::is_nil( obj ) ) { + MESSAGE("MPIComponent not found ! trying to load " << path); + CORBA::Object_var obj2 = _NS->Resolve("/Kernel/ModulCatalog"); + SALOME_ModuleCatalog::ModuleCatalog_var Catalog = + SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj2); + + SALOME_ModuleCatalog::Acomponent_ptr compoInfo = + Catalog->GetComponent(MPIcomponentName); + if (CORBA::is_nil (compoInfo)) + { + INFOS("Catalog Error : Component not found in the catalog") + return Engines::Component::_nil(); +// exit (-1); + } + + string path; + try + { + path = compoInfo->GetPathPrefix( machine ) ; + path += "/" ; + } + catch (SALOME_ModuleCatalog::NotFound&) + { + MESSAGE("GetPathPrefix(" << machine << ") not found!" + << "trying localhost"); + try { + path = compoInfo->GetPathPrefix("localhost") ; + path += "/" ; + } + catch (SALOME_ModuleCatalog::NotFound&) { + MESSAGE("GetPathPrefix(localhost) not found!") ; + path = "" ; + } + } + + SCRUTE(path); + string implementation(path); + implementation += "lib"; + implementation += MPIcomponentName; + implementation += "Engine.so"; + + Engines::Component_var compo + = cont->load_impl(MPIcomponentName, implementation.c_str()); + +// ASSERT(!CORBA::is_nil(compo)); +// MESSAGE("Component launched !" << path); + return compo; + } + else + { + MESSAGE("MPIComponent found !" << path); + Engines::Component_var compo = Engines::Component::_narrow(obj); + // ASSERT(!CORBA::is_nil(compo)); + try + { + string instanceName = compo->instanceName(); + } + catch (CORBA::COMM_FAILURE&) + { + INFOS("Caught CORBA::SystemException CommFailure. Engine " + << path << "does not respond" ); + } + return compo; + } + } + catch (ServiceUnreachable&) + { + INFOS("Caught exception: Naming Service Unreachable"); + } + catch (...) + { + INFOS("Caught unknown exception."); + } + return Engines::Component::_nil(); +} diff --git a/src/MPILifeCycleCORBA/SALOME_MPILifeCycleCORBA.hxx b/src/MPILifeCycleCORBA/SALOME_MPILifeCycleCORBA.hxx new file mode 100644 index 000000000..dfac11034 --- /dev/null +++ b/src/MPILifeCycleCORBA/SALOME_MPILifeCycleCORBA.hxx @@ -0,0 +1,45 @@ +//============================================================================= +// File : SALOME_MPILifeCycleCORBA.hxx +// Created : mar jui 03 14:55:45 CEST 2003 +// Author : Bernard SECHER, CEA +// Project : SALOME +// Copyright : CEA 2003 +// $Header$ +//============================================================================= + +#ifndef _SALOME_MPILIFECYCLECORBA_HXX_ +#define _SALOME_MPILIFECYCLECORBA_HXX_ + +#include +#include +#include + +#include +#include CORBA_CLIENT_HEADER(SALOME_MPIContainer) +#include "SALOME_LifeCycleCORBA.hxx" + +class SALOME_MPILifeCycleCORBA : public SALOME_LifeCycleCORBA +{ +public: + SALOME_MPILifeCycleCORBA(); + SALOME_MPILifeCycleCORBA(SALOME_NamingService *ns); + virtual ~SALOME_MPILifeCycleCORBA(); + +// Engines::Component_var FindOrLoad_MPIComponent(const char *MPIcontainerName, +// const char *MPIcomponentName, +// const char *implementationPath, +// const int nbproc); + Engines::Component_var FindOrLoad_MPIComponent(const char *MPIcontainerName, + const char *MPIcomponentName, + const int nbproc); +protected: + Engines::MPIContainer_var _MPIFactoryServer ; + +private: + Engines::MPIContainer_var FindOrStartMPIContainer(const string theComputer , + const string theMPIContainerRoot, + const int nbproc) ; + +} ; + +#endif diff --git a/src/MPILifeCycleCORBA/TestMPILifeCycleCORBA.cxx b/src/MPILifeCycleCORBA/TestMPILifeCycleCORBA.cxx new file mode 100644 index 000000000..9e2c5c160 --- /dev/null +++ b/src/MPILifeCycleCORBA/TestMPILifeCycleCORBA.cxx @@ -0,0 +1,69 @@ +// using namespace std; +//============================================================================= +// File : TestMPILifeCycleCORBA.cxx +// Created : mer jui 4 13:11:27 CEST 2003 +// Author : Bernard SECHER, 2003 +// Project : SALOME +// Copyright : CEA 2003 +// $Header$ +//============================================================================= + +#include "utilities.h" +#include +#include +#include +#include +#include CORBA_CLIENT_HEADER(SALOME_MPIContainer) +#include CORBA_CLIENT_HEADER(SALOME_TestMPIComponent) + +# include "Utils_ORB_INIT.hxx" +# include "Utils_SINGLETON.hxx" +#include "SALOME_NamingService.hxx" +#include "SALOME_MPILifeCycleCORBA.hxx" +#include "OpUtil.hxx" + +int main (int argc, char * argv[]) +{ + + try{ + // Initializing omniORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); + + // Obtain a reference to the root POA + CORBA::Object_var obj = orb->resolve_initial_references("RootPOA") ; + PortableServer::POA_var poa = PortableServer::POA::_narrow(obj) ; + + // Use Name Service to find container + SALOME_NamingService NS(orb); + + SALOME_MPILifeCycleCORBA LCC(&NS); + + Engines::Component_var comp = LCC.FindOrLoad_MPIComponent("MPIFactoryServer","TestMPIComponent",2); + + Engines::TestMPIComponent_var m1 = Engines::TestMPIComponent::_narrow(comp); + if(CORBA::is_nil(m1)){ + INFOS("echec recuperation poignee composant"); + } + else{ + + INFOS("Lancement de coucou"); + m1->Coucou(1L); + } + + orb->destroy(); + } + catch(CORBA::COMM_FAILURE& ex) { + INFOS("Caught system exception COMM_FAILURE -- unable to contact the object."); + } + catch(CORBA::SystemException&) { + INFOS("Caught a CORBA::SystemException."); + } + catch(CORBA::Exception&) { + INFOS("Caught CORBA::Exception."); + } + catch(...) { + INFOS("Caught unknown exception."); + } + + return 0; +} diff --git a/src/MSG2QM/msg2qm.cxx b/src/MSG2QM/msg2qm.cxx index 097947db2..5322a33fc 100644 --- a/src/MSG2QM/msg2qm.cxx +++ b/src/MSG2QM/msg2qm.cxx @@ -24,7 +24,6 @@ // File : msg2qm.cxx // Module : SALOME -using namespace std; /**************************************************************************** ** $Id$ ** @@ -42,6 +41,7 @@ using namespace std; #include #include +using namespace std; static QString* defaultScope = 0; diff --git a/src/Makefile.in b/src/Makefile.in index f35650e42..47a5d356e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -44,8 +44,12 @@ SUBDIRS = MSG2QM SALOMELocalTrace Logger SALOMELogger Utils PatchQt \ Session SALOME_SWIG TOOLSGUI SALOME_PY \ RegistryDisplay ModuleGenerator SALOME_PYQT Loader +ifeq (@WITHMPI@,yes) + SUBDIRS+= MPIContainer MPILifeCycleCORBA TestMPIContainer +endif + ifeq (@WITHMPICH@,yes) - SUBDIRS+= MPIContainer + SUBDIRS+= MPIContainer MPILifeCycleCORBA TestMPIContainer endif @MODULE@ diff --git a/src/ModuleCatalog/Makefile.in b/src/ModuleCatalog/Makefile.in index 97a1d9816..475f86e06 100644 --- a/src/ModuleCatalog/Makefile.in +++ b/src/ModuleCatalog/Makefile.in @@ -56,7 +56,7 @@ BIN_SRC = BIN_SERVER_IDL = SALOME_ModuleCatalog.idl CPPFLAGS+= $(QT_MT_INCLUDES) -CXXFLAGS+= -ftemplate-depth-42 +CXXFLAGS+= @CXXTMPDPTHFLAGS@ LDFLAGS+= $(QT_MT_LIBS) -lSalomeNS -lOpUtil -lSALOMELocalTrace @CONCLUDE@ diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.cxx index 35e5c2e3e..034014eee 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.cxx @@ -26,8 +26,8 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOME_ModuleCatalog_Acomponent_impl.hxx" +using namespace std; //---------------------------------------------------------------------- // Function : SALOME_ModuleCatalog_AcomponentImpl diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx index c590b4b10..e930301d1 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx @@ -24,7 +24,6 @@ // File : SALOME_ModuleCatalog_Client.cxx // Module : SALOME -using namespace std; /* $Header$ */ #include @@ -32,6 +31,7 @@ using namespace std; #include "SALOME_ModuleCatalog.hh" #include #include "utilities.h" +using namespace std; int main(int argc,char **argv) { diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx index 8f8f0e241..878828358 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; #define WRITE_CATA_COMPONENT #include "SALOME_ModuleCatalog_Handler.hxx" +using namespace std; //---------------------------------------------------------------------- // Function : SALOME_ModuleCatalog_Handler diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx index c206cc846..d777b1128 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx @@ -25,8 +25,7 @@ // Module : SALOME /* $Header$ */ - -#include +#include #include "SALOME_NamingService.hxx" #include "SALOME_ModuleCatalog_impl.hxx" #include "utilities.h" diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx index 9f912a7d3..8598599ed 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx @@ -26,13 +26,13 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOME_ModuleCatalog_impl.hxx" #include "SALOME_ModuleCatalog_Acomponent_impl.hxx" #include #include #include +using namespace std; static const char* SEPARATOR = ":"; diff --git a/src/NOTIFICATION_SWIG/NOTIFICATION_Swig.cxx b/src/NOTIFICATION_SWIG/NOTIFICATION_Swig.cxx index 6e36d52a9..40bc4a12a 100644 --- a/src/NOTIFICATION_SWIG/NOTIFICATION_Swig.cxx +++ b/src/NOTIFICATION_SWIG/NOTIFICATION_Swig.cxx @@ -25,8 +25,8 @@ // Author : Francis KLOSS // Module : SALOME -using namespace std; #include "NOTIFICATION_Swig.hxx" +using namespace std; // Swig notification supplier // -------------------------- diff --git a/src/NOTIFICATION_SWIG/NOTIFICATION_Swig.hxx b/src/NOTIFICATION_SWIG/NOTIFICATION_Swig.hxx index f2361808c..746f8e9ec 100644 --- a/src/NOTIFICATION_SWIG/NOTIFICATION_Swig.hxx +++ b/src/NOTIFICATION_SWIG/NOTIFICATION_Swig.hxx @@ -25,8 +25,8 @@ // Author : Francis KLOSS // Module : SALOME -using namespace std; #include "NOTIFICATION.hxx" +using namespace std; class NOTIFICATION_Supplier_Swig { public: diff --git a/src/NamingService/SALOME_NamingService.cxx b/src/NamingService/SALOME_NamingService.cxx index c4865c196..6c71e5f49 100644 --- a/src/NamingService/SALOME_NamingService.cxx +++ b/src/NamingService/SALOME_NamingService.cxx @@ -26,11 +26,11 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOME_NamingService.hxx" #include "ServiceUnreachable.hxx" #include #include +using namespace std; //---------------------------------------------------------------------- /*! Function : SALOME_NamingService diff --git a/src/NamingService/ServiceUnreachable.cxx b/src/NamingService/ServiceUnreachable.cxx index 4b03e8d16..607c64710 100644 --- a/src/NamingService/ServiceUnreachable.cxx +++ b/src/NamingService/ServiceUnreachable.cxx @@ -24,7 +24,6 @@ // File : ServiceUnreachable.cxx // Module : SALOME -using namespace std; #include "ServiceUnreachable.hxx" ServiceUnreachable::ServiceUnreachable( void ): SALOME_Exception( "ServiceUnreachable" ) diff --git a/src/Notification/NOTIFICATION.cxx b/src/Notification/NOTIFICATION.cxx index 1058d706e..bbbb92294 100644 --- a/src/Notification/NOTIFICATION.cxx +++ b/src/Notification/NOTIFICATION.cxx @@ -25,12 +25,11 @@ // Author : Laurent DADA / Francis KLOSS // Module : SALOME -using namespace std; #include "NOTIFICATION.hxx" -using namespace std; #include "Utils_ORB_INIT.hxx" #include "Utils_SINGLETON.hxx" +using namespace std; CosNA_EventChannel_ptr NOTIFICATION_channel() { ORB_INIT& init = *SINGLETON_::Instance(); ASSERT(SINGLETON_::IsAlreadyExisting()); diff --git a/src/Notification/NOTIFICATION_Consumer.cxx b/src/Notification/NOTIFICATION_Consumer.cxx index 809d328ec..e502a01d0 100644 --- a/src/Notification/NOTIFICATION_Consumer.cxx +++ b/src/Notification/NOTIFICATION_Consumer.cxx @@ -25,8 +25,8 @@ // Author : Laurent DADA / Francis KLOSS // Module : SALOME -using namespace std; #include "NOTIFICATION.hxx" +using namespace std; NOTIFICATION_Consumer::NOTIFICATION_Consumer(): proxy_supplier(0), diff --git a/src/Notification/NOTIFICATION_Supplier.cxx b/src/Notification/NOTIFICATION_Supplier.cxx index b572539a4..83d3787a6 100644 --- a/src/Notification/NOTIFICATION_Supplier.cxx +++ b/src/Notification/NOTIFICATION_Supplier.cxx @@ -25,8 +25,8 @@ // Author : Laurent DADA / Francis KLOSS // Module : SALOME -using namespace std; #include "NOTIFICATION.hxx" +using namespace std; long NOTIFICATION_Supplier::_stamp = 0; diff --git a/src/OBJECT/SALOME_AISObject.cxx b/src/OBJECT/SALOME_AISObject.cxx index 2d34b31a2..46abdd1d6 100644 --- a/src/OBJECT/SALOME_AISObject.cxx +++ b/src/OBJECT/SALOME_AISObject.cxx @@ -26,5 +26,5 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOME_AISObject.ixx" +using namespace std; diff --git a/src/OBJECT/SALOME_AISShape.cxx b/src/OBJECT/SALOME_AISShape.cxx index 117738ffa..b439aef2b 100644 --- a/src/OBJECT/SALOME_AISShape.cxx +++ b/src/OBJECT/SALOME_AISShape.cxx @@ -26,8 +26,8 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOME_AISShape.ixx" +using namespace std; SALOME_AISShape::SALOME_AISShape(const TopoDS_Shape& shape): AIS_Shape(shape) { } diff --git a/src/OBJECT/SALOME_Actor.h b/src/OBJECT/SALOME_Actor.h index 03758fee9..492c4e6a8 100644 --- a/src/OBJECT/SALOME_Actor.h +++ b/src/OBJECT/SALOME_Actor.h @@ -35,7 +35,7 @@ #ifndef _Handle_SALOME_InteractiveObject_HeaderFile #include "Handle_SALOME_InteractiveObject.hxx" #endif -#include +#include class SALOME_Transform; class SALOME_TransformFilter; diff --git a/src/OBJECT/SALOME_InteractiveObject.cxx b/src/OBJECT/SALOME_InteractiveObject.cxx index 36a977af6..c361fca8f 100644 --- a/src/OBJECT/SALOME_InteractiveObject.cxx +++ b/src/OBJECT/SALOME_InteractiveObject.cxx @@ -26,13 +26,13 @@ // Module : SALOME // $Header$ -using namespace std; /*! \class SALOME_InteractiveObject SALOME_InteractiveObject.hxx \brief ... */ #include "SALOME_InteractiveObject.ixx" +using namespace std; SALOME_InteractiveObject::SALOME_InteractiveObject() { diff --git a/src/OCCViewer/OCCViewer.cxx b/src/OCCViewer/OCCViewer.cxx index d98bb2b1f..70a92624c 100644 --- a/src/OCCViewer/OCCViewer.cxx +++ b/src/OCCViewer/OCCViewer.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; #include "OCCViewer.h" #include "OCCViewer_ViewFrame.h" +using namespace std; QAD_ViewFrame* OCCViewer::createView(QAD_RightFrame* parent) { diff --git a/src/OCCViewer/OCCViewer_AISSelector.cxx b/src/OCCViewer/OCCViewer_AISSelector.cxx index 6310f51c6..0b95ac18d 100644 --- a/src/OCCViewer/OCCViewer_AISSelector.cxx +++ b/src/OCCViewer/OCCViewer_AISSelector.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; /*! \class OCCViewer_AISSelector OCCViewer_AISSelector.h \brief Selector for AIS interactive context. @@ -35,6 +34,7 @@ using namespace std; */ #include "OCCViewer_AISSelector.h" +using namespace std; /*! Constructor diff --git a/src/OCCViewer/OCCViewer_Selector.cxx b/src/OCCViewer/OCCViewer_Selector.cxx index e037b6b35..41df5163a 100644 --- a/src/OCCViewer/OCCViewer_Selector.cxx +++ b/src/OCCViewer/OCCViewer_Selector.cxx @@ -26,13 +26,13 @@ // Module : SALOME // $Header$ -using namespace std; /*! \class OCCViewer_Selector OCCViewer_Selector.h \brief Base class for object selection in Open CASCADE Viewer. */ #include "OCCViewer_Selector.h" +using namespace std; /*! Constructor diff --git a/src/OCCViewer/OCCViewer_VService.cxx b/src/OCCViewer/OCCViewer_VService.cxx index e0ed072a6..eca0fbbb8 100644 --- a/src/OCCViewer/OCCViewer_VService.cxx +++ b/src/OCCViewer/OCCViewer_VService.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "OCCViewer_VService.h" // Open CASCADE Includes @@ -51,6 +50,7 @@ using namespace std; #include #include #endif +using namespace std; // For 2d #define LOPTIM diff --git a/src/OCCViewer/OCCViewer_ViewFrame.cxx b/src/OCCViewer/OCCViewer_ViewFrame.cxx index 2ddc4325f..2da9e1475 100644 --- a/src/OCCViewer/OCCViewer_ViewFrame.cxx +++ b/src/OCCViewer/OCCViewer_ViewFrame.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "OCCViewer_ViewFrame.h" #include "OCCViewer_Viewer3d.h" #include "OCCViewer_ViewPort.h" @@ -52,6 +51,7 @@ using namespace std; #include #include #include +using namespace std; /*! Constructor diff --git a/src/OCCViewer/OCCViewer_ViewPort.cxx b/src/OCCViewer/OCCViewer_ViewPort.cxx index 1d6d410ba..69b061812 100644 --- a/src/OCCViewer/OCCViewer_ViewPort.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include #if !defined WNT @@ -52,6 +51,7 @@ using namespace std; #include #include +using namespace std; /* XPM */ const char* imageZoomCursor[] = { diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.cxx b/src/OCCViewer/OCCViewer_ViewPort3d.cxx index 88601ea0b..6a5d747a8 100644 --- a/src/OCCViewer/OCCViewer_ViewPort3d.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort3d.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "OCCViewer_ViewPort3d.h" #include "QAD.h" @@ -46,6 +45,7 @@ using namespace std; #if !defined WNT #include #endif +using namespace std; /*! Constructor diff --git a/src/OCCViewer/OCCViewer_Viewer3d.cxx b/src/OCCViewer/OCCViewer_Viewer3d.cxx index 8d4a1331a..ffe52f775 100644 --- a/src/OCCViewer/OCCViewer_Viewer3d.cxx +++ b/src/OCCViewer/OCCViewer_Viewer3d.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; /*! \class OCCViewer_Viewer3d OCCViewer_Viewer3d.h \brief Open CASCADE Viewer 3D with viewport 3D and selection. @@ -56,6 +55,7 @@ using namespace std; #include #include #include +using namespace std; /*! Constructor diff --git a/src/PatchQt/qsplitterP.cxx b/src/PatchQt/qsplitterP.cxx index 4b8268af9..f44990ee3 100644 --- a/src/PatchQt/qsplitterP.cxx +++ b/src/PatchQt/qsplitterP.cxx @@ -24,7 +24,6 @@ // File : qsplitterP.cxx // Module : SALOME -using namespace std; /**************************************************************************** ** $Id$ ** @@ -80,6 +79,7 @@ using namespace std; #include #include //sendPostedEvents +using namespace std; #define SPLITTER_ICON_WIDTH 10 #define SPLITTER_ICON_HEIGHT 12 diff --git a/src/PatchQt/qworkspaceP.cxx b/src/PatchQt/qworkspaceP.cxx index 0d4d618f7..483149bb6 100644 --- a/src/PatchQt/qworkspaceP.cxx +++ b/src/PatchQt/qworkspaceP.cxx @@ -9,7 +9,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "qworkspaceP.h" #include @@ -41,6 +40,7 @@ using namespace std; #include #include +using namespace std; #define BUTTON_WIDTH 16 #define BUTTON_HEIGHT 14 diff --git a/src/Plot2d/Plot2d_Curve.cxx b/src/Plot2d/Plot2d_Curve.cxx index 8d15c56ae..e32f477e0 100644 --- a/src/Plot2d/Plot2d_Curve.cxx +++ b/src/Plot2d/Plot2d_Curve.cxx @@ -7,9 +7,9 @@ // Module : SALOME // $Header$ -using namespace std; #include "Plot2d_Curve.h" #include "utilities.h" +using namespace std; /*! Constructor diff --git a/src/Plot2d/Plot2d_CurveContainer.cxx b/src/Plot2d/Plot2d_CurveContainer.cxx index f55104645..f9021db1e 100644 --- a/src/Plot2d/Plot2d_CurveContainer.cxx +++ b/src/Plot2d/Plot2d_CurveContainer.cxx @@ -7,8 +7,8 @@ // Module : SALOME // $Header$ -using namespace std; #include "Plot2d_CurveContainer.h" +using namespace std; /*! Constructor diff --git a/src/Registry/RegistryConnexion.cxx b/src/Registry/RegistryConnexion.cxx index e11f5a221..018ea5fbf 100644 --- a/src/Registry/RegistryConnexion.cxx +++ b/src/Registry/RegistryConnexion.cxx @@ -26,8 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; -using namespace std; # include "Utils_ORB_INIT.hxx" # include "RegistryConnexion.hxx" # include "SALOME_NamingService.hxx" diff --git a/src/Registry/RegistryService.cxx b/src/Registry/RegistryService.cxx index 94dfa3034..018d9cb87 100644 --- a/src/Registry/RegistryService.cxx +++ b/src/Registry/RegistryService.cxx @@ -26,11 +26,10 @@ // Module : SALOME // $Header$ -using namespace std; -using namespace std; # include "RegistryService.hxx" # include "OpUtil.hxx" # include "utilities.h" +using namespace std; extern "C" { diff --git a/src/Registry/RegistryService.hxx b/src/Registry/RegistryService.hxx index 0144b59b3..63f7d57e4 100644 --- a/src/Registry/RegistryService.hxx +++ b/src/Registry/RegistryService.hxx @@ -87,10 +87,10 @@ protected : const char *_SessionName ; int _Compteur ; - map _reg ; - map _fin ; + std::map _reg ; + std::map _fin ; - Registry::AllInfos* makeseq(map &mymap ); + Registry::AllInfos* makeseq(std::map &mymap ); } ; diff --git a/src/Registry/SALOME_Registry_Server.cxx b/src/Registry/SALOME_Registry_Server.cxx index 3e5a5b636..9feaf1567 100644 --- a/src/Registry/SALOME_Registry_Server.cxx +++ b/src/Registry/SALOME_Registry_Server.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -#include -#include -#include +# include +# include +# include extern "C" { @@ -49,6 +49,11 @@ extern "C" #endif using namespace std; +//#define CHECKTIME +#ifdef CHECKTIME +#include +#endif + int main( int argc , char **argv ) { BEGIN_OF( argv[0] ) diff --git a/src/RegistryDisplay/HelpWindow.cxx b/src/RegistryDisplay/HelpWindow.cxx index 3d8b682cc..40889fe28 100644 --- a/src/RegistryDisplay/HelpWindow.cxx +++ b/src/RegistryDisplay/HelpWindow.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; # include "HelpWindow.hxx" # include "utilities.h" @@ -34,6 +33,7 @@ using namespace std; # include # include # include +using namespace std; HelpWindow::HelpWindow(QWidget* parent, const char* name ) : QMainWindow( parent, name, WType_TopLevel | WDestructiveClose ) diff --git a/src/RegistryDisplay/RegWidget.cxx b/src/RegistryDisplay/RegWidget.cxx index afc79eac9..22797cc2a 100644 --- a/src/RegistryDisplay/RegWidget.cxx +++ b/src/RegistryDisplay/RegWidget.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; # include # include # include @@ -49,6 +48,7 @@ using namespace std; # include "RegWidget.hxx" # include "HelpWindow.hxx" # include "IntervalWindow.hxx" +using namespace std; typedef int PIXELS; RegWidget* RegWidget::myRegWidgetPtr = 0; diff --git a/src/RegistryDisplay/RegWidgetFactory.cxx b/src/RegistryDisplay/RegWidgetFactory.cxx index 341e60d54..ffef14c4d 100644 --- a/src/RegistryDisplay/RegWidgetFactory.cxx +++ b/src/RegistryDisplay/RegWidgetFactory.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; # include "RegWidget.hxx" # include "utilities.h" +using namespace std; extern "C" { diff --git a/src/RessourcesCatalog/SALOME_RessourcesCatalog_Client.cxx b/src/RessourcesCatalog/SALOME_RessourcesCatalog_Client.cxx index c6a524cde..05f13bc10 100644 --- a/src/RessourcesCatalog/SALOME_RessourcesCatalog_Client.cxx +++ b/src/RessourcesCatalog/SALOME_RessourcesCatalog_Client.cxx @@ -24,15 +24,15 @@ // File : SALOME_RessourcesCatalog_Client.cxx // Module : SALOME -using namespace std; /* $Header$ */ -#include +#include #include "SALOME_NamingService.hxx" #include #include CORBA_SERVER_HEADER(SALOME_RessourcesCatalog) #include #include "utilities.h" +using namespace std; int main(int argc,char **argv) { diff --git a/src/RessourcesCatalog/SALOME_RessourcesCatalog_Handler.cxx b/src/RessourcesCatalog/SALOME_RessourcesCatalog_Handler.cxx index e82e54a23..67cd843d3 100755 --- a/src/RessourcesCatalog/SALOME_RessourcesCatalog_Handler.cxx +++ b/src/RessourcesCatalog/SALOME_RessourcesCatalog_Handler.cxx @@ -26,9 +26,9 @@ // Module : SALOME //$Header$ -using namespace std; #define WRITE_RESSOURCES_TYPE #include "SALOME_RessourcesCatalog_Handler.hxx" +using namespace std; //---------------------------------------------------------------------- //Function : SALOME_RessourcesCatalog_Handler diff --git a/src/RessourcesCatalog/SALOME_RessourcesCatalog_impl.cxx b/src/RessourcesCatalog/SALOME_RessourcesCatalog_impl.cxx index d0d277749..0557289d8 100644 --- a/src/RessourcesCatalog/SALOME_RessourcesCatalog_impl.cxx +++ b/src/RessourcesCatalog/SALOME_RessourcesCatalog_impl.cxx @@ -25,9 +25,9 @@ // Author : Estelle Deville // Module : SALOME -using namespace std; #include "SALOME_RessourcesCatalog_impl.hxx" #include +using namespace std; //---------------------------------------------------------------------- // Function : SALOME_RessourcesCatalogImpl diff --git a/src/SALOMEDS/SALOMEDS_AttributeComment_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeComment_i.cxx index f967482d8..72babf8e1 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeComment_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeComment_i.cxx @@ -26,11 +26,11 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeComment_i.hxx" #include #include "SALOMEDS_SObject_i.hxx" +using namespace std; char* SALOMEDS_AttributeComment_i::Value() { diff --git a/src/SALOMEDS/SALOMEDS_AttributeDrawable_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeDrawable_i.cxx index 903d1ead7..8fa4ea145 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeDrawable_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeDrawable_i.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeDrawable_i.hxx" #include "SALOMEDS_SObject_i.hxx" +using namespace std; CORBA::Boolean SALOMEDS_AttributeDrawable_i::IsDrawable() { return (Handle(SALOMEDS_DrawableAttribute)::DownCast(_myAttr)->Get() == 1); diff --git a/src/SALOMEDS/SALOMEDS_AttributeExpandable_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeExpandable_i.cxx index 1560deeaa..6fe877c50 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeExpandable_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeExpandable_i.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeExpandable_i.hxx" #include "SALOMEDS_SObject_i.hxx" +using namespace std; CORBA::Boolean SALOMEDS_AttributeExpandable_i::IsExpandable() { return (Handle(SALOMEDS_ExpandableAttribute)::DownCast(_myAttr)->Get() == 1); diff --git a/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.cxx index 94e2a313d..a6c424c17 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.cxx @@ -26,11 +26,11 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeExternalFileDef_i.hxx" #include #include "SALOMEDS_SObject_i.hxx" +using namespace std; char* SALOMEDS_AttributeExternalFileDef_i::Value() { diff --git a/src/SALOMEDS/SALOMEDS_AttributeFileType_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeFileType_i.cxx index d40a53f43..9411fbb67 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeFileType_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeFileType_i.cxx @@ -26,11 +26,11 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeFileType_i.hxx" #include #include "SALOMEDS_SObject_i.hxx" +using namespace std; char* SALOMEDS_AttributeFileType_i::Value() { diff --git a/src/SALOMEDS/SALOMEDS_AttributeIOR_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeIOR_i.cxx index b1ec78bf0..6cf5e3374 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeIOR_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeIOR_i.cxx @@ -26,13 +26,13 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeIOR_i.hxx" #include #include "SALOMEDS_SObject_i.hxx" #include "SALOMEDS_Study_i.hxx" +using namespace std; char* SALOMEDS_AttributeIOR_i::Value() { diff --git a/src/SALOMEDS/SALOMEDS_AttributeInteger_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeInteger_i.cxx index d9f013db7..07920efb6 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeInteger_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeInteger_i.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeInteger_i.hxx" #include "SALOMEDS_SObject_i.hxx" +using namespace std; CORBA::Long SALOMEDS_AttributeInteger_i::Value() { diff --git a/src/SALOMEDS/SALOMEDS_AttributeLocalID_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeLocalID_i.cxx index 0ed4628b8..3c1b124fd 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeLocalID_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeLocalID_i.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_AttributeLocalID_i.hxx" #include "SALOMEDS_SObject_i.hxx" +using namespace std; CORBA::Long SALOMEDS_AttributeLocalID_i::Value() { return Handle(SALOMEDS_LocalIDAttribute)::DownCast(_myAttr)->Get(); diff --git a/src/SALOMEDS/SALOMEDS_AttributeName_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeName_i.cxx index 415f71af3..975e6439d 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeName_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeName_i.cxx @@ -26,10 +26,10 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeName_i.hxx" #include #include "SALOMEDS_SObject_i.hxx" +using namespace std; char* SALOMEDS_AttributeName_i::Value() { TCollection_ExtendedString S = Handle(TDataStd_Name)::DownCast(_myAttr)->Get(); diff --git a/src/SALOMEDS/SALOMEDS_AttributeOpened_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeOpened_i.cxx index c202cb043..fd9c6bfd1 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeOpened_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeOpened_i.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeOpened_i.hxx" #include "SALOMEDS_SObject_i.hxx" +using namespace std; CORBA::Boolean SALOMEDS_AttributeOpened_i::IsOpened() { return (Handle(SALOMEDS_OpenedAttribute)::DownCast(_myAttr)->Get() == 1); diff --git a/src/SALOMEDS/SALOMEDS_AttributePersistentRef_i.cxx b/src/SALOMEDS/SALOMEDS_AttributePersistentRef_i.cxx index 626ad9711..3a867f0ea 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePersistentRef_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributePersistentRef_i.cxx @@ -26,10 +26,10 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributePersistentRef_i.hxx" #include #include "SALOMEDS_SObject_i.hxx" +using namespace std; char* SALOMEDS_AttributePersistentRef_i::Value() { diff --git a/src/SALOMEDS/SALOMEDS_AttributePixMap_i.cxx b/src/SALOMEDS/SALOMEDS_AttributePixMap_i.cxx index 5015f1697..1d8498c3f 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePixMap_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributePixMap_i.cxx @@ -26,10 +26,10 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributePixMap_i.hxx" #include "SALOMEDS_SObject_i.hxx" #include +using namespace std; CORBA::Boolean SALOMEDS_AttributePixMap_i::HasPixMap() { TCollection_ExtendedString S = Handle(SALOMEDS_PixMapAttribute)::DownCast(_myAttr)->Get(); diff --git a/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx b/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx index 86f7a1ca4..ca3f7d731 100644 --- a/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx @@ -9,11 +9,11 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributePythonObject_i.hxx" #include #include #include "SALOMEDS_SObject_i.hxx" +using namespace std; void SALOMEDS_AttributePythonObject_i::SetObject(const char* theSequence, CORBA::Boolean IsScript) { CheckLocked(); diff --git a/src/SALOMEDS/SALOMEDS_AttributeReal_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeReal_i.cxx index fc5611c8e..62960aa9c 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeReal_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeReal_i.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeReal_i.hxx" #include "SALOMEDS_SObject_i.hxx" +using namespace std; CORBA::Double SALOMEDS_AttributeReal_i::Value() { return Handle(TDataStd_Real)::DownCast(_myAttr)->Get(); diff --git a/src/SALOMEDS/SALOMEDS_AttributeSelectable_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeSelectable_i.cxx index b526f3c99..e208ad6a9 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSelectable_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSelectable_i.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeSelectable_i.hxx" #include "SALOMEDS_SObject_i.hxx" +using namespace std; CORBA::Boolean SALOMEDS_AttributeSelectable_i::IsSelectable() { return (Handle(SALOMEDS_SelectableAttribute)::DownCast(_myAttr)->Get() == 1); diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx index 61e08b1bd..cd142de25 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx @@ -26,11 +26,10 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeSequenceOfInteger_i.hxx" #include "SALOMEDS_SObject_i.hxx" #include - +using namespace std; void SALOMEDS_AttributeSequenceOfInteger_i::Assign(const SALOMEDS::LongSeq& other) { diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx index 8b48632b2..6c5c18589 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx @@ -26,10 +26,10 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeSequenceOfReal_i.hxx" #include "SALOMEDS_SObject_i.hxx" #include +using namespace std; void SALOMEDS_AttributeSequenceOfReal_i::Assign(const SALOMEDS::DoubleSeq& other) { diff --git a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.cxx index 1646f3db4..dce1ad372 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.cxx @@ -9,11 +9,11 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeStudyProperties_i.hxx" #include "SALOMEDS_SObject_i.hxx" #include #include +using namespace std; #define CREATION_MODE_NOTDEFINED 0 #define CREATION_MODE_SCRATCH 1 diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx index f80457bb6..1542471bf 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx @@ -9,7 +9,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeTableOfInteger_i.hxx" #include "SALOMEDS_SObject_i.hxx" #include @@ -18,6 +17,7 @@ using namespace std; #include #include +using namespace std; #define SEPARATOR '\1' diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx index 432f42e5e..a684dc8df 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx @@ -9,7 +9,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeTableOfReal_i.hxx" #include "SALOMEDS_SObject_i.hxx" #include @@ -18,6 +17,7 @@ using namespace std; #include #include +using namespace std; #define SEPARATOR '\1' diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx index 262cdce8d..c88ce6d21 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx @@ -8,7 +8,6 @@ // Author : Sergey Ruin // Module : SALOME -using namespace std; #include #include @@ -21,6 +20,7 @@ using namespace std; #include #include +using namespace std; #define SEPARATOR '\1' diff --git a/src/SALOMEDS/SALOMEDS_AttributeTarget_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTarget_i.cxx index f5f35cc7b..b431af96a 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTarget_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTarget_i.cxx @@ -26,11 +26,11 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_AttributeTarget_i.hxx" #include "SALOMEDS_SObject_i.hxx" #include #include +using namespace std; void SALOMEDS_AttributeTarget_i::Add(SALOMEDS::SObject_ptr anObject) { TDF_Label aLabel; diff --git a/src/SALOMEDS/SALOMEDS_AttributeTextColor_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTextColor_i.cxx index 0f040990c..45d1b8f52 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTextColor_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTextColor_i.cxx @@ -26,10 +26,10 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeTextColor_i.hxx" #include "SALOMEDS_SObject_i.hxx" #include +using namespace std; SALOMEDS::Color SALOMEDS_AttributeTextColor_i::TextColor() { SALOMEDS::Color TextColor; diff --git a/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor_i.cxx index 9ba430ba8..cc6ff475b 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor_i.cxx @@ -26,10 +26,10 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_AttributeTextHighlightColor_i.hxx" #include "SALOMEDS_SObject_i.hxx" #include +using namespace std; SALOMEDS::Color SALOMEDS_AttributeTextHighlightColor_i::TextHighlightColor() { SALOMEDS::Color TextHighlightColor; diff --git a/src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.cxx index 11d326b5c..aaf7ddc25 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.cxx @@ -26,10 +26,10 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_AttributeTreeNode_i.hxx" #include "SALOMEDS_SObject_i.hxx" #include "utilities.h" +using namespace std; static Handle(TDataStd_TreeNode) GetNode(SALOMEDS::AttributeTreeNode_ptr value, const Handle(TDataStd_TreeNode)& aNode) { diff --git a/src/SALOMEDS/SALOMEDS_AttributeUserID_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeUserID_i.cxx index 632d95beb..021879481 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeUserID_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeUserID_i.cxx @@ -26,10 +26,10 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_AttributeUserID_i.hxx" #include #include "SALOMEDS_SObject_i.hxx" +using namespace std; char* SALOMEDS_AttributeUserID_i::Value() { char aGUID[40]; diff --git a/src/SALOMEDS/SALOMEDS_ChildIterator_i.cxx b/src/SALOMEDS/SALOMEDS_ChildIterator_i.cxx index 947579721..ada9ea7c4 100644 --- a/src/SALOMEDS/SALOMEDS_ChildIterator_i.cxx +++ b/src/SALOMEDS/SALOMEDS_ChildIterator_i.cxx @@ -26,12 +26,10 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_ChildIterator_i.hxx" #include "SALOMEDS_SObject_i.hxx" #include "utilities.h" - - +using namespace std; //============================================================================ /*! Function : constructor diff --git a/src/SALOMEDS/SALOMEDS_Client.cxx b/src/SALOMEDS/SALOMEDS_Client.cxx index 37104eab0..a0cc035ce 100644 --- a/src/SALOMEDS/SALOMEDS_Client.cxx +++ b/src/SALOMEDS/SALOMEDS_Client.cxx @@ -26,12 +26,12 @@ // Module : SALOME // $Header$ -using namespace std; #include #include CORBA_SERVER_HEADER(SALOMEDS) #include "SALOMEDS_StudyManager_i.hxx" #include "utilities.h" #include "SALOMEDS_AttributeName_i.hxx" +using namespace std; //============================================================================ /*! Function : diff --git a/src/SALOMEDS/SALOMEDS_DataMapIteratorOfDataMapStringLabel_0.cxx b/src/SALOMEDS/SALOMEDS_DataMapIteratorOfDataMapStringLabel_0.cxx index 080f4b79d..ce782eae0 100644 --- a/src/SALOMEDS/SALOMEDS_DataMapIteratorOfDataMapStringLabel_0.cxx +++ b/src/SALOMEDS/SALOMEDS_DataMapIteratorOfDataMapStringLabel_0.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_DataMapIteratorOfDataMapStringLabel.hxx" #ifndef _Standard_NoSuchObject_HeaderFile @@ -44,6 +43,7 @@ using namespace std; #ifndef _SALOMEDS_DataMapNodeOfDataMapStringLabel_HeaderFile #include "SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx" #endif +using namespace std; #define TheKey TCollection_ExtendedString diff --git a/src/SALOMEDS/SALOMEDS_DataMapNodeOfDataMapStringLabel_0.cxx b/src/SALOMEDS/SALOMEDS_DataMapNodeOfDataMapStringLabel_0.cxx index 2b063d479..4faa54bac 100644 --- a/src/SALOMEDS/SALOMEDS_DataMapNodeOfDataMapStringLabel_0.cxx +++ b/src/SALOMEDS/SALOMEDS_DataMapNodeOfDataMapStringLabel_0.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx" #ifndef _Standard_TypeMismatch_HeaderFile @@ -45,6 +44,7 @@ using namespace std; #ifndef _SALOMEDS_DataMapIteratorOfDataMapStringLabel_HeaderFile #include "SALOMEDS_DataMapIteratorOfDataMapStringLabel.hxx" #endif +using namespace std; SALOMEDS_DataMapNodeOfDataMapStringLabel::~SALOMEDS_DataMapNodeOfDataMapStringLabel() {} diff --git a/src/SALOMEDS/SALOMEDS_DataMapStringLabel_0.cxx b/src/SALOMEDS/SALOMEDS_DataMapStringLabel_0.cxx index 4befe2030..a670a6f57 100644 --- a/src/SALOMEDS/SALOMEDS_DataMapStringLabel_0.cxx +++ b/src/SALOMEDS/SALOMEDS_DataMapStringLabel_0.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_DataMapStringLabel.hxx" #ifndef _Standard_DomainError_HeaderFile @@ -47,6 +46,7 @@ using namespace std; #ifndef _SALOMEDS_DataMapIteratorOfDataMapStringLabel_HeaderFile #include "SALOMEDS_DataMapIteratorOfDataMapStringLabel.hxx" #endif +using namespace std; #define TheKey TCollection_ExtendedString diff --git a/src/SALOMEDS/SALOMEDS_DrawableAttribute.cxx b/src/SALOMEDS/SALOMEDS_DrawableAttribute.cxx index 62bed2f1b..0245efc1d 100644 --- a/src/SALOMEDS/SALOMEDS_DrawableAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_DrawableAttribute.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_DrawableAttribute.ixx" #include +using namespace std; //======================================================================= //function : GetID diff --git a/src/SALOMEDS/SALOMEDS_ExpandableAttribute.cxx b/src/SALOMEDS/SALOMEDS_ExpandableAttribute.cxx index ad3cc3c5d..db17601b4 100644 --- a/src/SALOMEDS/SALOMEDS_ExpandableAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_ExpandableAttribute.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_ExpandableAttribute.ixx" #include +using namespace std; //======================================================================= //function : GetID diff --git a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx index d3fc65e30..053b51438 100644 --- a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx +++ b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx @@ -9,8 +9,8 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_StudyBuilder_i.hxx" +using namespace std; void SALOMEDS_GenericAttribute_i::CheckLocked() throw (SALOMEDS::GenericAttribute::LockProtection) { if (!_myAttr.IsNull() && _myAttr->IsValid() && !CORBA::is_nil(_myOrb)) { diff --git a/src/SALOMEDS/SALOMEDS_IORAttribute.cxx b/src/SALOMEDS/SALOMEDS_IORAttribute.cxx index c305641a4..f71b538fd 100644 --- a/src/SALOMEDS/SALOMEDS_IORAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_IORAttribute.cxx @@ -26,11 +26,11 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_IORAttribute.ixx" #include #include #include "SALOMEDS_Study_i.hxx" +using namespace std; //======================================================================= //function : GetID diff --git a/src/SALOMEDS/SALOMEDS_LocalIDAttribute.cxx b/src/SALOMEDS/SALOMEDS_LocalIDAttribute.cxx index 9f8ece15c..623ce7c50 100644 --- a/src/SALOMEDS/SALOMEDS_LocalIDAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_LocalIDAttribute.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_LocalIDAttribute.ixx" #include +using namespace std; //======================================================================= //function : GetID diff --git a/src/SALOMEDS/SALOMEDS_OCAFApplication.cxx b/src/SALOMEDS/SALOMEDS_OCAFApplication.cxx index e0c7ad35f..5913c6842 100644 --- a/src/SALOMEDS/SALOMEDS_OCAFApplication.cxx +++ b/src/SALOMEDS/SALOMEDS_OCAFApplication.cxx @@ -26,8 +26,8 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_OCAFApplication.ixx" +using namespace std; //======================================================================= //function : SALOMEDS_OCAFApplication diff --git a/src/SALOMEDS/SALOMEDS_OpenedAttribute.cxx b/src/SALOMEDS/SALOMEDS_OpenedAttribute.cxx index d59512cdf..4704436ff 100644 --- a/src/SALOMEDS/SALOMEDS_OpenedAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_OpenedAttribute.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_OpenedAttribute.ixx" #include +using namespace std; //======================================================================= //function : GetID diff --git a/src/SALOMEDS/SALOMEDS_PersRefAttribute.cxx b/src/SALOMEDS/SALOMEDS_PersRefAttribute.cxx index 8e313831c..8d57af837 100644 --- a/src/SALOMEDS/SALOMEDS_PersRefAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_PersRefAttribute.cxx @@ -26,10 +26,10 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_PersRefAttribute.ixx" #include #include +using namespace std; //======================================================================= //function : GetID diff --git a/src/SALOMEDS/SALOMEDS_PixMapAttribute.cxx b/src/SALOMEDS/SALOMEDS_PixMapAttribute.cxx index 3fde4f60e..1799c035f 100644 --- a/src/SALOMEDS/SALOMEDS_PixMapAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_PixMapAttribute.cxx @@ -26,10 +26,10 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_PixMapAttribute.ixx" #include #include +using namespace std; //======================================================================= //function : GetID diff --git a/src/SALOMEDS/SALOMEDS_PythonObjectAttribute.cxx b/src/SALOMEDS/SALOMEDS_PythonObjectAttribute.cxx index fd0538e0e..f8c8d9de4 100644 --- a/src/SALOMEDS/SALOMEDS_PythonObjectAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_PythonObjectAttribute.cxx @@ -9,9 +9,9 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_PythonObjectAttribute.ixx" #include +using namespace std; const Standard_GUID& SALOMEDS_PythonObjectAttribute::GetID() { diff --git a/src/SALOMEDS/SALOMEDS_SComponentIterator_i.cxx b/src/SALOMEDS/SALOMEDS_SComponentIterator_i.cxx index 77b0b4655..c8ae7c4c5 100644 --- a/src/SALOMEDS/SALOMEDS_SComponentIterator_i.cxx +++ b/src/SALOMEDS/SALOMEDS_SComponentIterator_i.cxx @@ -26,9 +26,8 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_SComponentIterator_i.hxx" - +using namespace std; //============================================================================ /*! Function : constructor diff --git a/src/SALOMEDS/SALOMEDS_SComponent_i.cxx b/src/SALOMEDS/SALOMEDS_SComponent_i.cxx index 896859cca..66264fd5b 100644 --- a/src/SALOMEDS/SALOMEDS_SComponent_i.cxx +++ b/src/SALOMEDS/SALOMEDS_SComponent_i.cxx @@ -26,10 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEDS_SComponent_i.hxx" #include "utilities.h" - +using namespace std; //============================================================================ /*! Function : constructor diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.cxx b/src/SALOMEDS/SALOMEDS_SObject_i.cxx index e10791ded..1f8851466 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.cxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "utilities.h" #include "SALOMEDS_SObject_i.hxx" //SALOMEDS Headers @@ -68,6 +67,7 @@ using namespace std; #include "SALOMEDS_AttributeStudyProperties_i.hxx" #include "SALOMEDS_AttributePythonObject_i.hxx" #include +using namespace std; //============================================================================ /*! Function : ReturnGUIDForAttribute @@ -549,7 +549,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) { TDF_Label L = _lab.FindChild(atag,false); if (L.IsNull()) return false; diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.hxx b/src/SALOMEDS/SALOMEDS_SObject_i.hxx index be22a90b2..cd6944c55 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.hxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.hxx @@ -30,7 +30,7 @@ #define __SALOMEDS_SOBJECT_I_H__ // std C++ headers -#include +#include #include #include @@ -60,7 +60,7 @@ protected: char* _name; char* _value; char* _type; - vector _liste_ba_type; + std::vector _liste_ba_type; public: @@ -73,7 +73,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(); diff --git a/src/SALOMEDS/SALOMEDS_SelectableAttribute.cxx b/src/SALOMEDS/SALOMEDS_SelectableAttribute.cxx index 241792584..aef7ac1bd 100644 --- a/src/SALOMEDS/SALOMEDS_SelectableAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_SelectableAttribute.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_SelectableAttribute.ixx" #include +using namespace std; //======================================================================= //function : GetID diff --git a/src/SALOMEDS/SALOMEDS_SequenceOfIntegerAttribute.cxx b/src/SALOMEDS/SALOMEDS_SequenceOfIntegerAttribute.cxx index 51bdda48a..30c1cf93a 100644 --- a/src/SALOMEDS/SALOMEDS_SequenceOfIntegerAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_SequenceOfIntegerAttribute.cxx @@ -26,8 +26,8 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_SequenceOfIntegerAttribute.ixx" +using namespace std; //======================================================================= //function : GetID diff --git a/src/SALOMEDS/SALOMEDS_SequenceOfRealAttribute.cxx b/src/SALOMEDS/SALOMEDS_SequenceOfRealAttribute.cxx index 9e3cf84e9..9cd839f05 100644 --- a/src/SALOMEDS/SALOMEDS_SequenceOfRealAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_SequenceOfRealAttribute.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_SequenceOfRealAttribute.ixx" #include +using namespace std; //======================================================================= //function : GetID diff --git a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx index d3cb87809..5357fe6c9 100644 --- a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "utilities.h" #include "SALOMEDS_Study_i.hxx" //#include "SALOMEDS_StudyBuilder_i.hxx" @@ -79,6 +78,7 @@ using namespace std; #include #include +using namespace std; #define USE_CASE_LABEL_TAG 2 #define DIRECTORYID 16661 diff --git a/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx b/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx index ba14acbf0..a7d64ccd0 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "utilities.h" #include "SALOME_LifeCycleCORBA.hxx" #include "SALOMEDS_StudyManager_i.hxx" @@ -75,6 +74,7 @@ using namespace std; #include "Utils_CorbaException.hxx" #include +using namespace std; #include @@ -96,6 +96,9 @@ static void ReadAttributes(Handle(TDF_Data)& DF, if (!strncmp(hdf_dataset->GetName(),"AttributeTreeNode",17)) { MESSAGE("Create a Attribute : AttributeTreeNode"); char current_strings[5][hdf_dataset->GetSize()/5]; +// char **current_strings = new (char*)[5]; +// for(int i=0;i<5;i++) +// current_strings[i] = new char[hdf_dataset->GetSize()/5+1]; hdf_dataset->ReadFromDisk(current_strings); MESSAGE("Create an Attribute : AttributeTreeNode"); @@ -123,6 +126,9 @@ static void ReadAttributes(Handle(TDF_Data)& DF, if (!aLabel.FindAttribute(aGUID,aNode)) aNode = TDataStd_TreeNode::Set(aLabel,aGUID); aNewNode->SetFirst(aNode); } +// for(int i=0;i<5;i++) +// delete[] current_strings[i]; +// delete[] current_strings; } else { int size = hdf_dataset->GetSize(); @@ -571,9 +577,9 @@ SALOMEDS::Study_ptr SALOMEDS_StudyManager_i::Open(const char* aUrl) // cerr << "HDFexception ! " << endl; delete aHDFUrl; char eStr[strlen(aUrl)+17]; +// char *eStr = new char[strlen(aUrl)+17+1]; sprintf(eStr,"Can't open file %s",aUrl); THROW_SALOME_CORBA_EXCEPTION(CORBA::string_dup(eStr),SALOME::BAD_PARAM); - } MESSAGE("Open : Creating the CORBA servant holding it... "); @@ -619,6 +625,7 @@ SALOMEDS::Study_ptr SALOMEDS_StudyManager_i::Open(const char* aUrl) // cerr << "HDFexception ! " << endl; delete aHDFUrl; char eStr[strlen(aUrl)+17]; +// char *eStr = new char[strlen(aUrl)+17+1]; sprintf(eStr,"Can't open file %s",aUrl); THROW_SALOME_CORBA_EXCEPTION(CORBA::string_dup(eStr),SALOME::BAD_PARAM); } @@ -1181,6 +1188,9 @@ static void SaveAttributes(SALOMEDS::SObject_ptr SO, HDFgroup *hdf_group_sobject MESSAGE("attribute AttributeTreeNode with various GUID wrote on file:"); MESSAGE(aDataSetName); delete(aDataSetName); +// for(int i=0;i<5;i++) +// delete[] Data[i]; +// delete[] Data; } } } diff --git a/src/SALOMEDS/SALOMEDS_StudyPropertiesAttribute.cxx b/src/SALOMEDS/SALOMEDS_StudyPropertiesAttribute.cxx index 4f83613be..62835949d 100644 --- a/src/SALOMEDS/SALOMEDS_StudyPropertiesAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyPropertiesAttribute.cxx @@ -9,8 +9,8 @@ // Module : SALOME // $Header$ -using namespace std; #include +using namespace std; const Standard_GUID& SALOMEDS_StudyPropertiesAttribute::GetID() { diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index ed98968e8..fc2591d58 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "utilities.h" #include "SALOMEDS_Study_i.hxx" @@ -44,6 +43,7 @@ using namespace std; #include "SALOMEDS_LocalIDAttribute.hxx" #include "SALOMEDS_PersRefAttribute.hxx" #include "SALOMEDS_UseCaseIterator_i.hxx" +using namespace std; #define DIRECTORYID 16661 diff --git a/src/SALOMEDS/SALOMEDS_TableOfIntegerAttribute.cxx b/src/SALOMEDS/SALOMEDS_TableOfIntegerAttribute.cxx index a5134a76f..abe7171f8 100644 --- a/src/SALOMEDS/SALOMEDS_TableOfIntegerAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_TableOfIntegerAttribute.cxx @@ -9,12 +9,12 @@ // Module : SALOME // $Header$ -using namespace std; #include #include #include #include +using namespace std; const Standard_GUID& SALOMEDS_TableOfIntegerAttribute::GetID() { diff --git a/src/SALOMEDS/SALOMEDS_TableOfIntegerAttribute.hxx b/src/SALOMEDS/SALOMEDS_TableOfIntegerAttribute.hxx index f524bad98..a15b4bce7 100644 --- a/src/SALOMEDS/SALOMEDS_TableOfIntegerAttribute.hxx +++ b/src/SALOMEDS/SALOMEDS_TableOfIntegerAttribute.hxx @@ -111,8 +111,8 @@ Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_ Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetRowIndices(const Standard_Integer theRow); Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetColumnIndices(const Standard_Integer theColumn); -Standard_EXPORT void ConvertToString(ostrstream& theStream); -Standard_EXPORT bool RestoreFromString(istrstream& theStream); +Standard_EXPORT void ConvertToString(std::ostrstream& theStream); +Standard_EXPORT bool RestoreFromString(std::istrstream& theStream); Standard_EXPORT ~SALOMEDS_TableOfIntegerAttribute(); diff --git a/src/SALOMEDS/SALOMEDS_TableOfRealAttribute.cxx b/src/SALOMEDS/SALOMEDS_TableOfRealAttribute.cxx index d12b58bb2..f234fca97 100644 --- a/src/SALOMEDS/SALOMEDS_TableOfRealAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_TableOfRealAttribute.cxx @@ -9,13 +9,13 @@ // Module : SALOME // $Header$ -using namespace std; #include #include #include #include #include +using namespace std; const Standard_GUID& SALOMEDS_TableOfRealAttribute::GetID() { diff --git a/src/SALOMEDS/SALOMEDS_TableOfRealAttribute.hxx b/src/SALOMEDS/SALOMEDS_TableOfRealAttribute.hxx index a3d35069f..35d8e33ae 100644 --- a/src/SALOMEDS/SALOMEDS_TableOfRealAttribute.hxx +++ b/src/SALOMEDS/SALOMEDS_TableOfRealAttribute.hxx @@ -120,8 +120,8 @@ Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_ Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetRowIndices(const Standard_Integer theRow); Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetColumnIndices(const Standard_Integer theColumn); -Standard_EXPORT void ConvertToString(ostrstream& theStream); -Standard_EXPORT bool RestoreFromString(istrstream& theStream); +Standard_EXPORT void ConvertToString(std::ostrstream& theStream); +Standard_EXPORT bool RestoreFromString(std::istrstream& theStream); Standard_EXPORT ~SALOMEDS_TableOfRealAttribute(); diff --git a/src/SALOMEDS/SALOMEDS_TableOfStringAttribute.cxx b/src/SALOMEDS/SALOMEDS_TableOfStringAttribute.cxx index 737f1f752..9221e9a80 100644 --- a/src/SALOMEDS/SALOMEDS_TableOfStringAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_TableOfStringAttribute.cxx @@ -8,13 +8,13 @@ // Author : Sergey Ruin // Module : SALOME -using namespace std; #include #include #include #include #include +using namespace std; const Standard_GUID& SALOMEDS_TableOfStringAttribute::GetID() { diff --git a/src/SALOMEDS/SALOMEDS_TargetAttribute.cxx b/src/SALOMEDS/SALOMEDS_TargetAttribute.cxx index a043b9610..9833dd56c 100644 --- a/src/SALOMEDS/SALOMEDS_TargetAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_TargetAttribute.cxx @@ -26,11 +26,11 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_TargetAttribute.ixx" #include #include #include "utilities.h" +using namespace std; //======================================================================= //function : GetID diff --git a/src/SALOMEDS/SALOMEDS_TextColorAttribute.cxx b/src/SALOMEDS/SALOMEDS_TextColorAttribute.cxx index c264f94b3..c5eccab88 100644 --- a/src/SALOMEDS/SALOMEDS_TextColorAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_TextColorAttribute.cxx @@ -26,8 +26,8 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_TextColorAttribute.ixx" +using namespace std; //======================================================================= //function : GetID diff --git a/src/SALOMEDS/SALOMEDS_TextHighlightColorAttribute.cxx b/src/SALOMEDS/SALOMEDS_TextHighlightColorAttribute.cxx index 4194d1353..dd95d6f64 100644 --- a/src/SALOMEDS/SALOMEDS_TextHighlightColorAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_TextHighlightColorAttribute.cxx @@ -26,8 +26,8 @@ // Module : SALOME // $Header: -using namespace std; #include "SALOMEDS_TextHighlightColorAttribute.ixx" +using namespace std; //======================================================================= //function : GetID diff --git a/src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.cxx b/src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.cxx index 698fbb1c6..151a0bb9c 100644 --- a/src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.cxx +++ b/src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.cxx @@ -8,7 +8,6 @@ // Author : Yves FRICAUD // Module : SALOME -using namespace std; #include "SALOMEDS_UseCaseBuilder_i.hxx" #include "SALOMEDS_AttributeComment_i.hxx" #include "SALOMEDS_SObject_i.hxx" @@ -24,6 +23,7 @@ using namespace std; #include #include #include +using namespace std; #define USE_CASE_LABEL_TAG 2 #define USE_CASE_GUID "AA43BB12-D9CD-11d6-945D-0050DA506788" diff --git a/src/SALOMEDS/SALOMEDS_UseCaseIterator_i.cxx b/src/SALOMEDS/SALOMEDS_UseCaseIterator_i.cxx index 69e7d39ec..05507edab 100644 --- a/src/SALOMEDS/SALOMEDS_UseCaseIterator_i.cxx +++ b/src/SALOMEDS/SALOMEDS_UseCaseIterator_i.cxx @@ -8,12 +8,10 @@ // Author : Yves FRICAUD // Module : SALOME -using namespace std; #include "SALOMEDS_UseCaseIterator_i.hxx" #include "SALOMEDS_SObject_i.hxx" #include "utilities.h" - - +using namespace std; //============================================================================ /*! Function : constructor diff --git a/src/SALOMEGUI/PyInterp_PyQt.cxx b/src/SALOMEGUI/PyInterp_PyQt.cxx index ecd145c4b..7f59b13a4 100644 --- a/src/SALOMEGUI/PyInterp_PyQt.cxx +++ b/src/SALOMEGUI/PyInterp_PyQt.cxx @@ -9,11 +9,10 @@ // Module : SALOME // $Header$ -using namespace std; -using namespace std; #include "PyInterp_PyQt.h" #include "utilities.h" +using namespace std; extern "C" PyObject * PyEval_EvalCode(PyObject *co, PyObject *g, PyObject *l); diff --git a/src/SALOMEGUI/PyInterp_base.cxx b/src/SALOMEGUI/PyInterp_base.cxx index f9d03e760..fb88526ed 100644 --- a/src/SALOMEGUI/PyInterp_base.cxx +++ b/src/SALOMEGUI/PyInterp_base.cxx @@ -9,7 +9,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "PyInterp_base.h" #include "utilities.h" #include diff --git a/src/SALOMEGUI/PyInterp_base.h b/src/SALOMEGUI/PyInterp_base.h index 48781e85f..9fe277d6a 100644 --- a/src/SALOMEGUI/PyInterp_base.h +++ b/src/SALOMEGUI/PyInterp_base.h @@ -12,11 +12,11 @@ #ifndef _PYINTERP_BASE_H_ #define _PYINTERP_BASE_H_ -using namespace std; #include #include #include #include +using namespace std; #define TOP_HISTORY_PY "--- top of history ---" #define BEGIN_HISTORY_PY "--- begin of history ---" diff --git a/src/SALOMEGUI/QAD_Application.cxx b/src/SALOMEGUI/QAD_Application.cxx index 439362886..252875c5c 100644 --- a/src/SALOMEGUI/QAD_Application.cxx +++ b/src/SALOMEGUI/QAD_Application.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; /*! \class QAD_Application QAD_Application.h \brief Study manager for QAD-based application. @@ -62,6 +61,7 @@ using namespace std; #include #include #include +using namespace std; static bool checkPermission(QString fileName) { if ( QFile::exists( fileName ) ) { diff --git a/src/SALOMEGUI/QAD_Config.cxx b/src/SALOMEGUI/QAD_Config.cxx index b9d734f16..593e2c41b 100644 --- a/src/SALOMEGUI/QAD_Config.cxx +++ b/src/SALOMEGUI/QAD_Config.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; /*! \class QAD_Config QAD_Config.h \brief Settings file management for QAD-based application. @@ -40,6 +39,7 @@ using namespace std; #include #include #include +using namespace std; /*! diff --git a/src/SALOMEGUI/QAD_Desktop.cxx b/src/SALOMEGUI/QAD_Desktop.cxx index 4b9634dfd..9a100591e 100644 --- a/src/SALOMEGUI/QAD_Desktop.cxx +++ b/src/SALOMEGUI/QAD_Desktop.cxx @@ -30,7 +30,6 @@ \class QAD_Desktop QAD_Desktop.h \brief Main desktop of QAD-based application. */ -using namespace std; # include "Utils_ORB_INIT.hxx" # include "Utils_SINGLETON.hxx" @@ -103,6 +102,7 @@ using namespace std; #include #include #include +using namespace std; static const char* SEPARATOR = ":"; diff --git a/src/SALOMEGUI/QAD_DirListDlg.cxx b/src/SALOMEGUI/QAD_DirListDlg.cxx index a45638cd5..542df51cf 100644 --- a/src/SALOMEGUI/QAD_DirListDlg.cxx +++ b/src/SALOMEGUI/QAD_DirListDlg.cxx @@ -9,7 +9,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_DirListDlg.h" #include "QAD_Desktop.h" #include "QAD_FileDlg.h" @@ -19,6 +18,7 @@ using namespace std; #include #include #include +using namespace std; #define MIN_WIDTH 400 #define MIN_HEIGHT 200 diff --git a/src/SALOMEGUI/QAD_FileDlg.cxx b/src/SALOMEGUI/QAD_FileDlg.cxx index df22e1e21..a8d717339 100644 --- a/src/SALOMEGUI/QAD_FileDlg.cxx +++ b/src/SALOMEGUI/QAD_FileDlg.cxx @@ -9,7 +9,6 @@ // Module : SALOME // $Header$ -using namespace std; #include #include #include @@ -22,6 +21,7 @@ using namespace std; #include "QAD_FileDlg.h" #include "QAD_MessageBox.h" #include "QAD_Tools.h" +using namespace std; #define MIN_COMBO_SIZE 100 diff --git a/src/SALOMEGUI/QAD_FileValidator.cxx b/src/SALOMEGUI/QAD_FileValidator.cxx index f12915a41..d62145052 100644 --- a/src/SALOMEGUI/QAD_FileValidator.cxx +++ b/src/SALOMEGUI/QAD_FileValidator.cxx @@ -9,7 +9,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_FileValidator.h" #include "QAD_Application.h" #include "QAD_Desktop.h" @@ -17,6 +16,7 @@ using namespace std; #include #include +using namespace std; /* constructor */ QAD_FileValidator::QAD_FileValidator(QWidget* parent) : diff --git a/src/SALOMEGUI/QAD_Help.cxx b/src/SALOMEGUI/QAD_Help.cxx index ad6697036..e14035b59 100644 --- a/src/SALOMEGUI/QAD_Help.cxx +++ b/src/SALOMEGUI/QAD_Help.cxx @@ -26,8 +26,8 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_Help.h" +using namespace std; /*! \class QAD_Help QAD_HelpL.h diff --git a/src/SALOMEGUI/QAD_HelpWindow.cxx b/src/SALOMEGUI/QAD_HelpWindow.cxx index d715bf5df..3aa9a8586 100644 --- a/src/SALOMEGUI/QAD_HelpWindow.cxx +++ b/src/SALOMEGUI/QAD_HelpWindow.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; /*! \class QAD_HelpWindow QAD_HelpWindow.h \brief Html browser for help. @@ -46,6 +45,7 @@ using namespace std; #include #include #include +using namespace std; /*! Constructor diff --git a/src/SALOMEGUI/QAD_LeftFrame.cxx b/src/SALOMEGUI/QAD_LeftFrame.cxx index c3a021d26..8edb54c48 100644 --- a/src/SALOMEGUI/QAD_LeftFrame.cxx +++ b/src/SALOMEGUI/QAD_LeftFrame.cxx @@ -26,10 +26,10 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_LeftFrame.h" #include "QAD_ObjectBrowser.h" #include +using namespace std; /*! \class QAD_LeftFrame QAD_LeftFrame.h diff --git a/src/SALOMEGUI/QAD_ListMenuIdAction.cxx b/src/SALOMEGUI/QAD_ListMenuIdAction.cxx index 04c8d041d..16bb368dc 100644 --- a/src/SALOMEGUI/QAD_ListMenuIdAction.cxx +++ b/src/SALOMEGUI/QAD_ListMenuIdAction.cxx @@ -26,8 +26,8 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_ListMenuIdAction.h" +using namespace std; QAD_ListMenuIdAction::QAD_ListMenuIdAction(QPopupMenu* theMenu, int id, diff --git a/src/SALOMEGUI/QAD_ListPopupMenu.cxx b/src/SALOMEGUI/QAD_ListPopupMenu.cxx index e5a5d134f..1d9e9a7b9 100644 --- a/src/SALOMEGUI/QAD_ListPopupMenu.cxx +++ b/src/SALOMEGUI/QAD_ListPopupMenu.cxx @@ -26,8 +26,8 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_ListPopupMenu.h" +using namespace std; /*! Constructor. diff --git a/src/SALOMEGUI/QAD_ListView.cxx b/src/SALOMEGUI/QAD_ListView.cxx index d555fd378..9b19755df 100644 --- a/src/SALOMEGUI/QAD_ListView.cxx +++ b/src/SALOMEGUI/QAD_ListView.cxx @@ -9,7 +9,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_ListView.h" #include @@ -25,6 +24,7 @@ using namespace std; #include #include +using namespace std; ////////////////////////////////////////////////////////////////////// // QAD_ListView class implementation diff --git a/src/SALOMEGUI/QAD_Menus.cxx b/src/SALOMEGUI/QAD_Menus.cxx index 904ee2713..b7ddf6ae7 100644 --- a/src/SALOMEGUI/QAD_Menus.cxx +++ b/src/SALOMEGUI/QAD_Menus.cxx @@ -26,8 +26,8 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_Menus.h" +using namespace std; /*! Constructor. diff --git a/src/SALOMEGUI/QAD_Message.cxx b/src/SALOMEGUI/QAD_Message.cxx index 4730b1ee8..1f5f570c4 100644 --- a/src/SALOMEGUI/QAD_Message.cxx +++ b/src/SALOMEGUI/QAD_Message.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_Message.h" #include "QAD_Application.h" #include "QAD_Config.h" @@ -35,6 +34,7 @@ using namespace std; #include #include #include +using namespace std; enum { IdCopy, IdClear, IdSelectAll }; diff --git a/src/SALOMEGUI/QAD_MessageBox.cxx b/src/SALOMEGUI/QAD_MessageBox.cxx index c6aad0f76..2f4160624 100644 --- a/src/SALOMEGUI/QAD_MessageBox.cxx +++ b/src/SALOMEGUI/QAD_MessageBox.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; /*! \class QAD_MessageBox QAD_MessageBox.h \brief Message dialog box for QAD-based application. @@ -37,6 +36,7 @@ using namespace std; // QT Includes #include #include +using namespace std; /*! Shows info message box with one button [ static ] diff --git a/src/SALOMEGUI/QAD_ObjectBrowser.cxx b/src/SALOMEGUI/QAD_ObjectBrowser.cxx index eb8435512..9b7d93fc6 100644 --- a/src/SALOMEGUI/QAD_ObjectBrowser.cxx +++ b/src/SALOMEGUI/QAD_ObjectBrowser.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_ObjectBrowserItem.h" #include "QAD_ObjectBrowser.h" #include "QAD_Application.h" @@ -56,6 +55,7 @@ using namespace std; #include #include #include +using namespace std; //VRV: porting on Qt 3.0.5 #if QT_VERSION >= 0x030005 diff --git a/src/SALOMEGUI/QAD_ObjectBrowserItem.cxx b/src/SALOMEGUI/QAD_ObjectBrowserItem.cxx index 370358317..696fb78f4 100644 --- a/src/SALOMEGUI/QAD_ObjectBrowserItem.cxx +++ b/src/SALOMEGUI/QAD_ObjectBrowserItem.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_ObjectBrowserItem.h" #include @@ -34,6 +33,7 @@ using namespace std; #include #include #include +using namespace std; /*! Constructors diff --git a/src/SALOMEGUI/QAD_Operation.cxx b/src/SALOMEGUI/QAD_Operation.cxx index 87c99f194..42e0bb955 100644 --- a/src/SALOMEGUI/QAD_Operation.cxx +++ b/src/SALOMEGUI/QAD_Operation.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; /*! \class QAD_Operation QAD_Operation.h \brief Base class for OCAF operations in QAD-based application. @@ -39,6 +38,7 @@ using namespace std; // QT Include #include +using namespace std; /*! Constructor diff --git a/src/SALOMEGUI/QAD_OperatorMenus.cxx b/src/SALOMEGUI/QAD_OperatorMenus.cxx index 8ad4e40d0..34bc0290c 100644 --- a/src/SALOMEGUI/QAD_OperatorMenus.cxx +++ b/src/SALOMEGUI/QAD_OperatorMenus.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_OperatorMenus.h" #include "QAD_Desktop.h" +using namespace std; /*! Constructor. diff --git a/src/SALOMEGUI/QAD_ParserSettings.cxx b/src/SALOMEGUI/QAD_ParserSettings.cxx index b824dad2a..cb8fb7692 100644 --- a/src/SALOMEGUI/QAD_ParserSettings.cxx +++ b/src/SALOMEGUI/QAD_ParserSettings.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_ParserSettings.h" #include @@ -35,7 +34,7 @@ using namespace std; #include #include #include - +using namespace std; /*! Constructor. diff --git a/src/SALOMEGUI/QAD_Popup.cxx b/src/SALOMEGUI/QAD_Popup.cxx index aa2c65a93..9bd085b6b 100644 --- a/src/SALOMEGUI/QAD_Popup.cxx +++ b/src/SALOMEGUI/QAD_Popup.cxx @@ -26,10 +26,10 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD.h" #include "QAD_Popup.h" #include "utilities.h" +using namespace std; /***************************************************************************** ** Class QAD_PopupClientServer diff --git a/src/SALOMEGUI/QAD_PyEditor.cxx b/src/SALOMEGUI/QAD_PyEditor.cxx index 4dd3aa333..488a50cd6 100644 --- a/src/SALOMEGUI/QAD_PyEditor.cxx +++ b/src/SALOMEGUI/QAD_PyEditor.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_PyEditor.h" #include "QAD_PyInterp.h" #include "QAD_Application.h" @@ -35,6 +34,7 @@ using namespace std; #include "QAD_Tools.h" #include "QAD_MessageBox.h" //#include "QAD_RightFrame.h" +using namespace std; #include #include diff --git a/src/SALOMEGUI/QAD_PyInterp.cxx b/src/SALOMEGUI/QAD_PyInterp.cxx index 5f04d820f..d01da91fa 100644 --- a/src/SALOMEGUI/QAD_PyInterp.cxx +++ b/src/SALOMEGUI/QAD_PyInterp.cxx @@ -26,10 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; -using namespace std; #include "QAD_PyInterp.h" #include "utilities.h" +using namespace std; /*! * constructor : multi Python interpreter, one per SALOME study. diff --git a/src/SALOMEGUI/QAD_PyInterp_mono.cxx b/src/SALOMEGUI/QAD_PyInterp_mono.cxx index e1be19054..b733314d0 100644 --- a/src/SALOMEGUI/QAD_PyInterp_mono.cxx +++ b/src/SALOMEGUI/QAD_PyInterp_mono.cxx @@ -9,10 +9,9 @@ // Module : SALOME // $Header$ -using namespace std; -using namespace std; #include "QAD_PyInterp_mono.h" #include "utilities.h" +using namespace std; /*! * constructor : only one Python interpreter, shared within SALOME studies. diff --git a/src/SALOMEGUI/QAD_ResourceMgr.cxx b/src/SALOMEGUI/QAD_ResourceMgr.cxx index d116c7b33..317222e79 100644 --- a/src/SALOMEGUI/QAD_ResourceMgr.cxx +++ b/src/SALOMEGUI/QAD_ResourceMgr.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; /*! \class QAD_ResourceMgr QAD_ResourceMgr.h \brief ResourceMgr QAD-based application. @@ -46,6 +45,7 @@ using namespace std; #include #include +using namespace std; /* configuration file */ static const char* CONFIG_FILE = "config"; diff --git a/src/SALOMEGUI/QAD_RightFrame.cxx b/src/SALOMEGUI/QAD_RightFrame.cxx index 806a1503c..e1108f378 100644 --- a/src/SALOMEGUI/QAD_RightFrame.cxx +++ b/src/SALOMEGUI/QAD_RightFrame.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_RightFrame.h" #include "QAD_Application.h" #include "QAD_Desktop.h" @@ -39,6 +38,7 @@ using namespace std; // Open CASCADE Include #include +using namespace std; /*! \class QAD_RightFrame QAD_RightFrame.h diff --git a/src/SALOMEGUI/QAD_Settings.cxx b/src/SALOMEGUI/QAD_Settings.cxx index 14df2e8f3..d1fec9a21 100644 --- a/src/SALOMEGUI/QAD_Settings.cxx +++ b/src/SALOMEGUI/QAD_Settings.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_Settings.h" #include @@ -36,6 +35,7 @@ using namespace std; #include #include #include +using namespace std; /*! Class QAD_Settings is a base class for different kind of settings diff --git a/src/SALOMEGUI/QAD_SpinBoxDbl.cxx b/src/SALOMEGUI/QAD_SpinBoxDbl.cxx index 6bf31664c..dffa96919 100644 --- a/src/SALOMEGUI/QAD_SpinBoxDbl.cxx +++ b/src/SALOMEGUI/QAD_SpinBoxDbl.cxx @@ -9,7 +9,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_SpinBoxDbl.h" #include #include @@ -19,6 +18,7 @@ using namespace std; #include #include #include +using namespace std; //****************************************************************************** // QDblRangeControl class diff --git a/src/SALOMEGUI/QAD_Splitter.cxx b/src/SALOMEGUI/QAD_Splitter.cxx index cb472ea71..0d620f597 100644 --- a/src/SALOMEGUI/QAD_Splitter.cxx +++ b/src/SALOMEGUI/QAD_Splitter.cxx @@ -26,8 +26,8 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_Splitter.h" +using namespace std; /*! Constructs an horizontal splitter. diff --git a/src/SALOMEGUI/QAD_Study.cxx b/src/SALOMEGUI/QAD_Study.cxx index 1be9aef0e..166e8acf9 100644 --- a/src/SALOMEGUI/QAD_Study.cxx +++ b/src/SALOMEGUI/QAD_Study.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; /*! \class QAD_Study QAD_Study.h \brief Study for QAD-based application. @@ -59,6 +58,7 @@ using namespace std; // QT Include #include +using namespace std; /*! Constructor diff --git a/src/SALOMEGUI/QAD_StudyFrame.cxx b/src/SALOMEGUI/QAD_StudyFrame.cxx index 29bde65b1..d397302e0 100644 --- a/src/SALOMEGUI/QAD_StudyFrame.cxx +++ b/src/SALOMEGUI/QAD_StudyFrame.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; /*! \class QAD_StudyFrame QAD_StudyFrame.h \brief Frame window which contains QAD_LeftFrame and QAD_RightFrame. @@ -40,6 +39,7 @@ using namespace std; #include "QAD_Study.h" #include "QAD_ObjectBrowser.h" #include +using namespace std; /*! Constructor diff --git a/src/SALOMEGUI/QAD_Tools.cxx b/src/SALOMEGUI/QAD_Tools.cxx index e2e85bf53..dfa23e5c7 100644 --- a/src/SALOMEGUI/QAD_Tools.cxx +++ b/src/SALOMEGUI/QAD_Tools.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; /*! \class QAD_Tools QAD_Tools.h \brief Helpful functions for QAD. @@ -44,6 +43,7 @@ using namespace std; #include #include #include +using namespace std; static char* tempName() { diff --git a/src/SALOMEGUI/QAD_ViewFrame.cxx b/src/SALOMEGUI/QAD_ViewFrame.cxx index 6fa905371..b5c19c9b4 100644 --- a/src/SALOMEGUI/QAD_ViewFrame.cxx +++ b/src/SALOMEGUI/QAD_ViewFrame.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD.h" #include "QAD_ViewFrame.h" #include "QAD_Application.h" @@ -37,6 +36,7 @@ using namespace std; #include #include #include "utilities.h" +using namespace std; /*! Constructor diff --git a/src/SALOMEGUI/QAD_XmlHandler.cxx b/src/SALOMEGUI/QAD_XmlHandler.cxx index 2226782d4..85df10900 100644 --- a/src/SALOMEGUI/QAD_XmlHandler.cxx +++ b/src/SALOMEGUI/QAD_XmlHandler.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #define INCLUDE_MENUITEM_DEF #include "QAD_Desktop.h" @@ -41,6 +40,7 @@ using namespace std; #include #include #include +using namespace std; map QAD_XmlHandler::_bibmap; diff --git a/src/SALOMEGUI/SALOMEGUI_AboutDlg.cxx b/src/SALOMEGUI/SALOMEGUI_AboutDlg.cxx index 7ae5111de..fb7e59301 100644 --- a/src/SALOMEGUI/SALOMEGUI_AboutDlg.cxx +++ b/src/SALOMEGUI/SALOMEGUI_AboutDlg.cxx @@ -26,13 +26,13 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEGUI_AboutDlg.h" #include "QAD_Desktop.h" #include "QAD_Tools.h" #include #include #include +using namespace std; /* * Constructor diff --git a/src/SALOMEGUI/SALOMEGUI_ActivateComponentDlg.cxx b/src/SALOMEGUI/SALOMEGUI_ActivateComponentDlg.cxx index 7e326d083..b5e0ecd19 100644 --- a/src/SALOMEGUI/SALOMEGUI_ActivateComponentDlg.cxx +++ b/src/SALOMEGUI/SALOMEGUI_ActivateComponentDlg.cxx @@ -8,7 +8,6 @@ // Author : Michael Zorin (mzn) // Module : SALOME -using namespace std; #include "SALOMEGUI_ActivateComponentDlg.h" #include @@ -16,6 +15,7 @@ using namespace std; #include #include #include +using namespace std; SALOMEGUI_ActivateComponentDlg::SALOMEGUI_ActivateComponentDlg ( QWidget * parent, const char * name, bool modal, WFlags f ) diff --git a/src/SALOMEGUI/SALOMEGUI_Application.cxx b/src/SALOMEGUI/SALOMEGUI_Application.cxx index fa67befd6..faa38b44d 100644 --- a/src/SALOMEGUI/SALOMEGUI_Application.cxx +++ b/src/SALOMEGUI/SALOMEGUI_Application.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEGUI_Application.h" #include "SALOMEGUI_Desktop.h" #include "SALOMEGUI_ImportOperation.h" @@ -51,6 +50,7 @@ using namespace std; // Open CASCADE Include #include #include +using namespace std; /*! Constructor diff --git a/src/SALOMEGUI/SALOMEGUI_CloseDlg.cxx b/src/SALOMEGUI/SALOMEGUI_CloseDlg.cxx index 090d66ad2..556e10ca4 100644 --- a/src/SALOMEGUI/SALOMEGUI_CloseDlg.cxx +++ b/src/SALOMEGUI/SALOMEGUI_CloseDlg.cxx @@ -8,7 +8,6 @@ // Author : Vasily RUSYAEV (vrv) // Module : SALOME -using namespace std; #include "SALOMEGUI_CloseDlg.h" #include @@ -16,6 +15,7 @@ using namespace std; #include #include #include +using namespace std; SALOMEGUI_CloseDlg::SALOMEGUI_CloseDlg ( QWidget * parent, const char * name, bool modal, WFlags f ) diff --git a/src/SALOMEGUI/SALOMEGUI_Desktop.cxx b/src/SALOMEGUI/SALOMEGUI_Desktop.cxx index 63ce9dbe8..0b24b49b0 100644 --- a/src/SALOMEGUI/SALOMEGUI_Desktop.cxx +++ b/src/SALOMEGUI/SALOMEGUI_Desktop.cxx @@ -26,10 +26,10 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEGUI_Desktop.h" #include "SALOME_Selection.h" #include "SALOME_ListIteratorOfListIO.hxx" +using namespace std; #include CORBA_SERVER_HEADER(SALOMEDS_Attributes) diff --git a/src/SALOMEGUI/SALOMEGUI_ExternalBrowserDlg.cxx b/src/SALOMEGUI/SALOMEGUI_ExternalBrowserDlg.cxx index 9ad17ddc1..52de812f9 100644 --- a/src/SALOMEGUI/SALOMEGUI_ExternalBrowserDlg.cxx +++ b/src/SALOMEGUI/SALOMEGUI_ExternalBrowserDlg.cxx @@ -3,7 +3,6 @@ // Module : SALOME // $Header: /dn05/salome/CVS/SALOME_ROOT/SALOME/src/SALOMEGUI/SALOMEGUI_ExternalBrowserDlg.cxx -using namespace std; #include "SALOMEGUI_ExternalBrowserDlg.h" #include @@ -14,6 +13,7 @@ using namespace std; #include "QAD_FileDlg.h" #include "QAD_Tools.h" +using namespace std; /* * Constructs a modal SALOMEGUI_ExternalBowserDlg which is a child of 'parent' diff --git a/src/SALOMEGUI/SALOMEGUI_ImportOperation.cxx b/src/SALOMEGUI/SALOMEGUI_ImportOperation.cxx index 36c535e83..84e0c17ce 100644 --- a/src/SALOMEGUI/SALOMEGUI_ImportOperation.cxx +++ b/src/SALOMEGUI/SALOMEGUI_ImportOperation.cxx @@ -26,8 +26,8 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEGUI_ImportOperation.h" +using namespace std; SALOMEGUI_ImportOperation::SALOMEGUI_ImportOperation( QAD_Study* study ) : QAD_Operation( study ) diff --git a/src/SALOMEGUI/SALOMEGUI_LoadStudiesDlg.cxx b/src/SALOMEGUI/SALOMEGUI_LoadStudiesDlg.cxx index de3343aff..0e3c09dce 100644 --- a/src/SALOMEGUI/SALOMEGUI_LoadStudiesDlg.cxx +++ b/src/SALOMEGUI/SALOMEGUI_LoadStudiesDlg.cxx @@ -26,13 +26,13 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEGUI_LoadStudiesDlg.h" #include #include #include #include +using namespace std; #define SPACING_SIZE 6 #define MARGIN_SIZE 11 diff --git a/src/SALOMEGUI/SALOMEGUI_NameDlg.cxx b/src/SALOMEGUI/SALOMEGUI_NameDlg.cxx index 35d4b476f..3153d8317 100644 --- a/src/SALOMEGUI/SALOMEGUI_NameDlg.cxx +++ b/src/SALOMEGUI/SALOMEGUI_NameDlg.cxx @@ -9,7 +9,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEGUI_NameDlg.h" #include "QAD_Application.h" #include "QAD_Desktop.h" @@ -20,6 +19,7 @@ using namespace std; #include #include #include +using namespace std; /*! Constructor diff --git a/src/SALOMEGUI/SALOMEGUI_OpenWith.cxx b/src/SALOMEGUI/SALOMEGUI_OpenWith.cxx index 77cde2340..16664321e 100644 --- a/src/SALOMEGUI/SALOMEGUI_OpenWith.cxx +++ b/src/SALOMEGUI/SALOMEGUI_OpenWith.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEGUI_OpenWith.h" #include @@ -34,6 +33,7 @@ using namespace std; #include #include #include +using namespace std; #define SPACING_SIZE 6 #define MARGIN_SIZE 11 diff --git a/src/SALOMEGUI/SALOMEGUI_QtCatchCorbaException.cxx b/src/SALOMEGUI/SALOMEGUI_QtCatchCorbaException.cxx index 971433632..ede2c4366 100644 --- a/src/SALOMEGUI/SALOMEGUI_QtCatchCorbaException.cxx +++ b/src/SALOMEGUI/SALOMEGUI_QtCatchCorbaException.cxx @@ -26,12 +26,12 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEGUI_QtCatchCorbaException.hxx" #include "utilities.h" #include "QAD_Desktop.h" #include "QAD_MessageBox.h" +using namespace std; void QtCatchCorbaException(const SALOME::SALOME_Exception & S_ex) { diff --git a/src/SALOMEGUI/SALOMEGUI_SetValueDlg.cxx b/src/SALOMEGUI/SALOMEGUI_SetValueDlg.cxx index 3a8eb70f2..caa274038 100644 --- a/src/SALOMEGUI/SALOMEGUI_SetValueDlg.cxx +++ b/src/SALOMEGUI/SALOMEGUI_SetValueDlg.cxx @@ -9,7 +9,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEGUI_SetValueDlg.h" #include "QAD_Tools.h" @@ -19,6 +18,7 @@ using namespace std; #include #include #include +using namespace std; #define MARGIN_SIZE 11 #define SPACING_SIZE 6 diff --git a/src/SALOMEGUI/SALOMEGUI_SetupCurveDlg.cxx b/src/SALOMEGUI/SALOMEGUI_SetupCurveDlg.cxx index 15e5b4cb6..4265cb95d 100644 --- a/src/SALOMEGUI/SALOMEGUI_SetupCurveDlg.cxx +++ b/src/SALOMEGUI/SALOMEGUI_SetupCurveDlg.cxx @@ -9,7 +9,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEGUI_SetupCurveDlg.h" #include "QAD_Tools.h" #include @@ -20,6 +19,7 @@ using namespace std; #include #include #include +using namespace std; #define MARGIN_SIZE 11 #define SPACING_SIZE 6 diff --git a/src/SALOMEGUI/SALOMEGUI_StudyPropertiesDlg.cxx b/src/SALOMEGUI/SALOMEGUI_StudyPropertiesDlg.cxx index 0019a14dd..4d9a73281 100644 --- a/src/SALOMEGUI/SALOMEGUI_StudyPropertiesDlg.cxx +++ b/src/SALOMEGUI/SALOMEGUI_StudyPropertiesDlg.cxx @@ -9,7 +9,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEGUI_StudyPropertiesDlg.h" #include "QAD_Desktop.h" @@ -19,6 +18,7 @@ using namespace std; #include #include +using namespace std; #define DEFAULT_MARGIN 11 #define DEFAULT_SPACING 6 diff --git a/src/SALOMEGUI/SALOMEGUI_Swig.cxx b/src/SALOMEGUI/SALOMEGUI_Swig.cxx index 7103d349a..9bf557876 100644 --- a/src/SALOMEGUI/SALOMEGUI_Swig.cxx +++ b/src/SALOMEGUI/SALOMEGUI_Swig.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "QAD_Application.h" #include "QAD_Desktop.h" #include "QAD_Study.h" @@ -38,6 +37,7 @@ using namespace std; #include "SALOME_Selection.h" #include "SALOME_InteractiveObject.hxx" #include "SALOME_ListIteratorOfListIO.hxx" +using namespace std; /*! diff --git a/src/SALOMEGUI/SALOMEGUI_TableDlg.cxx b/src/SALOMEGUI/SALOMEGUI_TableDlg.cxx index 07c1b7bdb..59afc147b 100644 --- a/src/SALOMEGUI/SALOMEGUI_TableDlg.cxx +++ b/src/SALOMEGUI/SALOMEGUI_TableDlg.cxx @@ -9,7 +9,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEGUI_TableDlg.h" #include "QAD_Tools.h" #include "QAD_MessageBox.h" @@ -22,6 +21,7 @@ using namespace std; #include #include #include "utilities.h" +using namespace std; #define MARGIN_SIZE 11 #define SPACING_SIZE 6 diff --git a/src/SALOMEGUI/SALOMEGUI_TrihedronSizeDlg.cxx b/src/SALOMEGUI/SALOMEGUI_TrihedronSizeDlg.cxx index ed31165c3..8f78226ce 100644 --- a/src/SALOMEGUI/SALOMEGUI_TrihedronSizeDlg.cxx +++ b/src/SALOMEGUI/SALOMEGUI_TrihedronSizeDlg.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEGUI_TrihedronSizeDlg.h" #include @@ -34,6 +33,7 @@ using namespace std; #include #include #include +using namespace std; #define MARGIN_SIZE 11 #define SPACING_SIZE 6 diff --git a/src/SALOMEGUI/SALOMEGUI_ViewChoiceDlg.cxx b/src/SALOMEGUI/SALOMEGUI_ViewChoiceDlg.cxx index d091d18da..9451c8777 100644 --- a/src/SALOMEGUI/SALOMEGUI_ViewChoiceDlg.cxx +++ b/src/SALOMEGUI/SALOMEGUI_ViewChoiceDlg.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOMEGUI_ViewChoiceDlg.h" #include "QAD_Config.h" #include "QAD_StudyFrame.h" @@ -39,6 +38,7 @@ using namespace std; #include #include #include +using namespace std; /* * Constructs a SALOMEGUI_ViewChoiceDlg which is a child of 'parent', with the diff --git a/src/SALOMEGUI/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx b/src/SALOMEGUI/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx index 1fca36e3e..7cc57f40b 100644 --- a/src/SALOMEGUI/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx +++ b/src/SALOMEGUI/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx @@ -24,7 +24,6 @@ // File : SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx // Module : SALOME -using namespace std; #include "SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx" #ifndef _Standard_NoSuchObject_HeaderFile @@ -45,6 +44,7 @@ using namespace std; #ifndef _SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_HeaderFile #include "SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx" #endif +using namespace std; #define TheKey Handle_SALOME_InteractiveObject diff --git a/src/SALOMEGUI/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx b/src/SALOMEGUI/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx index 7fefc9c06..f58510533 100644 --- a/src/SALOMEGUI/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx +++ b/src/SALOMEGUI/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx @@ -24,7 +24,6 @@ // File : SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx // Module : SALOME -using namespace std; #include "SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx" #ifndef _Standard_TypeMismatch_HeaderFile @@ -46,6 +45,9 @@ using namespace std; #ifndef _SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_HeaderFile #include "SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx" #endif +using namespace std; + + SALOME_DataMapNodeOfDataMapOfIOMapOfInteger::~SALOME_DataMapNodeOfDataMapOfIOMapOfInteger() {} diff --git a/src/SALOMEGUI/SALOME_DataMapOfIOMapOfInteger_0.cxx b/src/SALOMEGUI/SALOME_DataMapOfIOMapOfInteger_0.cxx index 990e1bad6..9800abcf3 100644 --- a/src/SALOMEGUI/SALOME_DataMapOfIOMapOfInteger_0.cxx +++ b/src/SALOMEGUI/SALOME_DataMapOfIOMapOfInteger_0.cxx @@ -24,7 +24,6 @@ // File : SALOME_DataMapOfIOMapOfInteger_0.cxx // Module : SALOME -using namespace std; #include "SALOME_DataMapOfIOMapOfInteger.hxx" #ifndef _Standard_DomainError_HeaderFile @@ -48,6 +47,7 @@ using namespace std; #ifndef _SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_HeaderFile #include "SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx" #endif +using namespace std; #define TheKey Handle_SALOME_InteractiveObject diff --git a/src/SALOMEGUI/SALOME_Filter.cxx b/src/SALOMEGUI/SALOME_Filter.cxx index 2a095e50a..816c9869f 100644 --- a/src/SALOMEGUI/SALOME_Filter.cxx +++ b/src/SALOMEGUI/SALOME_Filter.cxx @@ -26,6 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOME_Filter.ixx" +using namespace std; diff --git a/src/SALOMEGUI/SALOME_ListIO.hxx b/src/SALOMEGUI/SALOME_ListIO.hxx index 861a7ac63..434a31f64 100644 --- a/src/SALOMEGUI/SALOME_ListIO.hxx +++ b/src/SALOMEGUI/SALOME_ListIO.hxx @@ -90,7 +90,9 @@ Standard_EXPORT void Clear() ; Standard_EXPORT Standard_Boolean IsEmpty() const; Standard_EXPORT void Prepend(const Handle(SALOME_InteractiveObject)& I) ; Standard_EXPORT void Prepend(SALOME_ListIO& Other) ; +Standard_EXPORT void Prepend(const Handle(SALOME_InteractiveObject)& I,SALOME_ListIteratorOfListIO& It); Standard_EXPORT void Append(const Handle(SALOME_InteractiveObject)& I) ; +Standard_EXPORT void Append(const Handle(SALOME_InteractiveObject)& I,SALOME_ListIteratorOfListIO& It); Standard_EXPORT void Append(SALOME_ListIO& Other) ; Standard_EXPORT Handle_SALOME_InteractiveObject& First() const; Standard_EXPORT Handle_SALOME_InteractiveObject& Last() const; diff --git a/src/SALOMEGUI/SALOME_ListIO_0.cxx b/src/SALOMEGUI/SALOME_ListIO_0.cxx index 0c5ee6097..71260fa5b 100644 --- a/src/SALOMEGUI/SALOME_ListIO_0.cxx +++ b/src/SALOMEGUI/SALOME_ListIO_0.cxx @@ -24,7 +24,6 @@ // File : SALOME_ListIO_0.cxx // Module : SALOME -using namespace std; #include "SALOME_ListIO.hxx" #ifndef _Standard_NoSuchObject_HeaderFile @@ -39,6 +38,7 @@ using namespace std; #ifndef _SALOME_ListNodeOfListIO_HeaderFile #include "SALOME_ListNodeOfListIO.hxx" #endif +using namespace std; #define Item Handle_SALOME_InteractiveObject diff --git a/src/SALOMEGUI/SALOME_ListIteratorOfListIO_0.cxx b/src/SALOMEGUI/SALOME_ListIteratorOfListIO_0.cxx index 928d94559..adb55ab72 100644 --- a/src/SALOMEGUI/SALOME_ListIteratorOfListIO_0.cxx +++ b/src/SALOMEGUI/SALOME_ListIteratorOfListIO_0.cxx @@ -24,7 +24,6 @@ // File : SALOME_ListIteratorOfListIO_0.cxx // Module : SALOME -using namespace std; #include "SALOME_ListIteratorOfListIO.hxx" #ifndef _Standard_NoMoreObject_HeaderFile @@ -42,6 +41,7 @@ using namespace std; #ifndef _SALOME_ListNodeOfListIO_HeaderFile #include "SALOME_ListNodeOfListIO.hxx" #endif +using namespace std; #define Item Handle_SALOME_InteractiveObject diff --git a/src/SALOMEGUI/SALOME_ListIteratorOfListOfFilter_0.cxx b/src/SALOMEGUI/SALOME_ListIteratorOfListOfFilter_0.cxx index 95cba8a29..57a0e587b 100644 --- a/src/SALOMEGUI/SALOME_ListIteratorOfListOfFilter_0.cxx +++ b/src/SALOMEGUI/SALOME_ListIteratorOfListOfFilter_0.cxx @@ -24,7 +24,6 @@ // File : SALOME_ListIteratorOfListOfFilter_0.cxx // Module : SALOME -using namespace std; #include "SALOME_ListIteratorOfListOfFilter.hxx" #ifndef _Standard_NoMoreObject_HeaderFile @@ -42,6 +41,7 @@ using namespace std; #ifndef _SALOME_ListNodeOfListOfFilter_HeaderFile #include "SALOME_ListNodeOfListOfFilter.hxx" #endif +using namespace std; #define Item Handle_SALOME_Filter diff --git a/src/SALOMEGUI/SALOME_ListNodeOfListIO_0.cxx b/src/SALOMEGUI/SALOME_ListNodeOfListIO_0.cxx index 95147d20d..932626022 100644 --- a/src/SALOMEGUI/SALOME_ListNodeOfListIO_0.cxx +++ b/src/SALOMEGUI/SALOME_ListNodeOfListIO_0.cxx @@ -24,7 +24,6 @@ // File : SALOME_ListNodeOfListIO_0.cxx // Module : SALOME -using namespace std; #include "SALOME_ListNodeOfListIO.hxx" #ifndef _Standard_TypeMismatch_HeaderFile @@ -40,6 +39,9 @@ using namespace std; #ifndef _SALOME_ListIteratorOfListIO_HeaderFile #include "SALOME_ListIteratorOfListIO.hxx" #endif +using namespace std; + + SALOME_ListNodeOfListIO::~SALOME_ListNodeOfListIO() {} diff --git a/src/SALOMEGUI/SALOME_ListNodeOfListOfFilter_0.cxx b/src/SALOMEGUI/SALOME_ListNodeOfListOfFilter_0.cxx index b89c9d1e7..6837e6fca 100644 --- a/src/SALOMEGUI/SALOME_ListNodeOfListOfFilter_0.cxx +++ b/src/SALOMEGUI/SALOME_ListNodeOfListOfFilter_0.cxx @@ -24,7 +24,6 @@ // File : SALOME_ListNodeOfListOfFilter_0.cxx // Module : SALOME -using namespace std; #include "SALOME_ListNodeOfListOfFilter.hxx" #ifndef _Standard_TypeMismatch_HeaderFile @@ -40,6 +39,10 @@ using namespace std; #ifndef _SALOME_ListIteratorOfListOfFilter_HeaderFile #include "SALOME_ListIteratorOfListOfFilter.hxx" #endif +using namespace std; + + + SALOME_ListNodeOfListOfFilter::~SALOME_ListNodeOfListOfFilter() {} diff --git a/src/SALOMEGUI/SALOME_ListOfFilter.hxx b/src/SALOMEGUI/SALOME_ListOfFilter.hxx index 7b4b9c2ac..fef6bfd5c 100644 --- a/src/SALOMEGUI/SALOME_ListOfFilter.hxx +++ b/src/SALOMEGUI/SALOME_ListOfFilter.hxx @@ -94,8 +94,10 @@ Standard_EXPORT void Clear() ; Standard_EXPORT inline Standard_Boolean IsEmpty() const; Standard_EXPORT void Prepend(const Handle(SALOME_Filter)& I) ; Standard_EXPORT void Prepend(SALOME_ListOfFilter& Other) ; +Standard_EXPORT void Prepend(const Handle(SALOME_Filter)& I,SALOME_ListIteratorOfListOfFilter& It); Standard_EXPORT void Append(const Handle(SALOME_Filter)& I) ; Standard_EXPORT void Append(SALOME_ListOfFilter& Other) ; +Standard_EXPORT void Append(const Handle(SALOME_Filter)& I,SALOME_ListIteratorOfListOfFilter& It); Standard_EXPORT Handle_SALOME_Filter& First() const; Standard_EXPORT Handle_SALOME_Filter& Last() const; Standard_EXPORT void RemoveFirst() ; diff --git a/src/SALOMEGUI/SALOME_ListOfFilter_0.cxx b/src/SALOMEGUI/SALOME_ListOfFilter_0.cxx index 6dbbdaacf..8b30df9f6 100644 --- a/src/SALOMEGUI/SALOME_ListOfFilter_0.cxx +++ b/src/SALOMEGUI/SALOME_ListOfFilter_0.cxx @@ -24,7 +24,6 @@ // File : SALOME_ListOfFilter_0.cxx // Module : SALOME -using namespace std; #include "SALOME_ListOfFilter.hxx" #ifndef _Standard_NoSuchObject_HeaderFile @@ -39,6 +38,7 @@ using namespace std; #ifndef _SALOME_ListNodeOfListOfFilter_HeaderFile #include "SALOME_ListNodeOfListOfFilter.hxx" #endif +using namespace std; #define Item Handle_SALOME_Filter diff --git a/src/SALOMEGUI/SALOME_NumberFilter.cxx b/src/SALOMEGUI/SALOME_NumberFilter.cxx index 3574d8d64..cdc63948e 100644 --- a/src/SALOMEGUI/SALOME_NumberFilter.cxx +++ b/src/SALOMEGUI/SALOME_NumberFilter.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOME_NumberFilter.ixx" #include "SALOME_Selection.h" #include "SALOME_InteractiveObject.hxx" @@ -34,6 +33,7 @@ using namespace std; #include "QAD_Application.h" #include "QAD_Desktop.h" #include "QAD_Study.h" +using namespace std; SALOME_NumberFilter::SALOME_NumberFilter(NumberFilter TheKind, Standard_Integer aValue): myKind(TheKind), diff --git a/src/SALOMEGUI/SALOME_Selection.cxx b/src/SALOMEGUI/SALOME_Selection.cxx index 3e79a6c6d..c5477bd63 100644 --- a/src/SALOMEGUI/SALOME_Selection.cxx +++ b/src/SALOMEGUI/SALOME_Selection.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; /*! \class SALOME_Selection SALOME_Selection.h \brief Selection Mechanism of Interactive Object. @@ -40,6 +39,7 @@ using namespace std; #include "QAD_Desktop.h" #include "utilities.h" +using namespace std; static QList& SALOME_Sel_GetSelections() { diff --git a/src/SALOMEGUI/SALOME_TypeFilter.cxx b/src/SALOMEGUI/SALOME_TypeFilter.cxx index 4bc2a5246..83f1d71ec 100644 --- a/src/SALOMEGUI/SALOME_TypeFilter.cxx +++ b/src/SALOMEGUI/SALOME_TypeFilter.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; #include "SALOME_TypeFilter.ixx" #include "SALOME_InteractiveObject.hxx" +using namespace std; SALOME_TypeFilter::SALOME_TypeFilter(const Standard_CString TheKind): myKind(TheKind){} diff --git a/src/SALOMELocalTrace/SALOME_Log.cxx b/src/SALOMELocalTrace/SALOME_Log.cxx index 328d2fc49..c7059d855 100644 --- a/src/SALOMELocalTrace/SALOME_Log.cxx +++ b/src/SALOMELocalTrace/SALOME_Log.cxx @@ -29,9 +29,8 @@ #include #include -using namespace std; - #include "SALOME_Log.hxx" +using namespace std; SALOME_Log* SALOME_Log::_singleton = 0; diff --git a/src/SALOMELocalTrace/SALOME_Log.hxx b/src/SALOMELocalTrace/SALOME_Log.hxx index af4f565da..30694062b 100644 --- a/src/SALOMELocalTrace/SALOME_Log.hxx +++ b/src/SALOMELocalTrace/SALOME_Log.hxx @@ -61,11 +61,11 @@ # endif /* WNT */ -using namespace std; #include #include +using namespace std; class SALOME_Log : public ostrstream { diff --git a/src/SALOME_PY/SalomePy.cxx b/src/SALOME_PY/SalomePy.cxx index 494692324..76e643d9f 100644 --- a/src/SALOME_PY/SalomePy.cxx +++ b/src/SALOME_PY/SalomePy.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include #include #include @@ -38,6 +37,7 @@ using namespace std; #include "QAD_Application.h" #include "QAD_Desktop.h" #include "VTKViewer_ViewFrame.h" +using namespace std; extern "C" { diff --git a/src/SALOME_PYQT/Makefile.in b/src/SALOME_PYQT/Makefile.in index 146f123c1..06a168bd7 100644 --- a/src/SALOME_PYQT/Makefile.in +++ b/src/SALOME_PYQT/Makefile.in @@ -20,7 +20,7 @@ VPATH=.:@srcdir@:@top_srcdir@/idl # SIP C++ Python # SIP defined in make_commence.in -SIP_FLAGS = -t WS_X11 -t Qt_3_0_5 -s ".cc" -c $(CURDIR) -I $(PYQT_SIPS) +SIP_FLAGS = -t WS_X11 -t Qt_3_0_5 -s ".cc" -c $(CURDIR) $(PYQT_INCLUDES) # SIP input file(s) @@ -50,7 +50,7 @@ LIB_CLIENT_IDL = SALOME_Exception.idl CPPFLAGS+=$(QT_INCLUDES) $(PYTHON_INCLUDES) $(SIP_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) LIBS+= $(PYTHON_LIBS) $(SIP_LIBS) $(PYQT_LIBS) $(VTK_LIBS) $(OGL_LIBS) -LDFLAGS+= -lSalomeGUI -lqtcmodule +LDFLAGS+= -lSalomeGUI # Custom build step: generate C++ wrapping according to $(SIP_FILES) diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI.cxx b/src/SALOME_PYQT/SALOME_PYQT_GUI.cxx index 6d6e6b92a..f2a23e6a9 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI.cxx +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI.cxx @@ -1,4 +1,3 @@ -using namespace std; //============================================================================= // File : SALOME_PYQT_GUI.cxx // Created : mer jun 4 17:17:20 UTC 2003 @@ -26,6 +25,7 @@ using namespace std; #include #include +using namespace std; static PyInterp_PyQt *interp = NULL; static map mapInterp; diff --git a/src/SALOME_PYQT/SalomePyQt.cxx b/src/SALOME_PYQT/SalomePyQt.cxx index 11d2fe9ce..d6421eb31 100644 --- a/src/SALOME_PYQT/SalomePyQt.cxx +++ b/src/SALOME_PYQT/SalomePyQt.cxx @@ -5,7 +5,6 @@ // File : SalomePyQt.cxx // Module : SALOME -using namespace std; #include "SalomePyQt.hxx" #include "QAD_Application.h" @@ -15,6 +14,7 @@ using namespace std; #include "QAD_Config.h" #include "QAD_Settings.h" +using namespace std; QWidget* SalomePyQt::getDesktop() { diff --git a/src/SUPERVGraph/SUPERVGraph.cxx b/src/SUPERVGraph/SUPERVGraph.cxx index 140853bb9..70524b061 100644 --- a/src/SUPERVGraph/SUPERVGraph.cxx +++ b/src/SUPERVGraph/SUPERVGraph.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; #include "SUPERVGraph.h" #include "SUPERVGraph_ViewFrame.h" +using namespace std; QAD_ViewFrame* SUPERVGraph::createView(QAD_RightFrame* parent) { diff --git a/src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx b/src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx index 01fa60ce2..439ffa15a 100644 --- a/src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx +++ b/src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "SUPERVGraph_ViewFrame.h" #include "QAD_Settings.h" @@ -40,6 +39,7 @@ using namespace std; //QT Include #include #include +using namespace std; SUPERVGraph_View::SUPERVGraph_View(QWidget* theParent): QWidget(theParent){ init(theParent); diff --git a/src/Session/SALOME_Session_QThread.cxx b/src/Session/SALOME_Session_QThread.cxx index 8c598f1da..bdd9910f2 100644 --- a/src/Session/SALOME_Session_QThread.cxx +++ b/src/Session/SALOME_Session_QThread.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include #include @@ -43,6 +42,7 @@ using namespace std; // only to use findFile method : perhaps put it in QAD_Tools ??? #include "QAD_ResourceMgr.h" #include +using namespace std; #include diff --git a/src/Session/SALOME_Session_i.cxx b/src/Session/SALOME_Session_i.cxx index 154848f21..dc16fae7d 100644 --- a/src/Session/SALOME_Session_i.cxx +++ b/src/Session/SALOME_Session_i.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "utilities.h" #include "SALOME_Session_i.hxx" @@ -41,6 +40,7 @@ using namespace std; #include #include #include +using namespace std; //============================================================================= /*! SALOME_Session_i diff --git a/src/TOOLSDS/SALOMEDS_Tool.cxx b/src/TOOLSDS/SALOMEDS_Tool.cxx index 210c42739..ae7937d7d 100644 --- a/src/TOOLSDS/SALOMEDS_Tool.cxx +++ b/src/TOOLSDS/SALOMEDS_Tool.cxx @@ -1,4 +1,3 @@ -using namespace std; // File : SALOMEDS_Tool.cxx // Created : Mon Oct 21 16:24:34 2002 // Author : Sergey RUIN @@ -13,8 +12,8 @@ using namespace std; #include #include -#include -#include +#include +#include #include #include #include @@ -23,6 +22,7 @@ using namespace std; #include #include #include +using namespace std; #include #include diff --git a/src/TOOLSGUI/ToolsGUI.cxx b/src/TOOLSGUI/ToolsGUI.cxx index 4b2f47089..7e98ad7b1 100644 --- a/src/TOOLSGUI/ToolsGUI.cxx +++ b/src/TOOLSGUI/ToolsGUI.cxx @@ -26,13 +26,13 @@ // Module : SALOME // $Header$ -using namespace std; #include "ToolsGUI.h" #include "ToolsGUI_CatalogGeneratorDlg.h" #include "utilities.h" #include +using namespace std; int ToolsGUI::runCommand(string & arg) { diff --git a/src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.cxx b/src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.cxx index 5c774aa8e..9dc3c696a 100644 --- a/src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.cxx +++ b/src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.cxx @@ -27,7 +27,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "ToolsGUI_CatalogGeneratorDlg.h" #include "QAD_Application.h" @@ -49,6 +48,7 @@ using namespace std; #include #include #include +using namespace std; #define SPACING_SIZE 6 #define MARGIN_SIZE 11 diff --git a/src/TestContainer/SALOME_TestComponent_i.cxx b/src/TestContainer/SALOME_TestComponent_i.cxx index 85f49d22b..0bb4fa785 100644 --- a/src/TestContainer/SALOME_TestComponent_i.cxx +++ b/src/TestContainer/SALOME_TestComponent_i.cxx @@ -26,10 +26,10 @@ // Module : SALOME // $Header$ -using namespace std; #include "utilities.h" #include "SALOME_TestComponent_i.hxx" #include +using namespace std; Engines_TestComponent_i::Engines_TestComponent_i(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, diff --git a/src/TestContainer/TestContainer.cxx b/src/TestContainer/TestContainer.cxx index d1f1c35bb..3ebb10ee2 100644 --- a/src/TestContainer/TestContainer.cxx +++ b/src/TestContainer/TestContainer.cxx @@ -148,7 +148,7 @@ int main (int argc, char * argv[]) for (int iter = 0; iter < 3 ; iter++) { INFOS("----------------------------------------------------" << iter); - string dirn = getenv("SALOME_ROOT_DIR"); + string dirn = getenv("KERNEL_ROOT_DIR"); dirn += "/lib/salome/libSalomeTestComponentEngine.so"; obj = iGenFact->load_impl("SalomeTestComponent",dirn.c_str()); m1 = Engines::TestComponent::_narrow(obj); diff --git a/src/TestContainer/TestLogger.cxx b/src/TestContainer/TestLogger.cxx index a844dc7a7..989537652 100644 --- a/src/TestContainer/TestLogger.cxx +++ b/src/TestContainer/TestLogger.cxx @@ -26,13 +26,13 @@ // Module : SALOME // $Header$ -using namespace std; #include "utilities.h" #include #include #include #include "SALOME_NamingService.hxx" #include "OpUtil.hxx" +using namespace std; int main (int argc, char * argv[]) { diff --git a/src/TestMPIContainer/Makefile.in b/src/TestMPIContainer/Makefile.in new file mode 100644 index 000000000..59ba1abad --- /dev/null +++ b/src/TestMPIContainer/Makefile.in @@ -0,0 +1,37 @@ +#============================================================================== +# 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 + +# Executables targets +BIN = TestMPIContainer +BIN_SRC = +BIN_CLIENT_IDL = Logger.idl SALOME_MPIObject.idl SALOME_MPIContainer.idl SALOME_TestMPIComponent.idl +BIN_SERVER_IDL = + +LDFLAGS+= -lSalomeNotification -lSalomeNS -lSalomeMPILifeCycleCORBA -lSalomeLifeCycleCORBA -lSalomeMPIContainer -lSalomeContainer -lRegistry -lOpUtil -lSALOMELocalTrace + + +@CONCLUDE@ diff --git a/src/TestMPIContainer/TestMPIComponentEngine.cxx b/src/TestMPIContainer/TestMPIComponentEngine.cxx new file mode 100644 index 000000000..b0bf10b0c --- /dev/null +++ b/src/TestMPIContainer/TestMPIComponentEngine.cxx @@ -0,0 +1,77 @@ +//============================================================================= +// File : TestMPIComponentEngine.cxx +// Created : mer jui 4 12:28:26 CEST 2003 +// Author : Bernard SECHER, 2003 +// Project : SALOME +// Copyright : CEA 2003 +// $Header$ +//============================================================================= + +#include "utilities.h" +#include "TestMPIComponentEngine.hxx" +using namespace std; + +TestMPIComponentEngine::TestMPIComponentEngine(int nbproc, int numproc, + CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName, + bool regist) : + Engines_Component_i(orb, poa, contId, instanceName, interfaceName,true,regist), MPIObject_i(nbproc,numproc) +{ + MESSAGE("activate object") + _thisObj = this ; + _id = _poa->activate_object(_thisObj); +} + +TestMPIComponentEngine::TestMPIComponentEngine(): Engines_Component_i(), MPIObject_i() +{ +} + +TestMPIComponentEngine::~TestMPIComponentEngine() +{ +} + +void TestMPIComponentEngine::Coucou(CORBA::Long L) +{ + BEGIN_OF("[" << _numproc << "] TestMPIComponentEngine::Coucou()"); + if(_numproc==0) + for(int ip=1;ip<_nbproc;ip++) + Engines::TestMPIComponent::_narrow((*_tior)[ip])->SPCoucou(L); + MESSAGE("[" << _numproc << "] TestMPIComponentEngine : L = " << L); + END_OF("[" << _numproc << "] TestMPIComponentEngine::Coucou()"); +} + +void TestMPIComponentEngine::SPCoucou(CORBA::Long L) +{ + BEGIN_OF("[" << _numproc << "] TestMPIComponentEngine::SPCoucou()"); + MESSAGE("[" << _numproc << "] TestMPIComponentEngine : L = " << L); + END_OF("[" << _numproc << "] TestMPIComponentEngine::SPCoucou()"); +} + +extern "C" +{ + PortableServer::ObjectId * TestMPIComponentEngine_factory( + int nbproc, int numproc, + CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName) + { + bool regist; + TestMPIComponentEngine * myTestMPIComponent; + MESSAGE("[" << numproc << "] PortableServer::ObjectId * TestMPIComponentEngine_factory()"); + SCRUTE(interfaceName); + if(numproc==0) + regist = true; + else + regist = false; + + myTestMPIComponent + = new TestMPIComponentEngine(nbproc,numproc,orb, poa, contId, instanceName, interfaceName,regist); + return myTestMPIComponent->getId() ; + } +} + diff --git a/src/TestMPIContainer/TestMPIComponentEngine.hxx b/src/TestMPIContainer/TestMPIComponentEngine.hxx new file mode 100644 index 000000000..4e520012a --- /dev/null +++ b/src/TestMPIContainer/TestMPIComponentEngine.hxx @@ -0,0 +1,40 @@ +//============================================================================= +// File : TestMPIComponentEngine.hxx +// Created : mer jui 4 12:28:30 CEST 2003 +// Author : Bernard SECHER, CEA +// Project : SALOME +// Copyright : CEA 2003 +// $Header$ +//============================================================================= + +#ifndef _SALOME_TESTCOMPONENT_I_HXX_ +#define _SALOME_TESTCOMPONENT_I_HXX_ + +#include +#include +#include CORBA_SERVER_HEADER(SALOME_TestMPIComponent) +#include "SALOME_Component_i.hxx" +#include "MPIObject_i.hxx" + +class TestMPIComponentEngine: + public POA_Engines::TestMPIComponent, + public Engines_Component_i, public MPIObject_i +{ +public: + TestMPIComponentEngine(); + TestMPIComponentEngine(int nbproc, int numproc, + CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName, + bool regist); + + virtual ~TestMPIComponentEngine(); + + void Coucou(CORBA::Long L); + void SPCoucou(CORBA::Long L); + +}; + +#endif diff --git a/src/TestMPIContainer/TestMPIContainer.cxx b/src/TestMPIContainer/TestMPIContainer.cxx new file mode 100644 index 000000000..3f753af5d --- /dev/null +++ b/src/TestMPIContainer/TestMPIContainer.cxx @@ -0,0 +1,134 @@ +// using namespace std; +//============================================================================= +// File : TestMPIContainer.cxx +// Created : mer jui 4 13:11:27 CEST 2003 +// Author : Bernard SECHER, 2003 +// Project : SALOME +// Copyright : CEA 2003 +// $Header$ +//============================================================================= + +#include "utilities.h" +#include +#include +#include +#include +#include CORBA_CLIENT_HEADER(SALOME_MPIContainer) +#include CORBA_CLIENT_HEADER(SALOME_TestMPIComponent) + +# include "Utils_ORB_INIT.hxx" +# include "Utils_SINGLETON.hxx" +#include "SALOME_NamingService.hxx" +#include "OpUtil.hxx" + +int main (int argc, char * argv[]) +{ + + try{ + + int status; + + MESSAGE("COUCOU"); + if( argc != 3 || strcmp(argv[1],"-np") ){ + cout << "Usage: TestMPIContainer -np nbproc" << endl; + exit(0); + } + + // Initializing omniORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); + + // Obtain a reference to the root POA + CORBA::Object_var obj = orb->resolve_initial_references("RootPOA") ; + PortableServer::POA_var poa = PortableServer::POA::_narrow(obj) ; + + // Use Name Service to find container + SALOME_NamingService NS(orb) ; + string containerName = "/Containers/" ; + string hostName = GetHostname(); + containerName += hostName + "/MPIFactoryServer_" + argv[2]; + + MESSAGE(containerName); + + string dirn(getenv("KERNEL_ROOT_DIR")); + dirn += "/lib/salome/libSalomeTestMPIComponentEngine.so"; + MESSAGE(dirn.c_str()); + + // Try to resolve MPI Container + obj = NS.Resolve(containerName.c_str()) ; + Engines::Container_var iGenFact = Engines::Container::_narrow(obj); + + if(CORBA::is_nil(iGenFact)){ + + // Launch MPI Container + string cmd("mpirun -np "); + cmd += argv[2]; + cmd += " "; + cmd += getenv("KERNEL_ROOT_DIR"); + cmd += "/bin/salome/SALOME_MPIContainer MPIFactoryServer_"; + cmd += argv[2]; + cmd += " &"; + MESSAGE(cmd); + status = system(cmd.c_str()); + if (status == -1) { + INFOS("TestMPIContainer launch MPI Container failed (system command status -1)") ; + } + else if (status == 217) { + INFOS("TestMPIContainer launch MPI Container failed (system command status 217)") ; + } + + // Try to resolve MPI Container + int it = 0; + do{ + sleep(1); + obj = NS.Resolve(containerName.c_str()) ; + iGenFact = Engines::Container::_narrow(obj); + MESSAGE("Waiting for MPI Container " << containerName << " : it = " << it ); + }while( CORBA::is_nil(iGenFact) && (it++<15) ); + + } + + if(CORBA::is_nil(iGenFact)){ + MESSAGE("echec recuperation poignee container"); + exit(1); + } + + Engines::TestMPIComponent_var m1; + + for (int iter = 0; iter < 1 ; iter++){ + MESSAGE("----------------------------------------------------" << iter); + obj = iGenFact->load_impl("TestMPIComponent",dirn.c_str()); + + m1 = Engines::TestMPIComponent::_narrow(obj); + if(CORBA::is_nil(m1)){ + INFOS("echec recuperation poignee composant"); + } + else{ + + INFOS("recup m1"); + SCRUTE(m1->instanceName()); + INFOS("Lancement de coucou"); + m1->Coucou(1L); + INFOS("On remove le composant"); + iGenFact->remove_impl(m1) ; + sleep(5); + } + } + // Clean-up. + iGenFact->finalize_removal() ; + orb->destroy(); + } + catch(CORBA::COMM_FAILURE& ex) { + INFOS("Caught system exception COMM_FAILURE -- unable to contact the object."); + } + catch(CORBA::SystemException&) { + INFOS("Caught a CORBA::SystemException."); + } + catch(CORBA::Exception&) { + INFOS("Caught CORBA::Exception."); + } + catch(...) { + INFOS("Caught unknown exception."); + } + + return 0; +} diff --git a/src/Utils/Utils_CommException.cxx b/src/Utils/Utils_CommException.cxx index d4e953d86..0dae2c1bf 100644 --- a/src/Utils/Utils_CommException.cxx +++ b/src/Utils/Utils_CommException.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; # include "Utils_CommException.hxx" CommException::CommException( void ): SALOME_Exception( "CommException" ) diff --git a/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx b/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx index 50737af05..650d8dfe1 100644 --- a/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx +++ b/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx @@ -26,13 +26,13 @@ // Module : SALOME // $Header$ -using namespace std; void Nettoyage( void ) ; # include # include "utilities.h" # include "Utils_DESTRUCTEUR_GENERIQUE.hxx" # include +using namespace std; extern "C" { # include diff --git a/src/Utils/Utils_ORB_INIT.cxx b/src/Utils/Utils_ORB_INIT.cxx index 0f39159ec..c91a525e6 100644 --- a/src/Utils/Utils_ORB_INIT.cxx +++ b/src/Utils/Utils_ORB_INIT.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; # include "Utils_ORB_INIT.hxx" # include "utilities.h" diff --git a/src/Utils/Utils_SALOME_Exception.cxx b/src/Utils/Utils_SALOME_Exception.cxx index 06f4a26f4..d91ca119f 100644 --- a/src/Utils/Utils_SALOME_Exception.cxx +++ b/src/Utils/Utils_SALOME_Exception.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include #include "Utils_SALOME_Exception.hxx" #include "utilities.h" @@ -34,9 +33,9 @@ extern "C" { #include #include -#include } - +#include +using namespace std; const char* duplicate( const char *const str ) ; @@ -48,7 +47,7 @@ SALOME_Exception::SALOME_Exception( void ): exception() , _text(0) -const char *makeText( const char *text, const char *fileName, const unsigned int lineNumber ) +char *makeText( const char *text, const char *fileName, const unsigned int lineNumber ) { char *newText = 0 ; @@ -89,16 +88,14 @@ SALOME_Exception::~SALOME_Exception() throw () { if ( _text ) { - delete [] _text ; - char *& txt = (char*)_text ; - txt = 0 ; + delete [] _text ; + _text = NULL; } - ASSERT(_text==NULL) ; } -SALOME_Exception::SALOME_Exception( const SALOME_Exception &ex ): _text(duplicate(ex._text)) +SALOME_Exception::SALOME_Exception( const SALOME_Exception &ex ): _text((char*)duplicate(ex._text)) { ; } diff --git a/src/Utils/Utils_SALOME_Exception.hxx b/src/Utils/Utils_SALOME_Exception.hxx index f7e9a3a67..a60f61d1c 100644 --- a/src/Utils/Utils_SALOME_Exception.hxx +++ b/src/Utils/Utils_SALOME_Exception.hxx @@ -29,20 +29,20 @@ #if !defined( __Utils_SALOME_Exception_hxx__ ) #define __Utils_SALOME_Exception_hxx__ -using namespace std; # include # include +using namespace std; # define LOCALIZED(message) #message , __FILE__ , __LINE__ -class SALOME_Exception : public exception +class SALOME_Exception : public std::exception { private : SALOME_Exception( void ); protected : - const char* _text ; // pointeur constant et zone pointee constante !!!! + char* _text ; // pointeur public : SALOME_Exception( const char *text, const char *fileName=0, const unsigned int lineNumber=0 ); diff --git a/src/Utils/Utils_Timer.cxx b/src/Utils/Utils_Timer.cxx index c2748f6ec..82dd013f1 100644 --- a/src/Utils/Utils_Timer.cxx +++ b/src/Utils/Utils_Timer.cxx @@ -25,7 +25,7 @@ // Module : SALOME # include "Utils_Timer.hxx" -# include +# include using namespace std; static struct timezone *tz=(struct timezone*) malloc(sizeof(struct timezone)); diff --git a/src/Utils/utilities.h b/src/Utils/utilities.h index f396321e8..f8b86b71e 100644 --- a/src/Utils/utilities.h +++ b/src/Utils/utilities.h @@ -50,6 +50,8 @@ #define COMPILER "KCC" #elif defined ( __PGI ) #define COMPILER "pgCC" +#elif defined ( __alpha ) +#define COMPILER "cxx" #else #define COMPILER "undefined" #endif diff --git a/src/VTKViewer/VTKViewer.cxx b/src/VTKViewer/VTKViewer.cxx index 796028060..a0c60854e 100644 --- a/src/VTKViewer/VTKViewer.cxx +++ b/src/VTKViewer/VTKViewer.cxx @@ -26,9 +26,9 @@ // Module : SALOME // $Header$ -using namespace std; #include "VTKViewer.h" #include "VTKViewer_ViewFrame.h" +using namespace std; QAD_ViewFrame* VTKViewer::createView(QAD_RightFrame* parent) { diff --git a/src/VTKViewer/VTKViewer_RenderWindow.cxx b/src/VTKViewer/VTKViewer_RenderWindow.cxx index 7712ec01e..6aef5fb7a 100644 --- a/src/VTKViewer/VTKViewer_RenderWindow.cxx +++ b/src/VTKViewer/VTKViewer_RenderWindow.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "VTKViewer_RenderWindow.h" #include "utilities.h" #include "QAD_Settings.h" @@ -46,6 +45,7 @@ using namespace std; #include #include #include +using namespace std; //#include //#include diff --git a/src/VTKViewer/VTKViewer_ViewFrame.cxx b/src/VTKViewer/VTKViewer_ViewFrame.cxx index 8f9e8e286..061a6c4da 100644 --- a/src/VTKViewer/VTKViewer_ViewFrame.cxx +++ b/src/VTKViewer/VTKViewer_ViewFrame.cxx @@ -30,7 +30,12 @@ #include "VTKViewer_Utilities.h" #include "VTKViewer_Trihedron.h" #include "VTKViewer_RenderWindow.h" -#include "VTKViewer_InteractorStyleSALOME.h" +//#include "VTKViewer_InteractorStyleSALOME.h" + +#include "SALOME_Transform.h" +#include "SALOME_TransformFilter.h" +#include "SALOME_PassThroughFilter.h" +#include "SALOME_GeometryFilter.h" #include "SALOME_Transform.h" #include "SALOME_TransformFilter.h" @@ -43,6 +48,7 @@ #include "QAD_Desktop.h" #include "SALOME_Selection.h" #include "SALOME_InteractiveObject.hxx" +#include "VTKViewer_InteractorStyleSALOME.h" #include "utilities.h" -- 2.39.2