Salome HOME
0021165: [CEA] Unit test crashes salome session
[modules/kernel.git] / src / ParallelContainer / SALOME_ParallelContainerProxyDummy.cxx
index 3521a46d81d199fbc024f28a7f1b41c97724fc54..d5a0974e56136a7b2c857e6f7e2aff0579be3980 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -19,6 +19,7 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  SALOME ParallelContainerProxyDummy : Proxy of a PaCO++ object using Dummy
 //  File   : SALOME_ParallelContainerProxyDummy.cxx
 //  Author : AndrĂ© Ribes, EDF
 
 #ifdef DEBUG_PARALLEL
 #include <signal.h>
-using namespace std;
 
 void handler(int t) {
-  cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
-  cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
-  cerr << "SIGSEGV in :" << getpid() << endl;
-  cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
-  cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl;
+  std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
+  std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
+  std::cerr << "SIGSEGV in :" << getpid() << std::endl;
+  std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
+  std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
   while (1) {}
 }
 #endif
@@ -107,9 +107,9 @@ int main(int argc, char* argv[])
 
     Container_proxy_impl_final * proxy = 
       new Container_proxy_impl_final(orb,
-                                    pfm->get_thread("omnithread"),
-                                    root_poa,
-                                    containerName);
+                                     pfm->get_thread("omnithread"),
+                                     root_poa,
+                                     containerName);
     proxy->setLibCom("dummy", proxy);
     proxy->setLibThread("omnithread");
     // Topo of the parallel object
@@ -122,11 +122,11 @@ int main(int argc, char* argv[])
     obj = proxy->_this();
 
     // In the NamingService
-    string hostname = Kernel_Utils::GetHostname();
+    std::string hostname = Kernel_Utils::GetHostname();
     Engines::Container_var pCont = Engines::Container::_narrow(obj);
     string _containerName = ns->BuildContainerNameForNS(containerName.c_str(),
-                                                       hostname.c_str());
-    cerr << "---------" << _containerName << "----------" << endl;
+                                                        hostname.c_str());
+    std::cerr << "---------" << _containerName << "----------" << std::endl;
     ns->Register(pCont, _containerName.c_str());
     pman->activate();
     orb->run();