Salome HOME
projects
/
modules
/
kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge from V5_1_main 14/05/2010
[modules/kernel.git]
/
src
/
LifeCycleCORBA
/
Test_LifeCycleCORBA.cxx
diff --git
a/src/LifeCycleCORBA/Test_LifeCycleCORBA.cxx
b/src/LifeCycleCORBA/Test_LifeCycleCORBA.cxx
index b7d10383f07423fd83a91adf1e62166e4dc6e4e8..2444f3941ec9ba0a8848d173212515059ca5ce0e 100644
(file)
--- a/
src/LifeCycleCORBA/Test_LifeCycleCORBA.cxx
+++ b/
src/LifeCycleCORBA/Test_LifeCycleCORBA.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
08
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
10
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
@@
-19,6
+19,7
@@
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME LifeCycleCORBA : implementation of containers and engines life cycle both in Python and C++
// File : TestLifeCycleCORBA.cxx
// Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA
// SALOME LifeCycleCORBA : implementation of containers and engines life cycle both in Python and C++
// File : TestLifeCycleCORBA.cxx
// Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA
@@
-38,8
+39,6
@@
#include "utilities.h"
#include <Basics_Utils.hxx>
#include "utilities.h"
#include <Basics_Utils.hxx>
-using namespace std;
-
int main (int argc, char * argv[])
{
int main (int argc, char * argv[])
{
@@
-62,11
+61,11
@@
int main (int argc, char * argv[])
// --- get a local container,
// load an engine, and invoque methods on that engine
// --- get a local container,
// load an engine, and invoque methods on that engine
- string containerName = "myServer";
+ st
d::st
ring containerName = "myServer";
MESSAGE("FindOrLoadComponent " + containerName + "/" + "SalomeTestComponent" );
Engines::Component_var mycompo =
MESSAGE("FindOrLoadComponent " + containerName + "/" + "SalomeTestComponent" );
Engines::Component_var mycompo =
- _LCC.FindOrLoad_Component(containerName.c_str(),"SalomeTestComponent");
+
_LCC.FindOrLoad_Component(containerName.c_str(),"SalomeTestComponent");
ASSERT(!CORBA::is_nil(mycompo));
Engines::TestComponent_var m1;
m1 = Engines::TestComponent::_narrow(mycompo);
ASSERT(!CORBA::is_nil(mycompo));
Engines::TestComponent_var m1;
m1 = Engines::TestComponent::_narrow(mycompo);
@@
-77,53
+76,53
@@
int main (int argc, char * argv[])
// --- get another container,
// load an engine, and invoque methods on that engine
// --- get another container,
// load an engine, and invoque methods on that engine
- string containerName2 = "otherServer";
+ st
d::st
ring containerName2 = "otherServer";
Engines::Component_var mycompo2 =
Engines::Component_var mycompo2 =
- _LCC.FindOrLoad_Component(containerName2.c_str(),"SALOME_TestComponentPy");
+
_LCC.FindOrLoad_Component(containerName2.c_str(),"SALOME_TestComponentPy");
ASSERT(!CORBA::is_nil(mycompo2));
Engines::TestComponent_var m2;
m2 = Engines::TestComponent::_narrow(mycompo2);
ASSERT(!CORBA::is_nil(m2));
SCRUTE(m2->instanceName());
ASSERT(!CORBA::is_nil(mycompo2));
Engines::TestComponent_var m2;
m2 = Engines::TestComponent::_narrow(mycompo2);
ASSERT(!CORBA::is_nil(m2));
SCRUTE(m2->instanceName());
-
cout << m2->instanceName() <<
endl;
+
std::cout << m2->instanceName() << std::
endl;
MESSAGE("Coucou " << m2->Coucou(1L));
// --- get a third container,
// load an engine, and invoque methods on that engine
Engines::Component_var mycompo3 =
MESSAGE("Coucou " << m2->Coucou(1L));
// --- get a third container,
// load an engine, and invoque methods on that engine
Engines::Component_var mycompo3 =
- _LCC.FindOrLoad_Component("totoPy","SALOME_TestComponentPy");
+
_LCC.FindOrLoad_Component("totoPy","SALOME_TestComponentPy");
ASSERT(!CORBA::is_nil(mycompo3));
Engines::TestComponent_var m3 = Engines::TestComponent::_narrow(mycompo3);
ASSERT(!CORBA::is_nil(m3));
ASSERT(!CORBA::is_nil(mycompo3));
Engines::TestComponent_var m3 = Engines::TestComponent::_narrow(mycompo3);
ASSERT(!CORBA::is_nil(m3));
-
cout << m3->instanceName() <<
endl;
+
std::cout << m3->instanceName() << std::
endl;
// --- yet another container, with hostname,
// load an engine, and invoque methods on that engine
// --- yet another container, with hostname,
// load an engine, and invoque methods on that engine
- string containerName4 = Kernel_Utils::GetHostname();
+ st
d::st
ring containerName4 = Kernel_Utils::GetHostname();
containerName4 += "/titiPy";
Engines::Component_var mycompo4 =
containerName4 += "/titiPy";
Engines::Component_var mycompo4 =
- _LCC.FindOrLoad_Component(containerName4.c_str(),"SALOME_TestComponentPy");
+
_LCC.FindOrLoad_Component(containerName4.c_str(),"SALOME_TestComponentPy");
ASSERT(!CORBA::is_nil(mycompo4));
Engines::TestComponent_var m4 = Engines::TestComponent::_narrow(mycompo4);
ASSERT(!CORBA::is_nil(m4));
ASSERT(!CORBA::is_nil(mycompo4));
Engines::TestComponent_var m4 = Engines::TestComponent::_narrow(mycompo4);
ASSERT(!CORBA::is_nil(m4));
-
cout << m4->instanceName() <<
endl;
+
std::cout << m4->instanceName() << std::
endl;
// --- try a local file transfer
// --- try a local file transfer
- string origFileName = "/home/prascle/petitfichier";
+ st
d::st
ring origFileName = "/home/prascle/petitfichier";
SALOME_FileTransferCORBA transfer( Kernel_Utils::GetHostname(),
SALOME_FileTransferCORBA transfer( Kernel_Utils::GetHostname(),
- origFileName);
- string local = transfer.getLocalFile();
+
origFileName);
+ st
d::st
ring local = transfer.getLocalFile();
SCRUTE(local);
// --- try a file transfer from another computer
origFileName = "/home/prascle/occ60.tgz";
SALOME_FileTransferCORBA transfer2( "cli76ce",
SCRUTE(local);
// --- try a file transfer from another computer
origFileName = "/home/prascle/occ60.tgz";
SALOME_FileTransferCORBA transfer2( "cli76ce",
- origFileName);
+
origFileName);
local = transfer2.getLocalFile();
SCRUTE(local);
local = transfer2.getLocalFile();
local = transfer2.getLocalFile();
SCRUTE(local);
local = transfer2.getLocalFile();