Salome HOME
PR: mergefrom_BSEC_br1_14Mar04
authorprascle <prascle>
Wed, 17 Mar 2004 08:13:41 +0000 (08:13 +0000)
committerprascle <prascle>
Wed, 17 Mar 2004 08:13:41 +0000 (08:13 +0000)
272 files changed:
Makefile.in
bin/runSalome.py
configure.in.base
idl/Makefile.in
idl/SALOME_MPIContainer.idl [new file with mode: 0644]
idl/SALOME_MPIObject.idl [new file with mode: 0644]
idl/SALOME_TestMPIComponent.idl [new file with mode: 0644]
salome_adm/unix/config_files/ac_cxx_depend_flag.m4
salome_adm/unix/config_files/ac_cxx_option.m4 [new file with mode: 0644]
salome_adm/unix/config_files/ac_cxx_template_options.m4 [new file with mode: 0644]
salome_adm/unix/config_files/ac_cxx_use_std_iostream.m4 [new file with mode: 0644]
salome_adm/unix/config_files/ac_cxx_warnings.m4 [new file with mode: 0644]
salome_adm/unix/config_files/ac_linker_options.m4 [new file with mode: 0644]
salome_adm/unix/config_files/check_cas.m4
salome_adm/unix/config_files/check_htmlgen.m4
salome_adm/unix/config_files/check_mpi.m4 [new file with mode: 0644]
salome_adm/unix/config_files/check_mpich.m4
salome_adm/unix/config_files/check_pthreads.m4
salome_adm/unix/config_files/check_pyqt.m4
salome_adm/unix/config_files/check_qt.m4
salome_adm/unix/config_files/check_sip.m4
salome_adm/unix/config_files/check_vtk.m4
salome_adm/unix/config_files/production.m4
salome_adm/unix/config_files/python.m4
salome_adm/unix/depend.in
salome_adm/unix/make_commence.in
salome_adm/unix/make_conclude.in
src/Container/Component_i.cxx
src/Container/Container_i.cxx
src/Container/Makefile.in
src/Container/SALOME_Component_i.hxx
src/Container/SALOME_Container_i.hxx
src/DataTypeCatalog/SALOME_DataTypeCatalog_Client.cxx
src/DataTypeCatalog/SALOME_DataTypeCatalog_Handler.cxx
src/DataTypeCatalog/SALOME_DataTypeCatalog_Server.cxx
src/DataTypeCatalog/SALOME_DataTypeCatalog_impl.cxx
src/HDFPersist/HDFascii.cc
src/HDFPersist/HDFattribute.cc
src/HDFPersist/HDFcontainerObject.cc
src/HDFPersist/HDFconvert.cc
src/HDFPersist/HDFconvert.hxx
src/HDFPersist/HDFdataset.cc
src/HDFPersist/HDFexception.hxx
src/HDFPersist/HDFexplorer.cc
src/HDFPersist/HDFfile.cc
src/HDFPersist/HDFgroup.cc
src/HDFPersist/HDFinternalObject.cc
src/HDFPersist/HDFobject.cc
src/LifeCycleCORBA/LifeCycleCORBA.py
src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx
src/LifeCycleCORBA/SALOME_LifeCycleCORBA.hxx
src/LifeCycleCORBA/TestLifeCycleCORBA.cxx
src/Loader/InquireServersQThread.cxx
src/Loader/SALOME_Session_Loader.cxx
src/Logger/SALOME_Logger_Server.cxx
src/Logger/SALOME_Trace.cxx
src/Logger/SALOME_Trace.hxx
src/MPIContainer/MPIContainer_i.cxx
src/MPIContainer/MPIContainer_i.hxx
src/MPIContainer/MPIObject_i.cxx
src/MPIContainer/MPIObject_i.hxx
src/MPIContainer/Makefile.in
src/MPIContainer/SALOME_MPIContainer.cxx
src/MPILifeCycleCORBA/MPILifeCycleCORBA.py [new file with mode: 0644]
src/MPILifeCycleCORBA/MPIsalome.py [new file with mode: 0644]
src/MPILifeCycleCORBA/Makefile.in [new file with mode: 0644]
src/MPILifeCycleCORBA/SALOME_MPILifeCycleCORBA.cxx [new file with mode: 0644]
src/MPILifeCycleCORBA/SALOME_MPILifeCycleCORBA.hxx [new file with mode: 0644]
src/MPILifeCycleCORBA/TestMPILifeCycleCORBA.cxx [new file with mode: 0644]
src/MSG2QM/msg2qm.cxx
src/Makefile.in
src/ModuleCatalog/Makefile.in
src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.cxx
src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx
src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx
src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx
src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx
src/NOTIFICATION_SWIG/NOTIFICATION_Swig.cxx
src/NOTIFICATION_SWIG/NOTIFICATION_Swig.hxx
src/NamingService/SALOME_NamingService.cxx
src/NamingService/ServiceUnreachable.cxx
src/Notification/NOTIFICATION.cxx
src/Notification/NOTIFICATION_Consumer.cxx
src/Notification/NOTIFICATION_Supplier.cxx
src/OBJECT/SALOME_AISObject.cxx
src/OBJECT/SALOME_AISShape.cxx
src/OBJECT/SALOME_Actor.h
src/OBJECT/SALOME_InteractiveObject.cxx
src/OCCViewer/OCCViewer.cxx
src/OCCViewer/OCCViewer_AISSelector.cxx
src/OCCViewer/OCCViewer_Selector.cxx
src/OCCViewer/OCCViewer_VService.cxx
src/OCCViewer/OCCViewer_ViewFrame.cxx
src/OCCViewer/OCCViewer_ViewPort.cxx
src/OCCViewer/OCCViewer_ViewPort3d.cxx
src/OCCViewer/OCCViewer_Viewer3d.cxx
src/PatchQt/qsplitterP.cxx
src/PatchQt/qworkspaceP.cxx
src/Plot2d/Plot2d_Curve.cxx
src/Plot2d/Plot2d_CurveContainer.cxx
src/Registry/RegistryConnexion.cxx
src/Registry/RegistryService.cxx
src/Registry/RegistryService.hxx
src/Registry/SALOME_Registry_Server.cxx
src/RegistryDisplay/HelpWindow.cxx
src/RegistryDisplay/RegWidget.cxx
src/RegistryDisplay/RegWidgetFactory.cxx
src/RessourcesCatalog/SALOME_RessourcesCatalog_Client.cxx
src/RessourcesCatalog/SALOME_RessourcesCatalog_Handler.cxx
src/RessourcesCatalog/SALOME_RessourcesCatalog_impl.cxx
src/SALOMEDS/SALOMEDS_AttributeComment_i.cxx
src/SALOMEDS/SALOMEDS_AttributeDrawable_i.cxx
src/SALOMEDS/SALOMEDS_AttributeExpandable_i.cxx
src/SALOMEDS/SALOMEDS_AttributeExternalFileDef_i.cxx
src/SALOMEDS/SALOMEDS_AttributeFileType_i.cxx
src/SALOMEDS/SALOMEDS_AttributeIOR_i.cxx
src/SALOMEDS/SALOMEDS_AttributeInteger_i.cxx
src/SALOMEDS/SALOMEDS_AttributeLocalID_i.cxx
src/SALOMEDS/SALOMEDS_AttributeName_i.cxx
src/SALOMEDS/SALOMEDS_AttributeOpened_i.cxx
src/SALOMEDS/SALOMEDS_AttributePersistentRef_i.cxx
src/SALOMEDS/SALOMEDS_AttributePixMap_i.cxx
src/SALOMEDS/SALOMEDS_AttributePythonObject_i.cxx
src/SALOMEDS/SALOMEDS_AttributeReal_i.cxx
src/SALOMEDS/SALOMEDS_AttributeSelectable_i.cxx
src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx
src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx
src/SALOMEDS/SALOMEDS_AttributeStudyProperties_i.cxx
src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx
src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx
src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx
src/SALOMEDS/SALOMEDS_AttributeTarget_i.cxx
src/SALOMEDS/SALOMEDS_AttributeTextColor_i.cxx
src/SALOMEDS/SALOMEDS_AttributeTextHighlightColor_i.cxx
src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.cxx
src/SALOMEDS/SALOMEDS_AttributeUserID_i.cxx
src/SALOMEDS/SALOMEDS_ChildIterator_i.cxx
src/SALOMEDS/SALOMEDS_Client.cxx
src/SALOMEDS/SALOMEDS_DataMapIteratorOfDataMapStringLabel_0.cxx
src/SALOMEDS/SALOMEDS_DataMapNodeOfDataMapStringLabel_0.cxx
src/SALOMEDS/SALOMEDS_DataMapStringLabel_0.cxx
src/SALOMEDS/SALOMEDS_DrawableAttribute.cxx
src/SALOMEDS/SALOMEDS_ExpandableAttribute.cxx
src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx
src/SALOMEDS/SALOMEDS_IORAttribute.cxx
src/SALOMEDS/SALOMEDS_LocalIDAttribute.cxx
src/SALOMEDS/SALOMEDS_OCAFApplication.cxx
src/SALOMEDS/SALOMEDS_OpenedAttribute.cxx
src/SALOMEDS/SALOMEDS_PersRefAttribute.cxx
src/SALOMEDS/SALOMEDS_PixMapAttribute.cxx
src/SALOMEDS/SALOMEDS_PythonObjectAttribute.cxx
src/SALOMEDS/SALOMEDS_SComponentIterator_i.cxx
src/SALOMEDS/SALOMEDS_SComponent_i.cxx
src/SALOMEDS/SALOMEDS_SObject_i.cxx
src/SALOMEDS/SALOMEDS_SObject_i.hxx
src/SALOMEDS/SALOMEDS_SelectableAttribute.cxx
src/SALOMEDS/SALOMEDS_SequenceOfIntegerAttribute.cxx
src/SALOMEDS/SALOMEDS_SequenceOfRealAttribute.cxx
src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx
src/SALOMEDS/SALOMEDS_StudyManager_i.cxx
src/SALOMEDS/SALOMEDS_StudyPropertiesAttribute.cxx
src/SALOMEDS/SALOMEDS_Study_i.cxx
src/SALOMEDS/SALOMEDS_TableOfIntegerAttribute.cxx
src/SALOMEDS/SALOMEDS_TableOfIntegerAttribute.hxx
src/SALOMEDS/SALOMEDS_TableOfRealAttribute.cxx
src/SALOMEDS/SALOMEDS_TableOfRealAttribute.hxx
src/SALOMEDS/SALOMEDS_TableOfStringAttribute.cxx
src/SALOMEDS/SALOMEDS_TargetAttribute.cxx
src/SALOMEDS/SALOMEDS_TextColorAttribute.cxx
src/SALOMEDS/SALOMEDS_TextHighlightColorAttribute.cxx
src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.cxx
src/SALOMEDS/SALOMEDS_UseCaseIterator_i.cxx
src/SALOMEGUI/PyInterp_PyQt.cxx
src/SALOMEGUI/PyInterp_base.cxx
src/SALOMEGUI/PyInterp_base.h
src/SALOMEGUI/QAD_Application.cxx
src/SALOMEGUI/QAD_Config.cxx
src/SALOMEGUI/QAD_Desktop.cxx
src/SALOMEGUI/QAD_DirListDlg.cxx
src/SALOMEGUI/QAD_FileDlg.cxx
src/SALOMEGUI/QAD_FileValidator.cxx
src/SALOMEGUI/QAD_Help.cxx
src/SALOMEGUI/QAD_HelpWindow.cxx
src/SALOMEGUI/QAD_LeftFrame.cxx
src/SALOMEGUI/QAD_ListMenuIdAction.cxx
src/SALOMEGUI/QAD_ListPopupMenu.cxx
src/SALOMEGUI/QAD_ListView.cxx
src/SALOMEGUI/QAD_Menus.cxx
src/SALOMEGUI/QAD_Message.cxx
src/SALOMEGUI/QAD_MessageBox.cxx
src/SALOMEGUI/QAD_ObjectBrowser.cxx
src/SALOMEGUI/QAD_ObjectBrowserItem.cxx
src/SALOMEGUI/QAD_Operation.cxx
src/SALOMEGUI/QAD_OperatorMenus.cxx
src/SALOMEGUI/QAD_ParserSettings.cxx
src/SALOMEGUI/QAD_Popup.cxx
src/SALOMEGUI/QAD_PyEditor.cxx
src/SALOMEGUI/QAD_PyInterp.cxx
src/SALOMEGUI/QAD_PyInterp_mono.cxx
src/SALOMEGUI/QAD_ResourceMgr.cxx
src/SALOMEGUI/QAD_RightFrame.cxx
src/SALOMEGUI/QAD_Settings.cxx
src/SALOMEGUI/QAD_SpinBoxDbl.cxx
src/SALOMEGUI/QAD_Splitter.cxx
src/SALOMEGUI/QAD_Study.cxx
src/SALOMEGUI/QAD_StudyFrame.cxx
src/SALOMEGUI/QAD_Tools.cxx
src/SALOMEGUI/QAD_ViewFrame.cxx
src/SALOMEGUI/QAD_XmlHandler.cxx
src/SALOMEGUI/SALOMEGUI_AboutDlg.cxx
src/SALOMEGUI/SALOMEGUI_ActivateComponentDlg.cxx
src/SALOMEGUI/SALOMEGUI_Application.cxx
src/SALOMEGUI/SALOMEGUI_CloseDlg.cxx
src/SALOMEGUI/SALOMEGUI_Desktop.cxx
src/SALOMEGUI/SALOMEGUI_ExternalBrowserDlg.cxx
src/SALOMEGUI/SALOMEGUI_ImportOperation.cxx
src/SALOMEGUI/SALOMEGUI_LoadStudiesDlg.cxx
src/SALOMEGUI/SALOMEGUI_NameDlg.cxx
src/SALOMEGUI/SALOMEGUI_OpenWith.cxx
src/SALOMEGUI/SALOMEGUI_QtCatchCorbaException.cxx
src/SALOMEGUI/SALOMEGUI_SetValueDlg.cxx
src/SALOMEGUI/SALOMEGUI_SetupCurveDlg.cxx
src/SALOMEGUI/SALOMEGUI_StudyPropertiesDlg.cxx
src/SALOMEGUI/SALOMEGUI_Swig.cxx
src/SALOMEGUI/SALOMEGUI_TableDlg.cxx
src/SALOMEGUI/SALOMEGUI_TrihedronSizeDlg.cxx
src/SALOMEGUI/SALOMEGUI_ViewChoiceDlg.cxx
src/SALOMEGUI/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx
src/SALOMEGUI/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx
src/SALOMEGUI/SALOME_DataMapOfIOMapOfInteger_0.cxx
src/SALOMEGUI/SALOME_Filter.cxx
src/SALOMEGUI/SALOME_ListIO.hxx
src/SALOMEGUI/SALOME_ListIO_0.cxx
src/SALOMEGUI/SALOME_ListIteratorOfListIO_0.cxx
src/SALOMEGUI/SALOME_ListIteratorOfListOfFilter_0.cxx
src/SALOMEGUI/SALOME_ListNodeOfListIO_0.cxx
src/SALOMEGUI/SALOME_ListNodeOfListOfFilter_0.cxx
src/SALOMEGUI/SALOME_ListOfFilter.hxx
src/SALOMEGUI/SALOME_ListOfFilter_0.cxx
src/SALOMEGUI/SALOME_NumberFilter.cxx
src/SALOMEGUI/SALOME_Selection.cxx
src/SALOMEGUI/SALOME_TypeFilter.cxx
src/SALOMELocalTrace/SALOME_Log.cxx
src/SALOMELocalTrace/SALOME_Log.hxx
src/SALOME_PY/SalomePy.cxx
src/SALOME_PYQT/Makefile.in
src/SALOME_PYQT/SALOME_PYQT_GUI.cxx
src/SALOME_PYQT/SalomePyQt.cxx
src/SUPERVGraph/SUPERVGraph.cxx
src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx
src/Session/SALOME_Session_QThread.cxx
src/Session/SALOME_Session_i.cxx
src/TOOLSDS/SALOMEDS_Tool.cxx
src/TOOLSGUI/ToolsGUI.cxx
src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.cxx
src/TestContainer/SALOME_TestComponent_i.cxx
src/TestContainer/TestContainer.cxx
src/TestContainer/TestLogger.cxx
src/TestMPIContainer/Makefile.in [new file with mode: 0644]
src/TestMPIContainer/TestMPIComponentEngine.cxx [new file with mode: 0644]
src/TestMPIContainer/TestMPIComponentEngine.hxx [new file with mode: 0644]
src/TestMPIContainer/TestMPIContainer.cxx [new file with mode: 0644]
src/Utils/Utils_CommException.cxx
src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx
src/Utils/Utils_ORB_INIT.cxx
src/Utils/Utils_SALOME_Exception.cxx
src/Utils/Utils_SALOME_Exception.hxx
src/Utils/Utils_Timer.cxx
src/Utils/utilities.h
src/VTKViewer/VTKViewer.cxx
src/VTKViewer/VTKViewer_RenderWindow.cxx
src/VTKViewer/VTKViewer_ViewFrame.cxx

