(*it).second >>= value;
// ---todo: replace __GNUC__ test by an autoconf macro AC_CHECK_FUNC.
#if defined __GNUC__
- int ret = setenv(cle.c_str(), value, overwrite);
+// int ret = setenv(cle.c_str(), value, overwrite);
+ setenv(cle.c_str(), value, overwrite);
#else
//CCRT porting : setenv not defined in stdlib.h
std::string s(cle);
s+=value;
// char* cast because 1st arg of linux putenv function
// is not a const char* !
- int ret=putenv((char *)s.c_str());
+// int ret=putenv((char *)s.c_str());
+ putenv((char *)s.c_str());
//End of CCRT porting
#endif
MESSAGE("--- setenv: "<<cle<<" = "<< value);
CORBA::Boolean isPublished,
CORBA::Boolean& isValidScript)
{
- char* aScript = "def RebuildData(theStudy): pass";
+ const char* aScript = "def RebuildData(theStudy): pass";
char* aBuffer = new char[strlen(aScript)+1];
strcpy(aBuffer, aScript);
CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer;
for(;begin!=end;begin++) {
Salome_file_i * file = begin->second;
+ std::string file_port_name = begin->first;
+ configureSalome_file(service_name, file_port_name, file);
file->recvFiles();
}
}
for(;begin!=end;begin++) {
Salome_file_i * file = begin->second;
+ std::string file_port_name = begin->first;
+ configureSalome_file(service_name, file_port_name, file);
file->recvFiles();
}
}
}
+//=============================================================================
+/*!
+ * C++ method: used to configure the Salome_file into the runtime.
+ * \param service_name name of the service that use this Salome_file
+ * \param file_port_name name of the Salome_file
+ * \param file Salome_file C++ object
+ */
+//=============================================================================
+void
+Engines_Component_i::configureSalome_file(std::string service_name,
+ std::string file_port_name,
+ Salome_file_i * file)
+{
+ // By default this method does nothing
+}
+
long CpuUsed() ;
void CancelThread() ;
+ virtual void configureSalome_file(std::string service_name,
+ std::string file_port_name,
+ Salome_file_i * file);
+
+
protected:
int _studyId; // -1: not initialised; 0: multiStudy; >0: study
static bool _isMultiStudy;
if (files_not_ok != "")
{
+ std::cerr << "tutu" << std::endl;
SALOME::ExceptionStruct es;
es.type = SALOME::INTERNAL_ERROR;
std::string text = "files not ready : " + files_not_ok;
es.text = CORBA::string_dup(text.c_str());
+ std::cerr << "titi" << std::endl;
throw SALOME::SALOME_Exception(es);
}
else
for(;begin!=end;begin++) {
Engines::Parallel_Salome_file_proxy_impl * file = begin->second;
+ std::string file_port_name = begin->first;
+ configureSalome_file(service_name, file_port_name, file);
file->recvFiles();
}
}
for(;begin!=end;begin++) {
Engines::Parallel_Salome_file_proxy_impl * file = begin->second;
+ std::string file_port_name = begin->first;
+ configureSalome_file(service_name, file_port_name, file);
file->recvFiles();
}
}
}
+//=============================================================================
+/*!
+ * C++ method: Used by the Parallel Component to deploy a Parallel Salome_file
+ */
+//=============================================================================
void
Engines_Parallel_Component_i::send_parallel_proxy_object(CORBA::Object_ptr proxy_ref) {
_proxy = _orb->object_to_string(proxy_ref);
}
+//=============================================================================
+/*!
+ * C++ method: Used by the Parallel Component to deploy a Parallel Salome_file
+ */
+//=============================================================================
void
Engines_Parallel_Component_i::wait_parallel_object_proxy() {
char * proxy = NULL;
}
}
+//=============================================================================
+/*!
+ * C++ method: Used by the Parallel Component to deploy a Parallel Salome_file
+ */
+//=============================================================================
char *
Engines_Parallel_Component_i::get_parallel_proxy_object() {
return _proxy;
}
+
+
+//=============================================================================
+/*!
+ * C++ method: used to configure the Salome_file into the runtime.
+ * \param service_name name of the service that use this Salome_file
+ * \param file_port_name name of the Salome_file
+ * \param file Parallel Salome_file C++ object
+ */
+//=============================================================================
+void
+Engines_Parallel_Component_i::configureSalome_file(std::string service_name,
+ std::string file_port_name,
+ Engines::Parallel_Salome_file_proxy_impl * file)
+{
+ // By default this method does nothing
+}
+
void wait_parallel_object_proxy();
char * get_parallel_proxy_object();
+ virtual void configureSalome_file(std::string service_name,
+ std::string file_port_name,
+ Engines::Parallel_Salome_file_proxy_impl * file);
+
protected:
int _studyId; // -1: not initialised; 0: multiStudy; >0: study
static bool _isMultiStudy;
// in the nameing service.
_numInstanceMutex.lock() ; // lock on the instance number
_numInstance++ ;
- int numInstance = _numInstance ;
+// int numInstance = _numInstance ;
_numInstanceMutex.unlock() ;
}
cerr << "Node " << getMyRank() << " entering in paco_barrier()" << endl;