-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 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
//=============================================================================
/*!
- * Construtor
+ * Constructor
*/
//=============================================================================
* \param componentName like COMPONENT
* try to make a Python import of COMPONENT,
* then a lib open of libCOMPONENTEngine.so
- * \return true if dlopen successfull or already done, false otherwise
+ * \return true if dlopen successful or already done, false otherwise
*/
//=============================================================================
bool ret = false;
std::string aCompName = componentName;
#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");
+#endif
#else
std::string impl_name = aCompName + string("Engine.dll");
#endif
MESSAGE("Try to load C++ component");
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
std::string aCompName = genericRegisterName;
#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");
+#endif
#else
std::string impl_name = aCompName +string("Engine.dll");
#endif
void* handle = _library_map[impl_name];
if (handle)
type_of_lib = "cpp";
- if (_library_map.count(aCompName) != 0 and !handle)
+ if (_library_map.count(aCompName) != 0 && !handle)
type_of_lib = "python";
if (type_of_lib == "Not Loaded")
return anEngine._retn();
}
+char* Engines_Parallel_Container_i::create_python_service_instance(const char* CompName,
+ CORBA::String_out reason)
+{
+ // not implemented
+ reason=CORBA::string_dup("");
+ return CORBA::string_dup("");
+}
+
//=============================================================================
//! Find or create a new component instance
/*!
if (origName[0] != '/')
{
- INFOS("path of file to copy must be an absolute path begining with '/'");
+ INFOS("path of file to copy must be an absolute path beginning with '/'");
return Engines::fileRef::_nil();
}
}
catch (...)
{
- INFOS( "Container_i::load_impl catched" ) ;
+ INFOS( "Container_i::load_impl caught" ) ;
}
return iobject._retn();
}
std::string component_registerName =
_containerName + "/" + instanceName;
- // --- Instanciate required CORBA object
+ // --- Instantiate required CORBA object
PortableServer::ObjectId *id; //not owner, do not delete (nore use var)
id = (Component_factory) ( _orb, _poa, _id, instanceName.c_str(),
}
catch (...)
{
- INFOS( "Container_i::createInstance exception catched" );
+ INFOS( "Container_i::createInstance exception caught" );
}
return iobject._retn();
}
std::string _proxy_containerName = proxy_containerName;
#ifndef WIN32
+#ifdef __APPLE__
+ string impl_name = string ("lib") + aCompName + string("Engine.dylib");
+#else
string impl_name = string ("lib") + aCompName +string("Engine.so");
+#endif
#else
string impl_name = aCompName +string("Engine.dll");
#endif
std::string instanceName = aCompName + "_inst_" + aNumI + "_work_node_" + aNumI2;
std::string component_registerName = _containerName + "/" + instanceName;
- // --- Instanciate work node
+ // --- Instantiate work node
PortableServer::ObjectId *id ; //not owner, do not delete (nore use var)
id = (Component_factory) (_orb, proxy_ior, getMyRank(), _poa, _id, instanceName.c_str(), componentName);
CORBA::string_free(proxy_ior);
}
catch (...)
{
- INFOS("Container_i::create_paco_component_node_instance exception catched");
+ INFOS("Container_i::create_paco_component_node_instance exception caught");
SALOME::ExceptionStruct es;
es.type = SALOME::INTERNAL_ERROR;
- es.text = "Container_i::create_paco_component_node_instance exception catched";
+ es.text = "Container_i::create_paco_component_node_instance exception caught";
throw SALOME::SALOME_Exception(es);
}
}
return node._retn();
}
-Engines::PyNode_ptr Engines_Parallel_Container_i::getDefaultPyNode()
+Engines::PyNode_ptr Engines_Parallel_Container_i::getDefaultPyNode(const char *nodeName)
{
INFOS("Python component not yet implemented");
return Engines::PyNode::_nil();
return node._retn();
}
-Engines::PyScriptNode_ptr Engines_Parallel_Container_i::getDefaultPyScriptNode()
+Engines::PyScriptNode_ptr Engines_Parallel_Container_i::getDefaultPyScriptNode(const char *nodeName)
{
INFOS("Python script node not yet implemented");
return Engines::PyScriptNode::_nil();