index 2aeee3a555addf251f67c20b9d1bcfa7d370541a..39376435017b61461ea8d6abdcc7d0c0cbdbce06 100644 (file)
@@ -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
 
index b9ccbd48a7e74eda78b7a14d6dc1d9f933597eac..3586e5542292a14c356d83d2a240d1bad94c2ea8 100755 (executable)
@@ -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]
index c76d5a728f8fe83807e6c05214ebc318e27e365b..99e1272e1e65a22a8786dcd4dbc4173d5b785c82 100644 (file)
@@ -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,.,"`
index 8033ab2b02cec0396c94c89a3935f89d0ac14481..2615b1f63de3bc2c317e9ccf86e1a7c450e976b4 100644 (file)
@@ -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 (file)
index 0000000..8265c73
--- /dev/null
@@ -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 (file)
index 0000000..a480f51
--- /dev/null
@@ -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<Object> IORTab;
+  interface MPIObject
+  {
+    attribute IORTab tior;
+  } ;
+} ;
+
+#endif
diff --git a/idl/SALOME_TestMPIComponent.idl b/idl/SALOME_TestMPIComponent.idl
new file mode 100644 (file)
index 0000000..ad8623f
--- /dev/null
@@ -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);
+  };
+
+};
index 7c87413dd8ef9e9da0412e899d84f00cd1dd6045..5dd873fd2c4da7d5273979be2306f35fc20267d2 100644 (file)
@@ -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 (file)
index 0000000..4219c5a
--- /dev/null
@@ -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 <<EOF
+int main(int argc, char **argv) { return 0; }
+EOF
+  $CXX $1 conftest.cxx > conftest.log 2>&1
+  var=`echo $1 | sed -e "s, .*$,," | sed -e "s,^-,,"`
+  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+    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 (file)
index 0000000..4192ec0
--- /dev/null
@@ -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 (file)
index 0000000..88685ce
--- /dev/null
@@ -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 <<EOF
+#include <iostream>
+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 (file)
index 0000000..862f5e8
--- /dev/null
@@ -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 (file)
index 0000000..392107c
--- /dev/null
@@ -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)
+])
index 405cefa83b22b858324f68e37bb983715d34d365..fcf45bbf92263f01872d59cafb3355d5b8b0bf88 100644 (file)
@@ -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 <Standard_Type.hxx>
@@ -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
index 026f80d076f00248fb95ae131462e686efd9c0c8..cb65ed3d0a71b37f2053f657e6282b1b41bc157c 100644 (file)
@@ -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 (file)
index 0000000..51f271a
--- /dev/null
@@ -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
index cb4af538888fde4bb42c47a31994a28888b5b102..c68a72757624b9199d9e1b9778d4f23e0dc6c432 100644 (file)
@@ -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)
index 0608c4a40489f029b0f4427288c5c3f74a4b5c0a..983bfc20076571ef473c0a830d5a919f9e9416e4 100644 (file)
@@ -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
index e0d320185963199119d40a40229934e3bad147aa..8977452d2dd136f2f25a1fdbf4d8a336396109df 100644 (file)
@@ -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
 
index 753521cf9fe43f0bdfa5adb55c9fecdeb08d2aa0..55d70ebddebbe021cabec7feffaaf392cad9f7d0 100644 (file)
@@ -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
index feecb0dde36a765e526746b4d7181d88e4fb6227..48a025918c32991048b7c7714351e774a0ed44a8 100644 (file)
@@ -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"
index 1b1a8d1a1845e3a92347e0306cabfec012e1afdc..4b4b1454fab0c07c93f3cdcb6d164863b686e03a 100644 (file)
@@ -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"
 
index aa161181a33df8bd695dca94c96a9cb278457517..aa6da52d4b41904fae8d70e50b326e0ce705f758 100644 (file)
@@ -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
 ])
 
index b86c21d35c50295a7a38c58b19950cb4bf2e3a21..b99b9d138009e8ac65a713b033aaa5ddb4f5ea78 100644 (file)
@@ -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
index 09a46645aa9c0dafd232ff6fbe35c95e1004a1a3..4b801243f381f64c4eb95787e3a6e1c1e4743352 100644 (file)
 ## 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' |      \
index a970492b1dddd9e14a313595571ebdc60cc41040..0f6b4ac3b3bbc958fcfda9f0fd5345034a7e2f76 100644 (file)
@@ -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@
 
index fe43d0e54706985d1855324cc2066f0be1f4c2ec..cc2fb2be665a63113cb4baea8b4b8f0d193d71ba 100644 (file)
@@ -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
 #
index 09d463416e59a143acb2e0ed96544e6453dd044d..3d31862b74c7610ddb2e91d22727bba7b8b1d7ae 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOME_Component_i.hxx"
 #include "RegistryConnexion.hxx"
 #include "OpUtil.hxx"
 #include <stdio.h>
 #include <dlfcn.h>
 #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 ) {
index ecff86fdd4e70dedc52b341d9265f74ad0978bbf..e16c47ad73673f883823ef2c8c799484612d027f 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SALOME_Component)
 #include "SALOME_Container_i.hxx"
@@ -38,6 +37,7 @@ using namespace std;
 #include <unistd.h>
 
 #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_<SALOME_NamingService>::Instance() ;
-  ASSERT(SINGLETON_<SALOME_NamingService>::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_<SALOME_NamingService>::Instance() ;
+    ASSERT(SINGLETON_<SALOME_NamingService>::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() ;
 }
 
index 87f372867be63617a21151acb89a7a8d3f1cc5c9..23f857fe7816ec612afdd70d3cdd226f65a06105 100644 (file)
@@ -55,6 +55,6 @@ CPPFLAGS+= $(PYTHON_INCLUDES)
 
 LDFLAGS+= -lSalomeNS -lRegistry -lOpUtil -lSalomeNotification -lSALOMELocalTrace
 
-LIBS += -Xlinker -export-dynamic $(PYTHON_LIBS)
+LIBS += @LDEXPDYNFLAGS@ $(PYTHON_LIBS)
 
 @CONCLUDE@
index fc537d1c84880778e7c08c8230fbbde4f00040db..07c56bcb7e5aa9deadbca750a0e921790ba47fc6 100644 (file)
@@ -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 ;
index 61ce9d308a3793133cb0ad17f48977cf7e6faea7..613f3ecf75f133d804b2151ee29b10ce5e47fd94 100644 (file)
@@ -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<string, void *> handle_map ;
-  map<string, void *> remove_map ;
+  std::map<std::string, void *> handle_map ;
+  std::map<std::string, void *> remove_map ;
   omni_mutex _numInstanceMutex ; // if several threads on the same object
 
-private: 
+  //private: 
 
   int   _argc ;
   char** _argv ;
index 083cc4b14f78c1e4eb7eaae9d3a53f838cfb7da0..81008bcc697b7c5ebc30dbd45228c3aec88cda65 100644 (file)
 //  File   : SALOME_DataTypeCatalog_Client.cxx
 //  Module : SALOME
 
-using namespace std;
 /* $Header$ */
 
-#include <iostream.h>
+#include <iostream>
 #include "SALOME_NamingService.hxx"
 #include "SALOME_DataTypeCatalog.hh"
 #include <string>
 #include "utilities.h"
+using namespace std;
 
 int main(int argc,char **argv)
 {
index 55217510a8a1d278b7d40409b665d7fef2f212bf..2721fe1bf363cb24383e836f478dbd9a9837b0d0 100644 (file)
@@ -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
index a29401c51644720df8528bf20b2c7be0343efd8e..2d3eb86b3091679b7eee2975688672abdf7f0956 100644 (file)
@@ -26,7 +26,7 @@
 //  Module : SALOME
 //  $Header$
 
-#include <iostream.h>
+#include <iostream>
 #include "SALOME_NamingService.hxx"
 #include "SALOME_DataTypeCatalog_impl.hxx"
 #include "utilities.h"
index fdcdd0738c94e9a9b7bcc574b76a7f4f7983d6a9..72b51ce3809bc7556d4b7ff7b45cec2dd39e02a2 100644 (file)
@@ -26,9 +26,9 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOME_DataTypeCatalog_impl.hxx"
 #include <fstream>
+using namespace std;
 
 //----------------------------------------------------------------------
 // Function : SALOME_DataTypeCatalogImpl
index 49cc430994fec014138d59eeea2c2195fdaa0db9..e5719df68a24a96f0b3fbff3dc08140f3f52cd73 100644 (file)
@@ -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 <string.h>
 #include <fcntl.h>
 #include <stdio.h>
+using namespace std;
 
 bool CreateAttributeFromASCII(HDFinternalObject *father, FILE* fp);
 bool CreateDatasetFromASCII(HDFcontainerObject *father, FILE *fp);
index b87cb0799e2c6be3fb0529b682bb1542fe047b22..d4ec7b9c5d03df94a8a9633311fb18464abf7489 100644 (file)
@@ -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;
 }
index 2f5398bd7a85734f936c19256831be9d44de4487..1a84b1db1d304f7c393b26245a32039e5b30dd39 100644 (file)
@@ -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)
index 2a6fe9b760a19a62fc65ef8ce57dd7d8cd2fb9ef..991b00e6c1ebabf4642df58fdc0641c21db0ab8f 100644 (file)
@@ -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;
     
 };
