Engines::ResPolicy policy,
const Engines::CompoList& componentList)
{
- if(strcmp(getenv("SALOME_BATCH"),"1")==0)
- {
- if(_batchLaunchedContainers.empty())
- fillBatchLaunchedContainers();
- return *(_batchLaunchedContainersIter++);
- }
+ char *valenv=getenv("SALOME_BATCH");
+ if(valenv)
+ if (strcmp(valenv,"1")==0)
+ {
+ if(_batchLaunchedContainers.empty())
+ fillBatchLaunchedContainers();
+ return *(_batchLaunchedContainersIter++);
+ }
return StartContainer(params,policy,componentList);
}
SALOME_LifeCycleCORBA::FindOrLoad_Component(const char *containerName,
const char *componentName)
{
- if(strcmp(getenv("SALOME_BATCH"),"1")==0)
- {
- MESSAGE("SALOME_LifeCycleCORBA::FindOrLoad_Component BATCH " << containerName << " " << componentName ) ;
- _NS->Change_Directory("/Containers");
- CORBA::Object_ptr obj=_NS->Resolve(containerName);
- Engines::Container_var cont=Engines::Container::_narrow(obj);
- bool isLoadable = cont->load_component_Library(componentName);
- if (!isLoadable) return Engines::Component::_nil();
-
- Engines::Component_ptr myInstance =
- cont->create_component_instance(componentName, 0);
- return myInstance;
- }
+ char *valenv=getenv("SALOME_BATCH");
+ if(valenv)
+ if (strcmp(valenv,"1")==0)
+ {
+ MESSAGE("SALOME_LifeCycleCORBA::FindOrLoad_Component BATCH " << containerName << " " << componentName ) ;
+ _NS->Change_Directory("/Containers");
+ CORBA::Object_ptr obj=_NS->Resolve(containerName);
+ Engines::Container_var cont=Engines::Container::_narrow(obj);
+ bool isLoadable = cont->load_component_Library(componentName);
+ if (!isLoadable) return Engines::Component::_nil();
+
+ Engines::Component_ptr myInstance =
+ cont->create_component_instance(componentName, 0);
+ return myInstance;
+ }
MESSAGE("SALOME_LifeCycleCORBA::FindOrLoad_Component INTERACTIF " << containerName << " " << componentName ) ;
//#if 0
// --- Check if Component Name is known in ModuleCatalog