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
Compilation under Windows: add missing header
[modules/kernel.git]
/
src
/
ParallelContainer
/
SALOME_ParallelContainerProxy_i.cxx
diff --git
a/src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx
b/src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx
index c31c0aece96ea79156862a3a345a47d5ebc06ce8..23be1c6c040d65bd15f1f6bd06aa6a904bb74375 100644
(file)
--- a/
src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx
+++ b/
src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
14
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
21
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
@@
-69,7
+69,7
@@
Container_proxy_impl_final:: ~Container_proxy_impl_final() {
if (_NS)
delete _NS;
if (_NS)
delete _NS;
- // _fab_thread not deleted be
a
cause fab_thread is managed
+ // _fab_thread not deleted because fab_thread is managed
// by paco_fabrique_manager
}
// by paco_fabrique_manager
}
@@
-158,13
+158,17
@@
Container_proxy_impl_final::load_component_Library(const char* componentName, CO
MESSAGE("Try to load C++ component");
#ifndef WIN32
MESSAGE("Try to load C++ component");
#ifndef WIN32
+#ifdef __APPLE__
+ std::string impl_name = string ("lib") + aCompName + string("Engine.dylib");
+#else
std::string impl_name = string ("lib") + aCompName + string("Engine.so");
std::string impl_name = string ("lib") + aCompName + string("Engine.so");
+#endif
#else
std::string impl_name = aCompName + string("Engine.dll");
#endif
void* handle;
#ifndef WIN32
#else
std::string impl_name = aCompName + string("Engine.dll");
#endif
void* handle;
#ifndef WIN32
- handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ;
+ handle = dlopen( impl_name.c_str() , RTLD_LAZY
| RTLD_GLOBAL
) ;
#else
handle = dlopen( impl_name.c_str() , 0 ) ;
#endif
#else
handle = dlopen( impl_name.c_str() , 0 ) ;
#endif
@@
-212,7
+216,7
@@
Container_proxy_impl_final::load_component_Library(const char* componentName, CO
PyObject *result = PyObject_CallMethod(pyCont,
(char*)"import_component",
(char*)"s",componentName);
PyObject *result = PyObject_CallMethod(pyCont,
(char*)"import_component",
(char*)"s",componentName);
- std::string ret_p= Py
String_AsString
(result);
+ std::string ret_p= Py
Unicode_AsUTF8
(result);
Py_XDECREF(result);
Py_RELEASE_NEW_THREAD;
Py_XDECREF(result);
Py_RELEASE_NEW_THREAD;
@@
-271,11
+275,11
@@
Container_proxy_impl_final::load_component_Library(const char* componentName, CO
}
Engines::EngineComponent_ptr
}
Engines::EngineComponent_ptr
-Container_proxy_impl_final::create_component_instance(const char* componentName
, ::CORBA::Long studyId
)
+Container_proxy_impl_final::create_component_instance(const char* componentName)
{
Engines::FieldsDict_var env = new Engines::FieldsDict;
char* reason;
{
Engines::FieldsDict_var env = new Engines::FieldsDict;
char* reason;
- Engines::EngineComponent_ptr compo = create_component_instance_env(componentName,
studyId,
env, reason);
+ Engines::EngineComponent_ptr compo = create_component_instance_env(componentName, env, reason);
CORBA::string_free(reason);
return compo;
}
CORBA::string_free(reason);
return compo;
}
@@
-285,7
+289,7
@@
Container_proxy_impl_final::create_component_instance(const char* componentName,
// Composant parallèle -> création du proxy ici puis appel de la création de chaque objet participant
// au composant parallèle
Engines::EngineComponent_ptr
// Composant parallèle -> création du proxy ici puis appel de la création de chaque objet participant
// au composant parallèle
Engines::EngineComponent_ptr
-Container_proxy_impl_final::create_component_instance_env(const char* componentName,
::CORBA::Long studyId,
+Container_proxy_impl_final::create_component_instance_env(const char* componentName,
const Engines::FieldsDict& env, CORBA::String_out reason)
{
reason=CORBA::string_dup("");
const Engines::FieldsDict& env, CORBA::String_out reason)
{
reason=CORBA::string_dup("");
@@
-305,7
+309,7
@@
Container_proxy_impl_final::create_component_instance_env(const char* componentN
_numInstance++;
_numInstanceMutex.unlock();
Engines::PACO_Container_proxy_impl::updateInstanceNumber();
_numInstance++;
_numInstanceMutex.unlock();
Engines::PACO_Container_proxy_impl::updateInstanceNumber();
- return Engines::Container_proxy_impl::create_component_instance(componentName
, studyId
);
+ return Engines::Container_proxy_impl::create_component_instance(componentName);
}
// Parallel Component !
}
// Parallel Component !
@@
-313,7
+317,11
@@
Container_proxy_impl_final::create_component_instance_env(const char* componentN
// On commence par créer le proxy
#ifndef WIN32
// On commence par créer le proxy
#ifndef WIN32
+#ifdef __APPLE__
+ std::string impl_name = string ("lib") + aCompName + string("Engine.dylib");
+#else
std::string impl_name = string ("lib") + aCompName + string("Engine.so");
std::string impl_name = string ("lib") + aCompName + string("Engine.so");
+#endif
#else
std::string impl_name = aCompName + string("Engine.dll");
#endif
#else
std::string impl_name = aCompName + string("Engine.dll");
#endif
@@
-342,7
+350,7
@@
Container_proxy_impl_final::create_component_instance_env(const char* componentN
string instanceName = aCompName + "_inst_" + aNumI ;
string component_registerName = _containerName + "/" + instanceName;
string instanceName = aCompName + "_inst_" + aNumI ;
string component_registerName = _containerName + "/" + instanceName;
- // --- Instan
c
iate required CORBA object
+ // --- Instan
t
iate required CORBA object
Container_proxy_impl_final::proxy_object * proxy = new Container_proxy_impl_final::proxy_object();
proxy->proxy_id = (component_proxy_factory) (_orb,
Container_proxy_impl_final::proxy_object * proxy = new Container_proxy_impl_final::proxy_object();
proxy->proxy_id = (component_proxy_factory) (_orb,
@@
-353,7
+361,7
@@
Container_proxy_impl_final::create_component_instance_env(const char* componentN
instanceName.c_str(),
_parallel_object_topology.total);
instanceName.c_str(),
_parallel_object_topology.total);
- // --- get reference
& servant
from id
+ // --- get reference from id
CORBA::Object_var obj = _poa->id_to_reference(*(proxy->proxy_id));
component_proxy = Engines::EngineComponent::_narrow(obj);
proxy->proxy_corba_ref = component_proxy;
CORBA::Object_var obj = _poa->id_to_reference(*(proxy->proxy_id));
component_proxy = Engines::EngineComponent::_narrow(obj);
proxy->proxy_corba_ref = component_proxy;
@@
-378,7
+386,7
@@
Container_proxy_impl_final::create_component_instance_env(const char* componentN
}
catch (...)
{
}
catch (...)
{
- INFOS( "Exception ca
tched
in Proxy creation" );
+ INFOS( "Exception ca
ught
in Proxy creation" );
return Engines::EngineComponent::_nil();
}
return Engines::EngineComponent::_nil();
}
@@
-392,7
+400,7
@@
Container_proxy_impl_final::create_component_instance_env(const char* componentN
{
try
{
{
try
{
- node->create_paco_component_node_instance(componentName, _containerName.c_str()
, studyId
);
+ node->create_paco_component_node_instance(componentName, _containerName.c_str());
MESSAGE("Call create_paco_component_node_instance done on node : " << i);
}
catch (SALOME::SALOME_Exception & ex)
MESSAGE("Call create_paco_component_node_instance done on node : " << i);
}
catch (SALOME::SALOME_Exception & ex)