index 1e3b9c8966ee083ff60f68c103e9b43ff67b617e..dcc0552d461e5b77abd3403669d8c04343effa78 100644 (file)
@@ -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);
 
 };
 
index 07d75e11c7c5a200294eadd09d3738fed92307c2..fcd8375b4a02b5d4ffb3007f6c43b5c3236d2097 100644 (file)
 //  File   : HDFdataset.cc
 //  Module : SALOME
 
-using namespace std;
 extern "C"
 {
 #include "hdfi.h"
-#include <string.h>
 }
+#include <string>
 #include "HDFdataset.hxx"
 #include "HDFcontainerObject.hxx"
 #include "HDFexception.hxx"
 
-#include <iostream.h>
+#include <iostream>
+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 ");
     }
 
index b23d321017c6aed7f7e762cd537509d800a80aec..a913f62e18326f0f4adf0b7c376002dd8943e945 100644 (file)
@@ -31,6 +31,6 @@ class HDFexception
 {
 public :
   HDFexception(const char *message) { 
-    cerr << message << endl;
+    std::cerr << message << std::endl;
   }
 };
index 2e86f820e0120dadc53334941a94b21fc2e95b7f..114732d48218d43c85275f6d44e68bc2f2cc3df9 100644 (file)
 //  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)
 {
index 469430a3405cd85e536937ad3c45a9e7ddcbbd43..c43a33320fbbde10116ba5c97a4d6ab856fc9871 100644 (file)
 //  File   : HDFfile.cc
 //  Module : SALOME
 
-using namespace std;
 extern "C"
 {
 #include "hdfi.h"
 #include <unistd.h>
-#include <string.h>
 }
-#include <iostream.h>
+#include <string>
+#include <iostream>
 #include "HDFfile.hxx"
 #include "HDFexception.hxx"
+using namespace std;
 
 herr_t file_attr(hid_t loc_id, const char *attr_name, void *operator_data)
 {
index b08f4de6eab4675d0b0590f648c62552ed017e90..ebeba29921c249d51ee32d020ec45dd73c5a52a4 100644 (file)
 //  File   : HDFgroup.cc
 //  Module : SALOME
 
-using namespace std;
 extern "C"
 {
 #include "hdfi.h"
-#include <string.h>
 }
+#include <string>
 #include "HDFgroup.hxx"
 #include "HDFexception.hxx"
+using namespace std;
 
 herr_t group_attr(hid_t loc_id, const char *attr_name, void *operator_data)
 {
index 2cf6ed0117c1dc0e74427692cb45c181a14ed10a..7ef6fb8e7267fbad8b31af80c2d497313ec5e5c3 100644 (file)
 //  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)
index 81fc689c881c8a73abf2fa96dcb208352245ce0d..eed36fdaba381c4fd07aea37d198b638972a2061 100644 (file)
 //  File   : HDFobject.cc
 //  Module : SALOME
 
-using namespace std;
 #include "HDFobject.hxx"
 extern "C"
 {
 #include "hdfi.h"
-#include <string.h>
 }
+#include <string>
 #include "utilities.h"
+using namespace std;
 
 HDFobject::HDFobject(char *name)
 {
index 9c683e51fa762d32d7564980b78354e0d0ba8f75..550a88ff9d988bbfeb9716312f0c6e5e41679d68 100644 (file)
@@ -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")
 
     #-------------------------------------------------------------------------
 
index 844d024481f9133f89a0fd2891b6365c9d5d44d0..6e48df6b92ec4f5bc8b21169270658e7e6bbcfaf 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include <iostream>
 #include <fstream>
 #include <sstream>
 #include <iomanip>
+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 -" ;
index 2338fe34c690ebc4cfe4abadd25768b7af09f321..d562f43f3dace86a379a3060eb6d48b0f2378d8c 100644 (file)
@@ -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 ) ;
index b67b988b63932908d394774f5e7e2026e57340c7..603c328148ad173597652aa19d50c879e23ce426 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "utilities.h"
 #include <iostream>
 #include <unistd.h>
@@ -36,6 +35,7 @@ using namespace std;
 #include "SALOME_NamingService.hxx"
 #include "SALOME_LifeCycleCORBA.hxx"
 #include <OpUtil.hxx>
+using namespace std;
 
 int main (int argc, char * argv[])
 {
index b80547c9d3a88deeaa30b38ee4abc622e8da26cb..cd77e0a8b7d5ed7982fffffd207d3031cec94970 100644 (file)
@@ -7,7 +7,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "InquireServersQThread.h"
 
 #include <qlabel.h>
@@ -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 )
index 3aff0456418d235168f796e540ade4ba60ea10ce..c15bf11622cde9b411097db872b26a0691c52c1c 100644 (file)
@@ -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
 /*!
index 5d1b3a4a756de74ad3f3c7f44f8d8b8bb49dfc9d..bb772db8466201ee17f12fa5ed939e1c82bc97d6 100644 (file)
@@ -8,12 +8,13 @@
 //  Author : Vasily Rusyaev
 //  Module : SALOME
 
-using namespace std;
 #include <iostream>
+
 #include "SALOME_Logger_Server.hxx"
 #include <SALOMEconfig.h>
 #include <sys/types.h>
 #include <unistd.h>
+using namespace std;
 omni_mutex Logger::myLock;
 
 /////////////////////////////////////////////////////////////////////
index d139476c1aaad1fe780e6053335f64e0cac933ea..2fb550990314e173572745e5bba91b86f066794c 100644 (file)
@@ -8,14 +8,15 @@
 //  Author : Vasily Rusyaev
 //  Module : SALOME
 
-using namespace std;
 #include "SALOME_Trace.hxx"
 #include <memory.h>
 #include <string>
-//#include <stdio.h>
 #include <stdlib.h>
 #include <iostream>
 
+#include "SALOME_Trace.hxx"
+using namespace std;
+
 //////////////////////////////////////////////////////////////////////
 // Construction/Destruction
 //////////////////////////////////////////////////////////////////////
index 90fbfd06fd441aa2e4a81594c52c4cc2e3754c61..0a8e0f625e0545f005b0c0fecf1dee4ae21be120 100644 (file)
 
 # endif  /* WNT */
 
-using namespace std;
-
 #include <strstream.h>
+
 #include "Logger.hh"
+using namespace std;
 
 class SALOME_Trace : public ostrstream  
 {
index 8201d24f0bccedbf96587b27031907cca51d6d47..ad729c45ae07eaf880699114ef8356a2c294fb27 100644 (file)
 //  File   : MPIContainer_i.cxx
 //  Module : SALOME
 
-using namespace std;
 #include <iostream.h>
 #include <dlfcn.h>
 #include <stdio.h>
 #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_<SALOME_NamingService>::Instance() ;
     ASSERT(SINGLETON_<SALOME_NamingService>::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<string, void *>::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");
 }
index 390f6ce738cc8495a260b001136b4e84cb3e0cf2..7d9ddc9a26425bdea04da91a5f1e32785462a0a8 100644 (file)
 #define _SALOME_PCONTAINER_ 
 
 #include <SALOMEconfig.h>
-#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
index 218c01c9db9326679fd7824f88a1b76188ac9236..177a61ffb0e15e7619244e9d5efe95bee7ce2c53 100644 (file)
 //  File   : MPIObject_i.cxx
 //  Module : SALOME
 
-using namespace std;
 #include "MPIObject_i.hxx"
 #include "utilities.h"
 #include <mpi.h>
+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);
+
 }
 
index e504bb829843cea777f4925570724690ff2f451e..47243a19bc119515ba828c98da9e6aea3c2880f4 100644 (file)
@@ -28,7 +28,7 @@
 #define _SALOME_POBJECT_I_H_ 
 
 #include <SALOMEconfig.h>
-#include CORBA_SERVER_HEADER(MPIObject)
+#include CORBA_SERVER_HEADER(SALOME_MPIObject)
 
 class MPIObject_i: public POA_Engines::MPIObject
 {
index da4e295d95186e4f043a718bddbfcd47a69d1bb4..c8af028413f96dbfa1e1c6c2a49acd21b3481317 100644 (file)
@@ -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@
index f11dbb26de5c146920ba84a0d79eeca8d6a5f9dc..d6fb4474fc110c4eb32072064f234926bab00d6f 100644 (file)
@@ -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 <iostream>
 #include "MPIContainer_i.hxx"
+#include "Utils_ORB_INIT.hxx"
+#include "Utils_SINGLETON.hxx"
 #include "utilities.h"
 #include <mpi.h>
+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_<ORB_INIT>::Instance() ;
+    ASSERT(SINGLETON_<ORB_INIT>::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 (file)
index 0000000..eb255d8
--- /dev/null
@@ -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 (file)
index 0000000..789641f
--- /dev/null
@@ -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 (file)
index 0000000..ab76b03
--- /dev/null
@@ -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 (file)
index 0000000..cfa9f4c
--- /dev/null
@@ -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 <iostream>
+#include <fstream>
+#include <strstream>
+#include <iomanip>
+#include <stdio.h>
+#include <string.h>
+
+#include "OpUtil.hxx"
+#include "utilities.h"
+
+#include <ServiceUnreachable.hxx>
+
+#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 (file)
index 0000000..dfac110
--- /dev/null
@@ -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 <stdlib.h>
+#include <unistd.h>
+#include <string>
+
+#include <SALOMEconfig.h>
+#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 (file)
index 0000000..9e2c5c1
--- /dev/null
@@ -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 <iostream>
+#include <unistd.h>
+#include <string>
+#include <SALOMEconfig.h>
+#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;
+}
index 097947db2d6068d7859d54bf8353286d123329c4..5322a33fc7ddd6602842e4f9ec2afd75a4ccdfcb 100644 (file)
@@ -24,7 +24,6 @@
 //  File   : msg2qm.cxx
 //  Module : SALOME
 
-using namespace std;
 /****************************************************************************
 ** $Id$
 **
@@ -42,6 +41,7 @@ using namespace std;
 
 #include <stdio.h>
 #include <stdlib.h>
+using namespace std;
 
 static QString* defaultScope = 0;
 
index f35650e424aae48b820a39d744966c8a9dfb80bd..47a5d356e3f55a057ce73c0fa05f80c89bf649b1 100644 (file)
@@ -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@
index 97a1d981600889196840388049344006062c2f67..475f86e064eab0ce226038edfe2dbcce93af5126 100644 (file)
@@ -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@
index 35e5c2e3e49beef18b9ef8b721741cd41bb1a4b8..034014eee0670d0bd7be6c58e1735284a9c76237 100644 (file)
@@ -26,8 +26,8 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOME_ModuleCatalog_Acomponent_impl.hxx"
+using namespace std;
 
 //----------------------------------------------------------------------
 // Function : SALOME_ModuleCatalog_AcomponentImpl
index c590b4b102855ed925f0890877682318a7004712..e930301d1dcf1171f820d4c43b197222c4e8bbb2 100644 (file)
@@ -24,7 +24,6 @@
 //  File   : SALOME_ModuleCatalog_Client.cxx
 //  Module : SALOME
 
-using namespace std;
 /* $Header$ */
 
 #include <iostream.h>
@@ -32,6 +31,7 @@ using namespace std;
 #include "SALOME_ModuleCatalog.hh"
 #include <string>
 #include "utilities.h"
+using namespace std;
 
 int main(int argc,char **argv)
 {
index 8f8f0e241dc6c2b909af630a0224c2c824496d78..8788283581dc5ad9ede769c8dffcc4850db7e793 100644 (file)
@@ -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
index c206cc8463dcb7b18facf19dc7c41a7447ea5fb2..d777b1128d5531fccf1cedcabbd9b18359268ab0 100644 (file)
@@ -25,8 +25,7 @@
 //  Module : SALOME
 
 /* $Header$ */
-
-#include <iostream.h>
+#include <iostream>
 #include "SALOME_NamingService.hxx"
 #include "SALOME_ModuleCatalog_impl.hxx"
 #include "utilities.h"
index 9f912a7d3b4f430c6e9ccfac9a38999c055a39d6..8598599edba3231737ab43bfd24163b484ee0147 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOME_ModuleCatalog_impl.hxx"
 #include "SALOME_ModuleCatalog_Acomponent_impl.hxx"
 #include <fstream>
 
 #include <qstringlist.h>
 #include <qfileinfo.h>
+using namespace std;
 
 static const char* SEPARATOR    = ":";
 
index 6e36d52a9c58bca6da59c1dd73e5002cd810b5b7..40bc4a12af8351bce247f43a5487e1c876d89fec 100644 (file)
@@ -25,8 +25,8 @@
 //  Author : Francis KLOSS
 //  Module : SALOME
 
-using namespace std;
 #include "NOTIFICATION_Swig.hxx"
+using namespace std;
 
 // Swig notification supplier
 // --------------------------
index f2361808c029f47256dadd6d298abf869e56b1db..746f8e9ecf3fc5b42706dbab15dfed17341d85f6 100644 (file)
@@ -25,8 +25,8 @@
 //  Author : Francis KLOSS
 //  Module : SALOME
 
-using namespace std;
 #include "NOTIFICATION.hxx"
+using namespace std;
 
 class NOTIFICATION_Supplier_Swig {
   public:
index c4865c196ba759a4d4f49d11eaed14b22d7cf323..6c71e5f4984d14886e8794ea158aa3045f719591 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOME_NamingService.hxx"
 #include "ServiceUnreachable.hxx"
 #include <iostream>
 #include <cstring>
+using namespace std;
 
 //----------------------------------------------------------------------
 /*! Function : SALOME_NamingService
index 4b03e8d163474579e8d375ab797c9b18bb1daa40..607c64710d7c9a6048381894ba8d4cf25c6d4fed 100644 (file)
@@ -24,7 +24,6 @@
 //  File   : ServiceUnreachable.cxx
 //  Module : SALOME
 
-using namespace std;
 #include "ServiceUnreachable.hxx"
 
 ServiceUnreachable::ServiceUnreachable( void ): SALOME_Exception( "ServiceUnreachable" )
index 1058d706edc3bfa88b84d54984ff83c7b79413e5..bbbb922948c7a896c31baae5967586d998c3cf56 100644 (file)
 //  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_<ORB_INIT>::Instance(); ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
index 809d328eca5e8f4e3899f0b603229a6b357b4246..e502a01d0d91b5d365d0ba76a179cfdaf5671623 100644 (file)
@@ -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),
index b572539a449b2c751c4c38a0ef0ee34ceb5421ca..83d3787a60b6fa4be138d15ced4601cceebd2d01 100644 (file)
@@ -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;
 
index 2d34b31a2095bed8eb89dbc7f1ccbb53ff34981b..46abdd1d6a70d1d45ef00bfa0c6fa9d3a5c25e59 100644 (file)
@@ -26,5 +26,5 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOME_AISObject.ixx"
+using namespace std;
index 117738ffac3948e23079e47a8390b706dd251614..b439aef2b01642587b9aa2e8d37b5425f18b20d4 100644 (file)
@@ -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) {
 }
index 03758fee9870e4aba7bdd4f4d19a6fb239b69348..492c4e6a8792a51f5e8bd1497ad449f71fad369d 100644 (file)
@@ -35,7 +35,7 @@
 #ifndef _Handle_SALOME_InteractiveObject_HeaderFile
 #include "Handle_SALOME_InteractiveObject.hxx"
 #endif
-#include <vector.h>
+#include <vector>
 
 class SALOME_Transform;
 class SALOME_TransformFilter;
index 36a977af643c4f24f0f3435dac86f915884c30db..c361fca8f1220e108c7a522c2d0e4cfe8cf96f5f 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 /*!
   \class SALOME_InteractiveObject SALOME_InteractiveObject.hxx
   \brief ...
 */
 
 #include "SALOME_InteractiveObject.ixx"
+using namespace std;
 
 SALOME_InteractiveObject::SALOME_InteractiveObject()
 {
index d98bb2b1f7adaae19fa0b25e8320463abcb3e093..70a92624c83786b5b4c87e1f410e7c400a7a03bd 100644 (file)
@@ -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)
 {
index 6310f51c6c919748a3b3b0285d33296f2e49fe02..0b95ac18decb35adb0727b7754c23d38ca68336e 100644 (file)
@@ -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
index e037b6b35281027e3cbc7932752d048db12035e6..41df5163a1fb7e124198aa8c9f8f603f2efab812 100644 (file)
 //  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
index e0ed072a642204b10ea07161e9203e582ec69473..eca0fbbb84e1dfe6e878f23e2aea334e298728ae 100644 (file)
@@ -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 <Xdps_Driver.hxx>
 #include <Xw_TypeOfMapping.hxx>
 #endif
+using namespace std;
 
 // For 2d
 #define LOPTIM
index 2ddc4325fc1abc068ffe48db69a951229cc378d5..2da9e147515ef1707027d1dcd615b91ccd3c0222 100644 (file)
@@ -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 <V3d_View.hxx>
 #include <AIS_ListIteratorOfListOfInteractive.hxx>
 #include <Visual3d_View.hxx>
+using namespace std;
 
 /*!
     Constructor
index 1d6d410baba945ae175913993824eed26d61cfbc..69b0618128d2c39655b61e418f851008707475fe 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include <stdlib.h>
 
 #if !defined WNT
@@ -52,6 +51,7 @@ using namespace std;
 
 #include <qpixmap.h>
 #include <qintdict.h>
+using namespace std;
 
 /* XPM */
 const char* imageZoomCursor[] = { 
index 88601ea0bfc73307fdd147b6d4ccf9886589ac3c..6a5d747a80cb3acde91b43136a8518fc88df3298 100644 (file)
@@ -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 <Xw.hxx>
 #endif
+using namespace std;
 
 /*!
     Constructor
index 8d4a1331aef7589de27f25b87b090713a99df4f6..ffe52f7755e5fbde32da02bc3482fd8bb8d552fd 100644 (file)
@@ -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 <Geom_Axis2Placement.hxx>
 #include <AIS_ListOfInteractive.hxx>
 #include <AIS_ListIteratorOfListOfInteractive.hxx>
+using namespace std;
 
 /*!
     Constructor
index 4b8268af90164280f6447e480547db41c7ca31ca..f44990ee392288051a734140c5e9f19f98364aeb 100644 (file)
@@ -24,7 +24,6 @@
 //  File   : qsplitterP.cxx
 //  Module : SALOME
 
-using namespace std;
 /****************************************************************************
 ** $Id$
 **
@@ -80,6 +79,7 @@ using namespace std;
 
 #include <qobjectlist.h>
 #include <qapplication.h> //sendPostedEvents
+using namespace std;
 
 #define SPLITTER_ICON_WIDTH 10
 #define SPLITTER_ICON_HEIGHT 12
index 0d4d618f751574db9d1cc7dd940d2c9d4cbd7936..483149bb6f200ce8ff1b5380ec00014abda3ae7c 100644 (file)
@@ -9,7 +9,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "qworkspaceP.h"
 
 #include <qapplication.h>
@@ -41,6 +40,7 @@ using namespace std;
 
 #include <private/qapplication_p.h>
 #include <private/qinternal_p.h>
+using namespace std;
 
 #define BUTTON_WIDTH   16
 #define BUTTON_HEIGHT  14
index 8d15c56ae847f298bad7cb097614a7396fa7e5ad..e32f477e046093f70396879f79b603963de0d4ab 100644 (file)
@@ -7,9 +7,9 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "Plot2d_Curve.h"
 #include "utilities.h"
+using namespace std;
 
 /*!
   Constructor
index f55104645e12add265756be029f9185a04ee65a1..f9021db1ef55c1cfae7ab98ed9162ebec68d7a33 100644 (file)
@@ -7,8 +7,8 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "Plot2d_CurveContainer.h"
+using namespace std;
 
 /*!
   Constructor
index e11f5a2218f15016877378cb954d0ad1c9cc52cf..018ea5fbf13d5f108417c80aad2644f0a939df7e 100644 (file)
@@ -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"
index 94dfa3034bdebf27ec451f515e6baa6d8ca54a4e..018d9cb8726e275568852a8a00eaec4c4f9d45d1 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
-using namespace std;
 # include "RegistryService.hxx"
 # include "OpUtil.hxx"
 # include "utilities.h"
+using namespace std;
 
 extern "C"
 {
index 0144b59b36797a446f62a71580fd41c28468cf00..63f7d57e4ddf2a1fa1b092102eb262895d990d33 100644 (file)
@@ -87,10 +87,10 @@ protected :
 
        const char              *_SessionName ;
        int                      _Compteur ;
-       map<int,client_infos *>  _reg ;
-       map<int,client_infos *>  _fin ;
+       std::map<int,client_infos *>     _reg ;
+       std::map<int,client_infos *>     _fin ;
 
-       Registry::AllInfos* makeseq(map<int,client_infos *> &mymap );
+       Registry::AllInfos* makeseq(std::map<int,client_infos *> &mymap );
 
 } ;
 
index 3e5a5b636fff0472744be2aa40614c9c3e77fced..9feaf15677f877265300303d31aeb6ddbf065b9b 100644 (file)
@@ -26,9 +26,9 @@
 //  Module : SALOME
 //  $Header$
 
-#include <stdlib.h>
-#include <iostream.h>
-#include <fstream.h>
+# include <stdlib.h>
+# include <iostream>
+# include <fstream>
 
 extern "C"
 {
@@ -49,6 +49,11 @@ extern "C"
 #endif
 using namespace std;
 
+//#define CHECKTIME
+#ifdef CHECKTIME
+#include <Utils_Timer.hxx>
+#endif
+
 int main( int argc , char **argv )
 {
   BEGIN_OF( argv[0] )
index 3d8b682cc3014e739e7588d20c382ffae544426f..40889fe28f6adfd6ed8f2654e841592b139e601d 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 # include "HelpWindow.hxx"
 # include "utilities.h"
 
@@ -34,6 +33,7 @@ using namespace std;
 # include <qpushbutton.h>
 # include <qtextstream.h> 
 # include <qfile.h> 
+using namespace std;
 
 HelpWindow::HelpWindow(QWidget* parent, const char* name ) 
      : QMainWindow( parent, name, WType_TopLevel | WDestructiveClose )
index afc79eac91563ac13c72a7944330fa4cf611f9a4..22797cc2a4cc368c40a2e503e32674619f8f36c0 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 # include <qpushbutton.h>
 # include <qlistview.h>
 # include <qtabwidget.h> 
@@ -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;
index 341e60d54f0baea6b924bd49aa3b21c9d9131983..ffef14c4d8c1539665a9cf4a65739963c9c60263 100644 (file)
@@ -26,9 +26,9 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 # include "RegWidget.hxx"
 # include "utilities.h"
+using namespace std;
 
 extern "C"
 {
index c6a524cde0c5a6b02905ad3282a3ecfb060b654c..05f13bc10e9a690d3b3c0240dcc384bf94eeceff 100644 (file)
 //  File   : SALOME_RessourcesCatalog_Client.cxx
 //  Module : SALOME
 
-using namespace std;
 /* $Header$ */
 
-#include <iostream.h>
+#include <iostream>
 #include "SALOME_NamingService.hxx"
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SALOME_RessourcesCatalog)
 #include <string>
 #include "utilities.h"
+using namespace std;
 
 int main(int argc,char **argv)
 {
index e82e54a2326d5fd20c6073262c1397a09ee8c834..67cd843d3e20a76203a23b0638d2c1ed21e26ec2 100755 (executable)
@@ -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
index d0d27774964a6d7cdb9f8b34bc293bef25081a88..0557289d86995449a0500049d8f80044f7d43912 100644 (file)
@@ -25,9 +25,9 @@
 //  Author : Estelle Deville
 //  Module : SALOME
 
-using namespace std;
 #include "SALOME_RessourcesCatalog_impl.hxx"
 #include <fstream>
+using namespace std;
 
 //----------------------------------------------------------------------
 // Function : SALOME_RessourcesCatalogImpl
index f967482d801243435675aa8878be2fc7ba18c3b0..72babf8e1f6e53493ab9a6b5e649b1fee10b932d 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributeComment_i.hxx"
 
 #include <TCollection_ExtendedString.hxx>
 #include "SALOMEDS_SObject_i.hxx"
+using namespace std;
 
 char* SALOMEDS_AttributeComment_i::Value()
 {
index 903d1ead7163d02572bceb3ba467bcca14773885..8fa4ea1453127ab53e1547a80a8597197498a689 100644 (file)
@@ -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);
index 1560deeaa55dd5795ce94a4447a8a057624592cb..6fe877c50e34e1c494c5cf111a2bd8a64e08b9d1 100644 (file)
@@ -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);
index 94e2a313d62761591470215203b12ac42304f094..a6c424c1744ea4179ab841fc5163ab2ead9072f5 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributeExternalFileDef_i.hxx"
 
 #include <TCollection_ExtendedString.hxx>
 #include "SALOMEDS_SObject_i.hxx"
+using namespace std;
 
 char* SALOMEDS_AttributeExternalFileDef_i::Value()
 {
index d40a53f43f5f510ea278f2397d224873253f7343..9411fbb676e1f73973cf6f042619b96c9e0ae2bc 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributeFileType_i.hxx"
 
 #include <TCollection_ExtendedString.hxx>
 #include "SALOMEDS_SObject_i.hxx"
+using namespace std;
 
 char* SALOMEDS_AttributeFileType_i::Value()
 {
index b1ec78bf08f1c4c991f4d09f89e5924529105b5f..6cf5e337466fdc06114075e97d59cbedd74f141e 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributeIOR_i.hxx"
 
 
 #include <TCollection_ExtendedString.hxx>
 #include "SALOMEDS_SObject_i.hxx"
 #include "SALOMEDS_Study_i.hxx"
+using namespace std;
 
 char* SALOMEDS_AttributeIOR_i::Value()
 {
index d9f013db76ce4b7e51e874d561647b9b00ad2ca4..07920efb61ce7e33f4482fba8463bc788edfb9e7 100644 (file)
@@ -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() {
index 0ed4628b837102fe5e497fdf727001f46652ee9d..3c1b124fd1ba2f75afc26b881c6f04547725cc49 100644 (file)
@@ -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();
index 415f71af3fe41d290c388819e22d1982ac559110..975e6439d4254bf46eda6fcaae6ae8d2127bcab6 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributeName_i.hxx"
 #include <TCollection_ExtendedString.hxx>
 #include "SALOMEDS_SObject_i.hxx"
+using namespace std;
 
 char* SALOMEDS_AttributeName_i::Value() {
   TCollection_ExtendedString S = Handle(TDataStd_Name)::DownCast(_myAttr)->Get();
index c202cb0431c6bc5608589c0dbdee4c290e27ceb5..fd9c6bfd1d909a92fdfd193a6d08704ca7fe9a06 100644 (file)
@@ -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);
index 626ad9711e7130e340be59bb225bd03ca823a34b..3a867f0eaca090eae85e908e9ae307275ad9870b 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributePersistentRef_i.hxx"
 #include <TCollection_ExtendedString.hxx>
 #include "SALOMEDS_SObject_i.hxx"
+using namespace std;
 
 char* SALOMEDS_AttributePersistentRef_i::Value()
 {
index 5015f16977adc6782f6def36e3a95f021a9df3c0..1d8498c3fd64c6622060bfb3a6ec795933d46209 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributePixMap_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
 #include <TCollection_AsciiString.hxx>
+using namespace std;
 
 CORBA::Boolean SALOMEDS_AttributePixMap_i::HasPixMap() {
   TCollection_ExtendedString S = Handle(SALOMEDS_PixMapAttribute)::DownCast(_myAttr)->Get();
index 86f7a1ca49edff7386a51a68a8ffcaebc0256bc1..ca3f7d731d3345982b55831c439cbe27b5e5a11e 100644 (file)
@@ -9,11 +9,11 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributePythonObject_i.hxx"
 #include <TCollection_ExtendedString.hxx>
 #include <TColStd_HArray1OfCharacter.hxx>
 #include "SALOMEDS_SObject_i.hxx"
+using namespace std;
 
 void SALOMEDS_AttributePythonObject_i::SetObject(const char* theSequence, CORBA::Boolean IsScript) {
   CheckLocked();
index fc5611c8e3a9ea28bb8dc1bd37e0f03f2423837b..62960aa9c74453eba1bd5f23a59bc809563fbc98 100644 (file)
@@ -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();
index b526f3c997e3c23a0578e7b8b21ff936523e1589..e208ad6a9c17419123cd9edd412e63e887c2da06 100644 (file)
@@ -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);
index 61e08b1bd06b2a31e79a59a3522ed4e7c427c361..cd142de25d88c5e774e6e02dcdde6f8b296e1bbd 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributeSequenceOfInteger_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
 #include <TColStd_HSequenceOfInteger.hxx>
-
+using namespace std;
 
 void SALOMEDS_AttributeSequenceOfInteger_i::Assign(const SALOMEDS::LongSeq& other) 
 {
index 8b48632b28472d113bb83b701a2ced6fe7f1ffbe..6c5c18589776632e0d2e2813f7ea6810225b491c 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributeSequenceOfReal_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
 #include <TColStd_HSequenceOfReal.hxx>
+using namespace std;
 
 void SALOMEDS_AttributeSequenceOfReal_i::Assign(const SALOMEDS::DoubleSeq& other) 
 {
index 1646f3db4398b0cda7098434d0d828cfd116f1be..dce1ad3724fc221b1d486cb09cc9f5b8ec690bf7 100644 (file)
@@ -9,11 +9,11 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributeStudyProperties_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
 #include <TColStd_HSequenceOfExtendedString.hxx>
 #include <TColStd_HSequenceOfInteger.hxx>
+using namespace std;
 
 #define CREATION_MODE_NOTDEFINED 0
 #define CREATION_MODE_SCRATCH 1
index f80457bb6614ff91ce1c41d689e8a0333d0037e1..1542471bfd975f153dc610b39c9dc66620c44e67 100644 (file)
@@ -9,7 +9,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributeTableOfInteger_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
 #include <TColStd_HSequenceOfInteger.hxx>
@@ -18,6 +17,7 @@ using namespace std;
 
 #include <strstream>
 #include <string>
+using namespace std;
 
 #define SEPARATOR '\1'
 
index 432f42e5e4d54e09bde487c2e6fc478deef7045f..a684dc8df0dedf374b1eaa556cf6f16b9ba06769 100644 (file)
@@ -9,7 +9,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributeTableOfReal_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
 #include <TColStd_HSequenceOfReal.hxx>
@@ -18,6 +17,7 @@ using namespace std;
 
 #include <strstream>
 #include <string>
+using namespace std;
 
 #define SEPARATOR '\1'
 
index 262cdce8d479a8fef833ed3f8834f9ee686a81e0..c88ce6d2155dc92f7a8f3711c86e15aa5c60db63 100644 (file)
@@ -8,7 +8,6 @@
 //  Author : Sergey Ruin
 //  Module : SALOME
 
-using namespace std;
 #include <TCollection_ExtendedString.hxx>
 #include <TCollection_AsciiString.hxx>
 
@@ -21,6 +20,7 @@ using namespace std;
 
 #include <strstream>
 #include <string>
+using namespace std;
 
 #define SEPARATOR '\1'
 
index f5f35cc7ba1bc9da8f08015e65503781370ba99b..b431af96af5a476805b749dbeaefd132b6a736b3 100644 (file)
 //  Module : SALOME
 //  $Header: 
 
-using namespace std;
 #include "SALOMEDS_AttributeTarget_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
 #include <TDF_LabelList.hxx>
 #include <TDF_ListIteratorOfLabelList.hxx>
+using namespace std;
 
 void SALOMEDS_AttributeTarget_i::Add(SALOMEDS::SObject_ptr anObject) {
   TDF_Label aLabel;
index 0f040990c55162ec8d56487ac0c23841b07729ee..45d1b8f52d96aa7f509630ce09c9d301c729cce9 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributeTextColor_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
 #include <TColStd_HArray1OfReal.hxx>
+using namespace std;
 
 SALOMEDS::Color SALOMEDS_AttributeTextColor_i::TextColor() {
   SALOMEDS::Color TextColor;
index 9ba430ba897524b118378b059a0ffab0b703f4f5..cc6ff475be518d07b577ee42aa8d84160468c508 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_AttributeTextHighlightColor_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
 #include <TColStd_HArray1OfReal.hxx>
+using namespace std;
 
 SALOMEDS::Color SALOMEDS_AttributeTextHighlightColor_i::TextHighlightColor() {
   SALOMEDS::Color TextHighlightColor;
index 11d326b5c7b4b73550a7e002a59586981a8dd480..aaf7ddc253a3fd5730319e60869b9baf2e05da07 100644 (file)
 //  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) {
index 632d95beb9e6a3317e475200ca4fab4a9d1d9c21..021879481e387df76578e84631c0b08ff7aa986f 100644 (file)
 //  Module : SALOME
 //  $Header: 
 
-using namespace std;
 #include "SALOMEDS_AttributeUserID_i.hxx"
 #include <TCollection_ExtendedString.hxx>
 #include "SALOMEDS_SObject_i.hxx"
+using namespace std;
 
 char* SALOMEDS_AttributeUserID_i::Value() {
   char aGUID[40];
index 9475797213a13086dc890bd2011a2ffd3ff25743..ada9ea7c40963624783bf6b0d9ed30856d23bdf8 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_ChildIterator_i.hxx"
 #include "SALOMEDS_SObject_i.hxx"
 #include "utilities.h"
-
-
+using namespace std;
 
 //============================================================================
 /*! Function : constructor
index 37104eab0728c56c1fce0c9f6562f75bd8a2c331..a0cc035ce59a4e905716b5a6cabcb7682d7da5c2 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SALOMEDS)
 #include "SALOMEDS_StudyManager_i.hxx"
 #include "utilities.h"
 #include "SALOMEDS_AttributeName_i.hxx"
+using namespace std;
 
 //============================================================================
 /*! Function :
index 080f4b79d48ca2d9c19fda6e563738ff0876019f..ce782eae025c69c005cb03e7dda5e078ca124f57 100644 (file)
@@ -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
index 2b063d4793412ae9152bd3678bedea9b7ae49af8..4faa54baccf2c4dbe91cc9093490548a7b3c40b4 100644 (file)
@@ -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() {}
  
 
index 4befe2030eebd461e8fa95577b2e31ef0ccbea46..a670a6f57704a11a8b761cd1eeb2db4193564b88 100644 (file)
@@ -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
index 62bed2f1b9f3afdce81220e2f7338d3b2912f80c..0245efc1de9eecd42a446ecf149c70e44dffe802 100644 (file)
@@ -26,9 +26,9 @@
 //  Module : SALOME
 //  $Header:  
 
-using namespace std;
 #include "SALOMEDS_DrawableAttribute.ixx"
 #include <TDataStd_Integer.hxx>
+using namespace std;
 
 //=======================================================================
 //function : GetID
index ad3cc3c5d409bcab830503c3fb5b282415149c5a..db17601b45c7b307b184bb36f9ab69e4ec9e7df7 100644 (file)
@@ -26,9 +26,9 @@
 //  Module : SALOME
 //  $Header:  
 
-using namespace std;
 #include "SALOMEDS_ExpandableAttribute.ixx"
 #include <TDataStd_Integer.hxx>
+using namespace std;
 
 //=======================================================================
 //function : GetID
index d3fc65e30d6ba44b0549b9106819195b67a3836c..053b514380fa83d11ae8100115bd3b4a833675a9 100644 (file)
@@ -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)) {
index c305641a4bdf3e533f876914d19d34a93298db3d..f71b538fd5d59051bb0018ac78ce8b719bf74881 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_IORAttribute.ixx"
 #include <TDataStd_Comment.hxx>
 #include <TCollection_ExtendedString.hxx>
 #include "SALOMEDS_Study_i.hxx"
+using namespace std;
 
 //=======================================================================
 //function : GetID
index 9f8ece15c4a1e6324e68abc4aa80820457071875..623ce7c50bbe63f8212df37871ab10cba3350259 100644 (file)
@@ -26,9 +26,9 @@
 //  Module : SALOME
 //  $Header:  
 
-using namespace std;
 #include "SALOMEDS_LocalIDAttribute.ixx"
 #include <TDataStd_Integer.hxx>
+using namespace std;
 
 //=======================================================================
 //function : GetID
index e0c7ad35f595e60d809d4f1d7a139f1b72aa75e9..5913c68423ba85da657a4c9d894287dc497dd0d2 100644 (file)
@@ -26,8 +26,8 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_OCAFApplication.ixx"
+using namespace std;
 
 //=======================================================================
 //function : SALOMEDS_OCAFApplication
index d59512cdf8a52ed98b6254477056a7b088921100..4704436ffb37cedb8884b08c5e5f07fed118c640 100644 (file)
@@ -26,9 +26,9 @@
 //  Module : SALOME
 //  $Header:  
 
-using namespace std;
 #include "SALOMEDS_OpenedAttribute.ixx"
 #include <TDataStd_Integer.hxx>
+using namespace std;
 
 //=======================================================================
 //function : GetID
index 8e313831c5faf559f8b04404b553586968e34040..8d57af837f814525971eced591d614d4aaac7624 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_PersRefAttribute.ixx"
 #include <TDataStd_Comment.hxx>
 #include <TCollection_ExtendedString.hxx>
+using namespace std;
 
 //=======================================================================
 //function : GetID
index 3fde4f60e595d279b96e94ace14e8866c9ccbdf2..1799c035f901f80bb9f876333825e7d362187da9 100644 (file)
 //  Module : SALOME
 //  $Header: 
 
-using namespace std;
 #include "SALOMEDS_PixMapAttribute.ixx"
 #include <TDataStd_Comment.hxx>
 #include <TCollection_ExtendedString.hxx>
+using namespace std;
 
 //=======================================================================
 //function : GetID
index fd0538e0ed5aaf37ca0b2432033171209903b36e..f8c8d9de49682e97059d7dd4bafb6e5ec359cb2b 100644 (file)
@@ -9,9 +9,9 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_PythonObjectAttribute.ixx"
 #include <string>
+using namespace std;
 
 const Standard_GUID& SALOMEDS_PythonObjectAttribute::GetID() 
 {
index 77b0b46554e7b8b02b1ee85f889af812839a028e..c8ae7c4c5f2d8e2a426093814d619def7bc0c9e6 100644 (file)
@@ -26,9 +26,8 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_SComponentIterator_i.hxx"
-
+using namespace std;
 
 //============================================================================
 /*! Function : constructor
index 896859cca1bd7bb366e8d213a7dbe9aa3113bd20..66264fd5b31c6098fb3807bb54ce9257fa70a49a 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEDS_SComponent_i.hxx"
 #include "utilities.h"
-
+using namespace std;
 
 //============================================================================
 /*! Function : constructor
index e10791ded1314e1f0f4f2fceab03a046425796b9..1f8851466b36e70f710a1f0c37867467fcef2103 100644 (file)
@@ -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 <TDF_AttributeIterator.hxx>
+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;
index be22a90b20bfa83b0911ec66342572cf51fea67f..cd6944c55245678cc4c56036439217767e64db09 100644 (file)
@@ -30,7 +30,7 @@
 #define __SALOMEDS_SOBJECT_I_H__
 
 // std C++ headers
-#include <iostream.h>
+#include <iostream>
 #include <vector>
 #include <string>
 
@@ -60,7 +60,7 @@ protected:
   char*                    _name;  
   char*                    _value;
   char*                    _type;
-  vector<string>           _liste_ba_type;
+  std::vector<std::string>      _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();
index 241792584449218b9e0e6c8b7b2f84354cd29311..aef7ac1bd50498e4c1cd0436d87d14326fea7463 100644 (file)
@@ -26,9 +26,9 @@
 //  Module : SALOME
 //  $Header:  
 
-using namespace std;
 #include "SALOMEDS_SelectableAttribute.ixx"
 #include <TDataStd_Integer.hxx>
+using namespace std;
 
 //=======================================================================
 //function : GetID
index 51bdda48ae24530cf037643bd21759c0255f754b..30c1cf93a90d8c2d50a67b27357a0893c5171baa 100644 (file)
@@ -26,8 +26,8 @@
 //  Module : SALOME
 //  $Header: 
 
-using namespace std;
 #include "SALOMEDS_SequenceOfIntegerAttribute.ixx"
+using namespace std;
 
 //=======================================================================
 //function : GetID
index 9e3cf84e9289a1c3f28d715161597ff6c258a6d1..9cd839f055c1f4fc1beaff6da55868c8599adebd 100644 (file)
@@ -26,9 +26,9 @@
 //  Module : SALOME
 //  $Header: 
 
-using namespace std;
 #include "SALOMEDS_SequenceOfRealAttribute.ixx"
 #include <TDataStd_Real.hxx>
+using namespace std;
 
 //=======================================================================
 //function : GetID
index d3cb87809a69c2f03bbb04b00a4583976ee5f3c9..5357fe6c92e04928fa5292f31dcff337cf9c4c78 100644 (file)
@@ -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 <HDFOI.hxx>
 #include <stdlib.h> 
+using namespace std;
 
 #define USE_CASE_LABEL_TAG            2
 #define DIRECTORYID 16661
index ba14acbf02c176f2c122267262f05f4187b42299..a7d64ccd03ac0d715bb262655d4dcbf59599174e 100644 (file)
@@ -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 <strstream>
+using namespace std;
 
 #include <SALOME_GenericObj_i.hh>
 
@@ -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;
     }
   }
 }
index 4f83613beefcdbd307b29742e21b8fd4a4797d03..62835949d174f65afe253a541af30f54b91c55db 100644 (file)
@@ -9,8 +9,8 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include <SALOMEDS_StudyPropertiesAttribute.ixx>
+using namespace std;
 
 const Standard_GUID& SALOMEDS_StudyPropertiesAttribute::GetID() 
 {
index ed98968e84807c471e040e5c042d386e987495fd..fc2591d58b3ca8101c4c318cdc4b7097aca26a05 100644 (file)
@@ -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
index a5134a76f19690450ff36fc9f1e04a89717f88ea..abe7171f80fbdb01dfea94694abd5e0422befaae 100644 (file)
@@ -9,12 +9,12 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include <SALOMEDS_TableOfIntegerAttribute.ixx>
 #include <Standard_Failure.hxx>
 #include <TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx>
 
 #include <string>
+using namespace std;
 
 const Standard_GUID& SALOMEDS_TableOfIntegerAttribute::GetID() 
 {
index f524bad983397065bf87b9dcaf864d20ad3eff0c..a15b4bce7320103471c9a7a70c5bf5c11ce6d1a7 100644 (file)
@@ -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();
 
index d12b58bb2f84c239632f75f7812b58ead84995cb..f234fca979d1e4a90d35756b0e1f8e1049fa94b8 100644 (file)
@@ -9,13 +9,13 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include <SALOMEDS_TableOfRealAttribute.ixx>
 #include <Standard_Failure.hxx>
 #include <TColStd_DataMapIteratorOfDataMapOfIntegerReal.hxx>
 
 #include <string>
 #include <stdio.h>
+using namespace std;
 
 const Standard_GUID& SALOMEDS_TableOfRealAttribute::GetID() 
 {
index a3d35069ffdb795345b587181130579a1f2bdbfd..35d8e33aea37cc69e33bda0cfd4ea6fad9f24fe0 100644 (file)
@@ -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();
 
index 737f1f752fde4b23930e765f300b65ef56a371a0..9221e9a80b821e935d54a2de77105c5354954f26 100644 (file)
@@ -8,13 +8,13 @@
 //  Author : Sergey Ruin
 //  Module : SALOME
 
-using namespace std;
 #include <SALOMEDS_TableOfStringAttribute.ixx>
 #include <Standard_Failure.hxx>
 #include <SALOMEDS_DataMapIteratorOfDataMapOfIntegerString.hxx>
 
 #include <string>
 #include <stdio.h>
+using namespace std;
 
 const Standard_GUID& SALOMEDS_TableOfStringAttribute::GetID() 
 {
index a043b9610a2483fa6068879ae07db2a7984dd9ff..9833dd56cf1c9521766e36705f34d30a36ccb312 100644 (file)
 //  Module : SALOME
 //  $Header:  
 
-using namespace std;
 #include "SALOMEDS_TargetAttribute.ixx"
 #include <TDF_Reference.hxx>
 #include <TDF_ListIteratorOfAttributeList.hxx>
 #include "utilities.h"
+using namespace std;
 
 //=======================================================================
 //function : GetID
index c264f94b3a577a09349709fef0014543184b79aa..c5eccab88c5166dcf5b74a3122cf7efc9a543238 100644 (file)
@@ -26,8 +26,8 @@
 //  Module : SALOME
 //  $Header: 
 
-using namespace std;
 #include "SALOMEDS_TextColorAttribute.ixx"
+using namespace std;
 
 //=======================================================================
 //function : GetID
index 4194d1353272ec2e1c808a7449e311b24c0f5b2d..dd95d6f6404effa615faaec0ace504f0b5c4e29e 100644 (file)
@@ -26,8 +26,8 @@
 //  Module : SALOME
 //  $Header: 
 
-using namespace std;
 #include "SALOMEDS_TextHighlightColorAttribute.ixx"
+using namespace std;
 
 //=======================================================================
 //function : GetID
index 698fbb1c6cb3de72b48c8a807e7584c4b2effac8..151a0bb9ca5d4625130fcf982a4e4d4cdfc6160a 100644 (file)
@@ -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 <TDataStd_ChildNodeIterator.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TDF_ChildIterator.hxx>
+using namespace std;
 
 #define USE_CASE_LABEL_TAG           2
 #define USE_CASE_GUID                "AA43BB12-D9CD-11d6-945D-0050DA506788"
index 69e7d39ecc165e46b3f0b402906f8bd4c90df405..05507edab6762f82219ede3b69d64957eff2a9ad 100644 (file)
@@ -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
index ecd145c4b035953ebb43b2c453b201da81d83f44..7f59b13a42f717d51a53309b727db2ae46c3ec4b 100644 (file)
@@ -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);
 
index f9d03e760673cebd5b6486735449b8543b28a1f8..fb88526ed9363b7ea86fccad5128d1c3fb442e8d 100644 (file)
@@ -9,7 +9,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "PyInterp_base.h"
 #include "utilities.h"
 #include <string>
index 48781e85f815407638cb4cdefcbf7cc4bfab31ea..9fe277d6a3a46e24df6cf9137370412bd8aee629 100644 (file)
 #ifndef _PYINTERP_BASE_H_
 #define _PYINTERP_BASE_H_
 
-using namespace std;
 #include <iostream>
 #include <Python.h>
 #include <list>
 #include <string>
+using namespace std;
 
 #define TOP_HISTORY_PY "--- top of history ---"
 #define BEGIN_HISTORY_PY "--- begin of history ---"
index 439362886164eb87beb35a7239e62b78b4c572a6..252875c5c049f837431fe3737d5393bb93d0229f 100644 (file)
@@ -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 <TCollection_AsciiString.hxx>
 #include <TCollection_ExtendedString.hxx>
 #include <Standard_Failure.hxx>
+using namespace std;
 
 static bool checkPermission(QString fileName) {
   if ( QFile::exists( fileName ) ) {
index b9d734f16a14647cf49f7d0358bea404c61912e2..593e2c41b7df0b11afb4d6886682d38b32579a92 100644 (file)
@@ -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 <qfile.h>
 #include <qregexp.h>
 #include <qtextstream.h>
+using namespace std;
 
 
 /*!
index 4b9634dfd6457f8c0645950b107d568d67d4127b..9a100591e5993238f8c750a7536d8eb2e15da098 100644 (file)
@@ -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 <OSD_LoadMode.hxx>
 #include <OSD_Function.hxx>
 #include <TCollection_AsciiString.hxx>
+using namespace std;
 
 static const char* SEPARATOR    = ":";
 
index a45638cd539f3fb928485727d869f8508bed902b..542df51cf581cfa7abe3446dbe864a832b33c039 100644 (file)
@@ -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 <qlabel.h>
 #include <qpushbutton.h>
 #include <qapplication.h>
+using namespace std;
 
 #define MIN_WIDTH     400
 #define MIN_HEIGHT    200
index df22e1e21f1eda951c4ee42715ee4df62ce90c15..a8d7173399a29cb3c9ccdc1472837404aafecb6e 100644 (file)
@@ -9,7 +9,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include <qapplication.h>
 #include <qdir.h>
 #include <qlabel.h>
@@ -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
 
index f12915a41fe7090d1be3e887ab42698141bae907..d62145052db2d1043179d4a9ed4599e9948873d7 100644 (file)
@@ -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 <qfile.h>
 #include <qfileinfo.h>
+using namespace std;
 
 /* constructor */
 QAD_FileValidator::QAD_FileValidator(QWidget* parent) :
index ad66970368b1e7144564e1cb24d322633ee6fa72..e14035b593ec60f406de7f7095347ccc8147d943 100644 (file)
@@ -26,8 +26,8 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "QAD_Help.h"
+using namespace std;
 
 /*!
   \class QAD_Help QAD_HelpL.h
index d715bf5df5ea07b0e3d1155fa34c16e6a9c71332..3aa9a858679c4bd7e0772bd7bcd4f3f409a833e3 100644 (file)
@@ -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 <qtoolbutton.h>
 #include <qcombobox.h>
 #include <qfileinfo.h>
+using namespace std;
 
 /*!
   Constructor
index c3a021d26aa860ba7f956da2af5ed9c41563e922..8edb54c480774cb6d5d007db109900944b52cfc7 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "QAD_LeftFrame.h"
 #include "QAD_ObjectBrowser.h"
 #include <qlayout.h>
+using namespace std;
 
 /*!
   \class QAD_LeftFrame QAD_LeftFrame.h
index 04c8d041dcda7c4b6c28db430e5212cd5cfd29e6..16bb368dc95e2cc680c813d9cf1bc80dc0d89eae 100644 (file)
@@ -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,
index e5a5d134fcc50accd40e81ff1f46d0bf766c528b..1d9e9a7b98e0e1a08e8df44534dd54c8080663a0 100644 (file)
@@ -26,8 +26,8 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "QAD_ListPopupMenu.h"
+using namespace std;
 
 /*!
   Constructor.
index d555fd378d308a0faed878c0e36b14e15b0042b3..9b19755df213508e4d386a068ff05be2dff0d4e1 100644 (file)
@@ -9,7 +9,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "QAD_ListView.h"
 
 #include <qheader.h>
@@ -25,6 +24,7 @@ using namespace std;
 
 #include <TColStd_ListIteratorOfListOfInteger.hxx>
 #include <TColStd_ListIteratorOfListOfReal.hxx>
+using namespace std;
 
 //////////////////////////////////////////////////////////////////////
 // QAD_ListView class implementation
index 904ee271386e42d523e7f556949c4d2fe2cf9661..b7ddf6ae7d78a02c2962a11c02f7742f0ec7312e 100644 (file)
@@ -26,8 +26,8 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "QAD_Menus.h"
+using namespace std;
 
 /*!
   Constructor.
index 4730b1ee8149727ac2802de760bc015fd8dfb91f..1f5f570c4440cf405119008d167debfb528507ae 100644 (file)
@@ -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 <qstring.h>
 #include <qpopupmenu.h>
 #include <qmap.h>
+using namespace std;
 
 enum { IdCopy, IdClear, IdSelectAll };
 
index c6aad0f760c66f44a6df9aad41e6d1e2a9902fb6..2f41606245ff5771576473c3e1964a26be10c724 100644 (file)
@@ -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 <qmessagebox.h>
 #include <qapplication.h>
+using namespace std;
 
 /*!
     Shows info message box with one button [ static ]
index eb8435512adb282ff7eeb9c251a6e3006a673f7e..9b7d93fc60340dbdc8911a2f6b3423479070b6be 100644 (file)
@@ -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 <qtooltip.h>
 #include <qdragobject.h>
 #include <qstringlist.h>
+using namespace std;
 
 //VRV: porting on Qt 3.0.5
 #if QT_VERSION >= 0x030005
index 37035831748131e59405a7b7cebf411517bf4eb0..696fb78f4273504ded2d9accc864ec544b71692e 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "QAD_ObjectBrowserItem.h"
 
 #include <qcolor.h>
@@ -34,6 +33,7 @@ using namespace std;
 #include <qpixmap.h>
 #include <qstringlist.h>
 #include <qpainter.h>
+using namespace std;
 
 /*!
   Constructors
index 87c99f194ef3486ae9564a554888681dfb140e5a..42e0bb9551ccf97b37d44f295bf8ccd92d4279b7 100644 (file)
@@ -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 <qapplication.h>
+using namespace std;
 
 /*!
     Constructor 
index 8ad4e40d0cd6eb33b35d8c9893b457f874b0863c..34bc0290c4070539e930413368cec49a82418830 100644 (file)
@@ -26,9 +26,9 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "QAD_OperatorMenus.h"
 #include "QAD_Desktop.h"
+using namespace std;
 
 /*!
   Constructor.
index b824dad2a3c988c37694b9a1bec6f946f9baf8d5..cb8fb7692483e7a8b5776725d37c9f5412656b28 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "QAD_ParserSettings.h"
 
 #include <stdio.h>
@@ -35,7 +34,7 @@ using namespace std;
 #include <qfile.h>
 #include <qfileinfo.h>
 #include <qtextstream.h>
-
+using namespace std;
 
 /*!
     Constructor.
index aa2c65a93d2cab66cd342be2db7967d2086d4e9d..9bd085b6b392108745dbf3c825cf40f84f744d48 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "QAD.h"
 #include "QAD_Popup.h"
 #include "utilities.h"
+using namespace std;
 
 /*****************************************************************************
 **  Class QAD_PopupClientServer
index 4dd3aa333701ef2d3f0601943dcab112beaeb1f1..488a50cd64eb44c25e27b18c03bd2f1ca925bfa5 100644 (file)
@@ -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 <qapplication.h>
 #include <qmap.h>
index 5f04d820f6e5f352c15db968f9a4a8a0684f2594..d01da91fa57d5455202dba9e21438efc22c2b403 100644 (file)
 //  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.
index e1be19054f92ba2205469feca27772826fa0a78e..b733314d01a218e30f3c0c7c1acfa5595249e484 100644 (file)
@@ -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.
index d116c7b33a1108d75134342ad2dac403f3e6fa3f..317222e7931d572f328aa02d09f4557b04b6b904 100644 (file)
@@ -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 <qfileinfo.h>
 
 #include <Standard.hxx>
+using namespace std;
 
 /* configuration file */
 static const char* CONFIG_FILE = "config";
index 806a1503cf4a380319d3f93778e02d00c450a320..e1108f3785a94640e8492eb7623fff2d78ff95e2 100644 (file)
@@ -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 <OSD_SharedLibrary.hxx>
+using namespace std;
 
 /*!
   \class QAD_RightFrame QAD_RightFrame.h
index 14df2e8f37d09355301193aa98655fef949c1fef..d1fec9a21cbefbd28a4e79f38e3eb0296fe6a431 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "QAD_Settings.h"
 
 #include <stdio.h>
@@ -36,6 +35,7 @@ using namespace std;
 #include <qregexp.h>
 #include <qstring.h>
 #include <qtextstream.h>
+using namespace std;
 
 /*!
     Class QAD_Settings is a base class for different kind of settings
index 6bf31664c1c2057d63450545835622c911d22f60..dffa96919a75761878c0eac185e796f6f0fd593a 100644 (file)
@@ -9,7 +9,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "QAD_SpinBoxDbl.h"
 #include <qpushbutton.h>
 #include <qpainter.h>
@@ -19,6 +18,7 @@ using namespace std;
 #include <qpixmapcache.h>
 #include <qapplication.h>
 #include <limits.h>
+using namespace std;
 
 //******************************************************************************
 // QDblRangeControl class
index cb472ea714eae5e537fa46c9ffc183a592a16a8c..0d620f597589ec833421aebba84c2548953d19c3 100644 (file)
@@ -26,8 +26,8 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "QAD_Splitter.h"
+using namespace std;
 
 /*!
   Constructs an horizontal splitter.
index 1be9aef0e0b111f80415207363ee22c0fd2162c1..166e8acf9e7bd089c804016ffb0d6aa850dd2dbd 100644 (file)
@@ -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 <qapplication.h>
+using namespace std;
 
 /*!
     Constructor
index 29bde65b10062d15e3721e005fca7be8d592ff96..d397302e09a6690a4d5eae8a49f6e1ba2cb333f0 100644 (file)
@@ -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 <qvaluelist.h>
+using namespace std;
 
 /*!
     Constructor
index e2e85bf5363a20a3b6e2c67fe80b9f96d33a46ab..dfa23e5c7a5849d342bab46d56c6807d8082e717 100644 (file)
@@ -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 <string.h>
 #include <ctype.h>
 #include <qstringlist.h>
+using namespace std;
 
 static char* tempName()
 {
index 6fa9053717f09079fc3c6c83bba10b92a28766ca..b5c19c9b4cdfd8fa5cda67d11ffae29d40d54471 100644 (file)
@@ -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 <qapplication.h>
 #include <qimage.h>
 #include "utilities.h"
+using namespace std;
 
 /*!
     Constructor
index 2226782d4581071129b3a1092aefab5d77f0edbb..85df1090063368893e4063d1deec88718b98117d 100644 (file)
@@ -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 <qaccel.h>
 #include <qstringlist.h>
 #include <qfileinfo.h>
+using namespace std;
 
 map<int,QString>             QAD_XmlHandler::_bibmap;
 
index 7ae5111de37ffbb4198f42d1caec31f4f1dd7511..fb7e5930130ddedd005f14ad829a272ea9a48a5f 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEGUI_AboutDlg.h"
 #include "QAD_Desktop.h"
 #include "QAD_Tools.h"
 #include <qlayout.h>
 #include <qpixmap.h>
 #include <qmessagebox.h>
+using namespace std;
 
 /* 
  * Constructor
index 7e326d0836a80a6b1c4660ea525c0b6702a2f55a..b5e0ecd19b995dd14a05791f52cd58868717f2c4 100644 (file)
@@ -8,7 +8,6 @@
 //  Author : Michael Zorin (mzn)
 //  Module : SALOME
 
-using namespace std;
 #include "SALOMEGUI_ActivateComponentDlg.h"
 
 #include <qpushbutton.h>
@@ -16,6 +15,7 @@ using namespace std;
 #include <qlayout.h> 
 #include <qlabel.h> 
 #include <qmessagebox.h>
+using namespace std;
 
 
 SALOMEGUI_ActivateComponentDlg::SALOMEGUI_ActivateComponentDlg ( QWidget * parent, const char * name, bool modal, WFlags f )
index fa67befd6afadcd7ddd016de3ca538067d6cfec5..faa38b44dd75129db8bc1b33cb01cf8ac0f7f740 100644 (file)
@@ -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 <Standard_Failure.hxx>
 #include <TCollection_AsciiString.hxx>
+using namespace std;
 
 /*!
     Constructor
index 090d66ad2764035484cbaab991facbf46a6a491c..556e10ca4319749de2fd920e9b690a89485cb801 100644 (file)
@@ -8,7 +8,6 @@
 //  Author : Vasily RUSYAEV (vrv)
 //  Module : SALOME
 
-using namespace std;
 #include "SALOMEGUI_CloseDlg.h"
 
 #include <qpushbutton.h>
@@ -16,6 +15,7 @@ using namespace std;
 #include <qlayout.h> 
 #include <qlabel.h> 
 #include <qmessagebox.h>
+using namespace std;
 
 
 SALOMEGUI_CloseDlg::SALOMEGUI_CloseDlg ( QWidget * parent, const char * name, bool modal, WFlags f )
index 63ce9dbe806d8dfe62bb09cd13fbb44fd7e8d17a..0b24b49b0ac99c424e0524c86580533a833114cd 100644 (file)
 //  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)
 
index 9ad17ddc1508c942b8e4fdf6241c076599c7c7e1..52de812f9af0c40c6a2680ba1ad3a6346784bcb6 100644 (file)
@@ -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 <qbuttongroup.h>
@@ -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'
index 36c535e8339d4075ec06aef4fc70b6c4ddb041fc..84e0c17ce46e3d694d4830aff024731c79d3a8cb 100644 (file)
@@ -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 )
index de3343aff21c3f655aba9a520684fd6476370f64..0e3c09dcee3775623c4f3cc2f07a9d2d2096e77e 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEGUI_LoadStudiesDlg.h"
 
 #include <qlabel.h>
 #include <qlayout.h>
 #include <qlistbox.h>
 #include <qpushbutton.h>
+using namespace std;
 
 #define SPACING_SIZE             6
 #define MARGIN_SIZE             11
index 35d4b476fc1e6a541d03af5a735b441bdd50e672..3153d8317ec569879ec2980a720b69fc61fb041b 100644 (file)
@@ -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 <qlineedit.h>
 #include <qpushbutton.h>
 #include <qlayout.h>
+using namespace std;
 
 /*!
   Constructor
index 77cde23402ba8829a9286926e38601b6e94580e1..16664321e9e57c54d09d2531abc51f3a0d2f84cf 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEGUI_OpenWith.h"
 
 #include <qlabel.h>
@@ -34,6 +33,7 @@ using namespace std;
 #include <qpushbutton.h>
 #include <qlayout.h>
 #include <qlistbox.h>
+using namespace std;
 
 #define SPACING_SIZE             6
 #define MARGIN_SIZE             11
index 971433632b17e01179674112426ccfe18124d108..ede2c4366f94e0fa7747c9473e3dcd1856f60f5b 100644 (file)
 //  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)
 {
index 3a8eb70f2a7d4b56bdf131b74881b79d158d4fe4..caa274038c5e4a1ef796754031172d6d8a28882d 100644 (file)
@@ -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 <qpushbutton.h>
 #include <qlayout.h>
 #include <qvalidator.h>
+using namespace std;
 
 #define MARGIN_SIZE     11
 #define SPACING_SIZE    6
index 15e5b4cb6099ea5c7d6eb95b3e24069efcf9c60e..4265cb95de6a9351cf223c42f80c4e26cec28d64 100644 (file)
@@ -9,7 +9,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEGUI_SetupCurveDlg.h"
 #include "QAD_Tools.h"
 #include <qlayout.h>
@@ -20,6 +19,7 @@ using namespace std;
 #include <qtoolbutton.h>
 #include <qgroupbox.h>
 #include <qcolordialog.h>
+using namespace std;
 
 #define MARGIN_SIZE      11
 #define SPACING_SIZE     6
index 0019a14ddcc66e81a149da4a24afdb1aa26e1f0f..4d9a73281c5bbdb17c17ae2ce1f20ac917c448ab 100644 (file)
@@ -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 <qpushbutton.h>
 #include <qlayout.h>
+using namespace std;
 
 #define  DEFAULT_MARGIN 11
 #define DEFAULT_SPACING 6
index 7103d349a1c6adf0411515b557e821c5301a45a8..9bf5578765af2b32f4e7ec86324b8b6ac8ccfab2 100644 (file)
@@ -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;
 
 
 /*!
index 07c1b7bdbb322f022944a049cb4285cb8d4506bd..59afc147be98ede6d9ed159aa597155b346c3992 100644 (file)
@@ -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 <qinputdialog.h>
 #include <qlabel.h>
 #include "utilities.h"
+using namespace std;
 
 #define MARGIN_SIZE       11
 #define SPACING_SIZE      6
index ed31165c36a013e438158a2e677e8436e6864a8b..8f78226ce2f328b88bd354fb6e311a3c7b95c681 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOMEGUI_TrihedronSizeDlg.h"
 
 #include <qbuttongroup.h>
@@ -34,6 +33,7 @@ using namespace std;
 #include <qpushbutton.h>
 #include <qspinbox.h>
 #include <qlayout.h>
+using namespace std;
 
 #define MARGIN_SIZE      11
 #define SPACING_SIZE      6
index d091d18dad083b0f4a783eedd7b128f866dc4299..9451c87773654993741c47ff2bc23eb9219b5722 100644 (file)
@@ -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 <qvariant.h>
 #include <qtooltip.h>
 #include <qwhatsthis.h>
+using namespace std;
 
 /* 
  *  Constructs a SALOMEGUI_ViewChoiceDlg which is a child of 'parent', with the 
index 1fca36e3ebe63a334e502df902dbe5bc7dbe9d89..7cc57f40b6993ce19ddf036a0e98bc74b16d432a 100644 (file)
@@ -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
index 7fefc9c062f0d7a2d6a8c1432c2c72493324540f..f585105332a0f218e84a89f78f4aa76fddc2ad83 100644 (file)
@@ -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() {}
  
 
index 990e1bad6b83ce5dd2d29cf106357a2f9615bc4a..9800abcf3370c69aac133be57681b7ac8bc6bb77 100644 (file)
@@ -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
index 2a095e50a7195d57555b807add0d358157eab3ee..816c9869fe0b02972cbda696697055e74e4c7d99 100644 (file)
@@ -26,6 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "SALOME_Filter.ixx"
 
+using namespace std;
index 861a7ac6340b3907fa51ef9bc2c3263005e414a3..434a31f6408a4d65a79e75a17eadfdfdc33c570a 100644 (file)
@@ -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;
index 0c5ee6097ec270daa61f1dc48e3720371b16baf3..71260fa5bed75175fbf03d91e89e4795e8378599 100644 (file)
@@ -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
index 928d94559013eb89775e41c8c202a88b6c7835ec..adb55ab723ebc57e6a6354268c48d369bf063d36 100644 (file)
@@ -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
index 95cba8a29729f1d14f18eee863959ec643d294f5..57a0e587bf1f7a3c3cf5eb090fec0ea0e0fa01ae 100644 (file)
@@ -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
index 95147d20debcec7c1997814cd1a9c5523f6fc4ef..932626022edb281e5d73d8c7eed0431c844e67f0 100644 (file)
@@ -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() {}
  
 
index b89c9d1e71fe18e790be7ad3e3e228d11c3f5843..6837e6fca7dce834f66789c541776da3a82b14e0 100644 (file)
@@ -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() {}
  
 
index 7b4b9c2ac1727a2c4fe42779ccd1751db44b352c..fef6bfd5cfd01c52ef05aad80d71f6174c17e4c2 100644 (file)
@@ -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() ;
index 6dbbdaacf68abb96cfafcf51de9f3fd727fb8f65..8b30df9f67ae7a918c02545e27b998ef019917aa 100644 (file)
@@ -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
index 3574d8d6412b8220c22bc68b2ca134822c12d1a9..cdc63948e71d601eefa8bb8aadfc753e18271da8 100644 (file)
@@ -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),
index 3e79a6c6d99060ac9b45703810c97e832cbac06a..c5477bd63a625dd28440044fa55a07a88e5b054b 100644 (file)
@@ -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_Selection>&  SALOME_Sel_GetSelections()
 {
index 4bc2a52464c934d241843dc372330995505269b7..83f1d71ec1a00ff341a886ea5fa14e5efd95fe15 100644 (file)
@@ -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){}
index 328d2fc4933728947a4dc4afc7a684ab084522de..c7059d8558e11aaac706d96fa7b50dcf2248abd5 100644 (file)
@@ -29,9 +29,8 @@
 #include <string>
 #include <iostream>
 
-using namespace std;
-
 #include "SALOME_Log.hxx"
+using namespace std;
 
 SALOME_Log* SALOME_Log::_singleton = 0;
 
index af4f565dadb4fc384da43e10a2b0946834f65609..30694062bf28f0e6f04d1605b88af6745b08c826 100644 (file)
 # endif  /* WNT */
 
 
-using namespace std;
 
 #include <iostream>
 #include <strstream>
 
+using namespace std;
 
 class SALOME_Log : public ostrstream
 {
index 4946923240b74d38e2457de8306bc9f3e227723d..76e643d9f90e312016feca16acac3b02b08d5241 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include <Python.h>
 #include <vtkRenderer.h>
 #include <vtkRenderWindowInteractor.h>
@@ -38,6 +37,7 @@ using namespace std;
 #include "QAD_Application.h"
 #include "QAD_Desktop.h"
 #include "VTKViewer_ViewFrame.h"
+using namespace std;
 
 extern "C"
 { 
index 146f123c169d55654325374b127fe897421355f6..06a168bd7879347cf376ebe30b5380e8ba8266f4 100644 (file)
@@ -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)
index 6d6e6b92a95cc66a1cf53bb62af5695977a260e5..f2a23e6a97a184df38e42bcd5428552742ae3939 100644 (file)
@@ -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 <map>
 #include <string>
+using namespace std;
 
 static PyInterp_PyQt *interp = NULL;
 static map<int,PyInterp_PyQt*> mapInterp;
index 11d2fe9ce73e3329537ca214d3ffce506d829d45..d6421eb3159f5ff8b9826ded7b27c7f64734d15b 100644 (file)
@@ -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()
 {
index 140853bb9302c7901a5c924bc02b047119a45efb..70524b0619d7be2f225a5c638c1d28f1bba99c9b 100644 (file)
@@ -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)
 {
index 01fa60ce26cbf4ab7f2cccd8a2c5fcde6d1c84e8..439ffa15ae932f76821f039c9afe0c4b00f36362 100644 (file)
@@ -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 <qlayout.h>
 #include <qcolordialog.h>
+using namespace std;
 
 SUPERVGraph_View::SUPERVGraph_View(QWidget* theParent): QWidget(theParent){
   init(theParent);
index 8c598f1dadc30b28bde50372b2b76974a0583b01..bdd9910f25af29600546d136fa596e6826db7035 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include <qapplication.h>
 #include <qlabel.h>
 
@@ -43,6 +42,7 @@ using namespace std;
 // only to use findFile method : perhaps put it in QAD_Tools ???
 #include "QAD_ResourceMgr.h"
 #include <qlabel.h>
+using namespace std;
 
 
 #include <SALOMEconfig.h>
index 154848f2119832547e2864b461b96d77ea671cf8..dc16fae7deceae32874412b7906e3a3f963d2b5d 100644 (file)
@@ -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 <OSD_SharedLibrary.hxx>
 #include <OSD_LoadMode.hxx>
 #include <OSD_Function.hxx>
+using namespace std;
 
 //=============================================================================
 /*! SALOME_Session_i
index 210c4273940dd87f805f6bcb09f2db8f3f3ec543..ae7937d7d322dec523669b40dce4a5eacd8da80f 100644 (file)
@@ -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 <TCollection_AsciiString.hxx> 
 #include <stdio.h>
-#include <iostream.h
-#include <fstream.h>
+#include <iostream> 
+#include <fstream>
 #include <OSD_Path.hxx>
 #include <OSD_File.hxx>
 #include <OSD_Directory.hxx>
@@ -23,6 +22,7 @@ using namespace std;
 #include <OSD_Protection.hxx>
 #include <OSD_SingleProtection.hxx>
 #include <OSD_FileIterator.hxx>
+using namespace std;
 
 #include <sys/time.h>
 #include <stdlib.h>
index 4b2f470890a966e09e208406670ed9221d515a00..7e98ad7b18f263ca97ddd501adfec5a1e483795e 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "ToolsGUI.h"
 #include "ToolsGUI_CatalogGeneratorDlg.h"
 
 #include "utilities.h"
 
 #include <stdlib.h>
+using namespace std;
 
 int ToolsGUI::runCommand(string & arg)
 { 
index 5c774aa8e58845af76da12b9978305152a9a5f8b..9dc3c696af30a22467045a5a16448ba2fa1c1ecd 100644 (file)
@@ -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 <OSD_Path.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <Standard_CString.hxx>
+using namespace std;
 
 #define SPACING_SIZE             6
 #define MARGIN_SIZE             11
index 85f49d22bf56e789c81708eb6ea9df380d48c746..0bb4fa7858905074a3ecdf075660478df17932bb 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "utilities.h"
 #include "SALOME_TestComponent_i.hxx"
 #include <stdio.h>
+using namespace std;
 
 Engines_TestComponent_i::Engines_TestComponent_i(CORBA::ORB_ptr orb,
                                                 PortableServer::POA_ptr poa,
index d1f1c35bb430b6df0e797f0be58204b03a527ecd..3ebb10ee22dd1d415df54c0efbba365c13df06ea 100644 (file)
@@ -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);
index a844dc7a758b48bee5b0fe19d6647808e27f15e3..989537652e3b12b12dd3c5745f3645b3fac1a781 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include "utilities.h"
 #include <iostream>
 #include <unistd.h>
 #include <SALOMEconfig.h>
 #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 (file)
index 0000000..59ba1ab
--- /dev/null
@@ -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 (file)
index 0000000..b0bf10b
--- /dev/null
@@ -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 (file)
index 0000000..4e52001
--- /dev/null
@@ -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 <iostream.h>
+#include <SALOMEconfig.h>
+#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 (file)
index 0000000..3f753af
--- /dev/null
@@ -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 <iostream>
+#include <unistd.h>
+#include <string>
+#include <SALOMEconfig.h>
+#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;
+}
index d4e953d863a94632d0bfe03015068f4845ac4e2d..0dae2c1bfddc037495c75eefe113f945e455981c 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 # include "Utils_CommException.hxx"
 
 CommException::CommException( void ): SALOME_Exception( "CommException" )
index 50737af05e9757d8f224dcc4b9c89b75befef29e..650d8dfe10f68840455965f970f6ad29709cad16 100644 (file)
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 void Nettoyage( void ) ;
 
 # include <iostream>
 # include "utilities.h"
 # include "Utils_DESTRUCTEUR_GENERIQUE.hxx"
 # include <list>
+using namespace std;
 extern "C"
 {
 # include <stdlib.h>
index 0f39159ec27e0463503efc39782c84e5cfce2d0a..c91a525e64024764bd298ef85e364a482a144d3e 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 # include "Utils_ORB_INIT.hxx" 
 # include "utilities.h" 
 
index 06f4a26f4fc671a9119e2e75bfb70d035c46faf6..d91ca119f1f1522e467e32b72a324296420f091d 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 #include <iostream>
 #include "Utils_SALOME_Exception.hxx"
 #include "utilities.h"
@@ -34,9 +33,9 @@ extern "C"
 {
 #include <math.h>
 #include <stdio.h>
-#include <string.h>
 }
-
+#include <string>
+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))
 {
        ;
 }
index f7e9a3a67c546a5ef96f434226c7fe8e60c53938..a60f61d1c3adf1e3c017e19899766ee637a31319 100644 (file)
 #if !defined( __Utils_SALOME_Exception_hxx__ )
 #define __Utils_SALOME_Exception_hxx__
 
-using namespace std;
 # include <exception>
 # include <iostream>
+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 );
index c2748f6ecb783525412bd5bfcc7ed28f170e8d46..82dd013f19a958fd12c4f0b1a42ff6d515c307ab 100644 (file)
@@ -25,7 +25,7 @@
 //  Module : SALOME
 
 # include "Utils_Timer.hxx"
-# include <stream.h>
+# include <iostream>
 using namespace std;
 
 static struct timezone *tz=(struct timezone*) malloc(sizeof(struct timezone));
index f396321e87bcb363775ace52c41f8b1c5626733f..f8b86b71e62814c71c318f8736524db66ddfffc3 100644 (file)
@@ -50,6 +50,8 @@
 #define COMPILER               "KCC" 
 #elif defined ( __PGI )
 #define COMPILER               "pgCC" 
+#elif defined ( __alpha )
+#define COMPILER               "cxx" 
 #else
 #define COMPILER               "undefined" 
 #endif
index 79602806011070ee8c61eb1a38915424347ec11e..a0c60854ebb1f9c76b2a409542bbc7f7446ffc13 100644 (file)
@@ -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)
 {
index 7712ec01e3c700e8543b58c8122eb4006d4e5e23..6aef5fb7a242feb60b446abab31af2dde50731b2 100644 (file)
@@ -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 <vtkRendererCollection.h>
 #include <vtkXOpenGLRenderWindow.h>
 #include <vtkCamera.h>
+using namespace std;
 
 //#include <GL/gl.h>
 //#include <GL/glu.h>
index 8f9e8e286b1f39d0388a8f6c3a64b3c39fc8bf18..061a6c4da61c41c76119c6d897b44b718c9d24e9 100644 (file)
 #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"