Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/kernel.git] / src / Communication / SenderFactory.cxx
index d0f38a4abe6e4c208a113b6ad00dfa54e53fd49c..3a49ec5c9476e2c82e15096636b2191c13418a24 100644 (file)
@@ -1,29 +1,29 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "SALOME_Comm_i.hxx"
 #include "SenderFactory.hxx"
 #include "utilities.h"
 #include "SALOMEMultiComm.hxx"
-using namespace std;
 
 #ifdef COMP_CORBA_DOUBLE
 #define SALOME_CorbaDoubleSender SALOME_CorbaDoubleNCSender_i
@@ -42,29 +42,29 @@ SALOME::SenderDouble_ptr SenderFactory::buildSender(SALOMEMultiComm &multiCommun
     {
     case SALOME::CORBA_:
       {
-       SALOME_CorbaDoubleSender * retc=new SALOME_CorbaDoubleSender(tab,lgr,ownTab);
-       return retc->_this();
+        SALOME_CorbaDoubleSender * retc=new SALOME_CorbaDoubleSender(tab,lgr,ownTab);
+        return retc->_this();
       }
 #ifdef HAVE_MPI2
     case SALOME::MPI_:
       {
-       SALOME_MPISenderDouble_i* retm=new SALOME_MPISenderDouble_i(tab,lgr,ownTab);
-       return retm->_this();
+        SALOME_MPISenderDouble_i* retm=new SALOME_MPISenderDouble_i(tab,lgr,ownTab);
+        return retm->_this();
       }
 #endif
 #ifdef HAVE_SOCKET
     case SALOME::SOCKET_:
       {
-       SALOME_SocketSenderDouble_i* rets=new SALOME_SocketSenderDouble_i(tab,lgr,ownTab);
-       return rets->_this();
+        SALOME_SocketSenderDouble_i* rets=new SALOME_SocketSenderDouble_i(tab,lgr,ownTab);
+        return rets->_this();
       }
 #endif
     default:
       {
-       multiCommunicator.setProtocol(SALOME::CORBA_);
-       MESSAGE("PROTOCOL CHANGED TO CORBA");
-       SALOME_CorbaDoubleSender * retc=new SALOME_CorbaDoubleSender(tab,lgr,ownTab);
-       return retc->_this();
+        multiCommunicator.setProtocol(SALOME::CORBA_);
+        MESSAGE("PROTOCOL CHANGED TO CORBA");
+        SALOME_CorbaDoubleSender * retc=new SALOME_CorbaDoubleSender(tab,lgr,ownTab);
+        return retc->_this();
       }
 //       throw MultiCommException("Communication protocol not implemented");
     }
@@ -75,28 +75,28 @@ SALOME::SenderInt_ptr SenderFactory::buildSender(SALOMEMultiComm &multiCommunica
     {
     case SALOME::CORBA_:
       {
-       SALOME_CorbaLongSender * retc=new SALOME_CorbaLongSender(tab,lgr,ownTab);
-       return retc->_this();
+        SALOME_CorbaLongSender * retc=new SALOME_CorbaLongSender(tab,lgr,ownTab);
+        return retc->_this();
       }
 #ifdef HAVE_MPI2
     case SALOME::MPI_:
       {
-       SALOME_MPISenderInt_i* retm=new SALOME_MPISenderInt_i(tab,lgr,ownTab);
-       return retm->_this();
+        SALOME_MPISenderInt_i* retm=new SALOME_MPISenderInt_i(tab,lgr,ownTab);
+        return retm->_this();
       }
 #endif
 #ifdef HAVE_SOCKET
     case SALOME::SOCKET_:
       {
-       SALOME_SocketSenderInt_i* rets=new SALOME_SocketSenderInt_i(tab,lgr,ownTab);
-       return rets->_this();
+        SALOME_SocketSenderInt_i* rets=new SALOME_SocketSenderInt_i(tab,lgr,ownTab);
+        return rets->_this();
       }
 #endif
     default:
       {
-       multiCommunicator.setProtocol(SALOME::CORBA_);
-       SALOME_CorbaLongSender * retc=new SALOME_CorbaLongSender(tab,lgr,ownTab);
-       return retc->_this();
+        multiCommunicator.setProtocol(SALOME::CORBA_);
+        SALOME_CorbaLongSender * retc=new SALOME_CorbaLongSender(tab,lgr,ownTab);
+        return retc->_this();
       }
 //       throw MultiCommException("Communication protocol not implemented"); 
     }