General KERNEL Documentation     End User KERNEL Services  


SALOME_LifeCycleCORBA Class Reference

#include <SALOME_LifeCycleCORBA.hxx>


Public Member Functions

 SALOME_LifeCycleCORBA (SALOME_NamingService *ns=0)
virtual ~SALOME_LifeCycleCORBA ()
Engines::Component_ptr FindComponent (const Engines::MachineParameters &params, const char *componentName, int studyId=0)
Engines::Component_ptr LoadComponent (const Engines::MachineParameters &params, const char *componentName, int studyId=0)
Engines::Component_ptr FindOrLoad_Component (const Engines::MachineParameters &params, const char *componentName, int studyId=0)
Engines::Component_ptr FindOrLoad_Component (const char *containerName, const char *componentName)
bool isKnownComponentClass (const char *componentName)
bool isMpiContainer (const Engines::MachineParameters &params) throw (IncompatibleComponent)
int NbProc (const Engines::MachineParameters &params)
void preSet (Engines::MachineParameters &params)
Engines::ContainerManager_ptr getContainerManager ()

Protected Member Functions

Engines::Component_ptr _FindComponent (const Engines::MachineParameters &params, const char *componentName, int studyId, const Engines::MachineList &listOfMachines)
Engines::Component_ptr _LoadComponent (const Engines::MachineParameters &params, const char *componentName, int studyId, const Engines::MachineList &listOfMachines)

Protected Attributes

SALOME_NamingService_NS
Engines::ContainerManager_var _ContManager


Constructor & Destructor Documentation

SALOME_LifeCycleCORBA::SALOME_LifeCycleCORBA SALOME_NamingService ns = 0  ) 
 

Constructor

SALOME_LifeCycleCORBA::~SALOME_LifeCycleCORBA  )  [virtual]
 

Destructor


Member Function Documentation

Engines::Component_ptr SALOME_LifeCycleCORBA::FindComponent const Engines::MachineParameters params,
const char *  componentName,
int  studyId = 0
 

Public - Find and aready existing and registered component instance.

Parameters:
params machine parameters like type or name...
componentName the name of component class
studyId default = 0 : multistudy instance
Returns:
a CORBA reference of the component instance, or _nil if not found

Engines::Component_ptr SALOME_LifeCycleCORBA::LoadComponent const Engines::MachineParameters params,
const char *  componentName,
int  studyId = 0
 

Public - Load a component instance on a container defined by machine parameters

Parameters:
params machine parameters like type or name...
componentName the name of component class
studyId default = 0 : multistudy instance
Returns:
a CORBA reference of the component instance, or _nil if problem

Engines::Component_ptr SALOME_LifeCycleCORBA::FindOrLoad_Component const Engines::MachineParameters params,
const char *  componentName,
int  studyId = 0
 

Public - Find and aready existing and registered component instance or load a new component instance on a container defined by machine parameters.

Parameters:
params machine parameters like type or name...
componentName the name of component class
studyId default = 0 : multistudy instance
Returns:
a CORBA reference of the component instance, or _nil if problem

Engines::Component_ptr SALOME_LifeCycleCORBA::FindOrLoad_Component const char *  containerName,
const char *  componentName
 

Public - Find and aready existing and registered component instance or load a new component instance on a container defined by name

Parameters:
containerName the name of container, under one of the forms
  • 1 aContainer (local container)
  • 2 machine/aContainer (container on hostname = machine)
componentName the name of component class
Returns:
a CORBA reference of the component instance, or _nil if problem

bool SALOME_LifeCycleCORBA::isKnownComponentClass const char *  componentName  ) 
 

Public - Check if the component class is known in module catalog

Parameters:
componentName the name of component class
Returns:
true if found, false otherwise

bool SALOME_LifeCycleCORBA::isMpiContainer const Engines::MachineParameters params  )  throw (IncompatibleComponent)
 

Public - Not so complex... useful ?

int SALOME_LifeCycleCORBA::NbProc const Engines::MachineParameters params  ) 
 

Public -

Returns:
a number of processors not 0, only for MPI containers

void SALOME_LifeCycleCORBA::preSet Engines::MachineParameters params  ) 
 

Public - Pre initialisation of a given Engines::MachineParameters with default values.

  • container_name = "" : not relevant
  • hostname = "" : not relevant
  • OS = "" : not relevant
  • mem_mb = 0 : not relevant
  • cpu_clock = 0 : not relevant
  • nb_proc_per_node = 0 : not relevant
  • nb_node = 0 : not relevant
  • isMPI = false : standard components

Engines::ContainerManager_ptr SALOME_LifeCycleCORBA::getContainerManager  ) 
 

Public -

Returns:
the container Manager

Engines::Component_ptr SALOME_LifeCycleCORBA::_FindComponent const Engines::MachineParameters params,
const char *  componentName,
int  studyId,
const Engines::MachineList listOfMachines
[protected]
 

Establish if a component called "componentName" in a container called "containerName" exists among the list of resources in "listOfMachines". This method uses Naming Service to find the component.

Engines::Component_ptr SALOME_LifeCycleCORBA::_LoadComponent const Engines::MachineParameters params,
const char *  componentName,
int  studyId,
const Engines::MachineList listOfMachines
[protected]
 

Protected - Load a component instance.

Parameters:
params machine parameters like type or name...
componentName the name of component class
studyId default = 0 : multistudy instance
listOfMachines list of machine address
Returns:
a CORBA reference of the component instance, or _nil if problem
  • Finds a container in the list of machine or start one.
  • Try to load the component library in the container,
  • then create an instance of the component.


Field Documentation

SALOME_NamingService* SALOME_LifeCycleCORBA::_NS [protected]
 

Engines::ContainerManager_var SALOME_LifeCycleCORBA::_ContManager [protected]