General KERNEL Documentation     End User KERNEL Services  


Engines_Component_i Class Reference

#include <SALOME_Component_i.hxx>

Inherits Component, and RefCountServantBase.

Inheritance diagram for Engines_Component_i:

Inheritance graph

Public Member Functions

 Engines_Component_i ()
 Engines_Component_i (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId *contId, const char *instanceName, const char *interfaceName, bool notif=false)
 Engines_Component_i (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId *contId, const char *instanceName, const char *interfaceName, int flag, bool notif=false)
virtual ~Engines_Component_i ()
char * instanceName ()
char * interfaceName ()
void ping ()
void destroy ()
CORBA::Long getStudyId ()
Engines::Container_ptr GetContainerRef ()
void setProperties (const Engines::FieldsDict &dico)
Engines::FieldsDictgetProperties ()
void Names (const char *graphName, const char *nodeName)
bool Kill_impl ()
bool Stop_impl ()
bool Suspend_impl ()
bool Resume_impl ()
CORBA::Long CpuUsed_impl ()
virtual Engines::TMPFileDumpPython (CORBA::Object_ptr theStudy, CORBA::Boolean isPublished, CORBA::Boolean &isValidScript)
PortableServer::ObjectId * getId ()
Engines_Container_iGetContainerPtr ()
bool setStudyId (CORBA::Long studyId)
void beginService (const char *serviceName)
void endService (const char *serviceName)
void sendMessage (const char *event_type, const char *message)
char * graphName ()
char * nodeName ()
bool Killer (pthread_t ThreadId, int signum)
void SetCurCpu ()
long CpuUsed ()
void CancelThread ()

Static Public Member Functions

static bool isMultiStudy ()
static bool isMultiInstance ()
static std::string GetDynLibraryName (const char *componentName)

Protected Attributes

int _studyId
std::string _instanceName
std::string _interfaceName
CORBA::ORB_ptr _orb
PortableServer::POA_ptr _poa
PortableServer::ObjectId * _id
PortableServer::ObjectId * _contId
Engines_Component_i_thisObj
RegistryConnexion * _myConnexionToRegistry
NOTIFICATION_Supplier_notifSupplier
std::map< std::string, CORBA::Any > _fieldsDict
std::string _serviceName
std::string _graphName
std::string _nodeName

Static Protected Attributes

static bool _isMultiStudy = true
static bool _isMultiInstance = false

Constructor & Destructor Documentation

Engines_Component_i::Engines_Component_i  ) 
 

Default constructor, not for use

Engines_Component_i::Engines_Component_i CORBA::ORB_ptr  orb,
PortableServer::POA_ptr  poa,
PortableServer::ObjectId *  contId,
const char *  instanceName,
const char *  interfaceName,
bool  notif = false
 

Standard Constructor for generic Component, used in derived class Connection to Registry and Notification

Parameters:
orb Object Request broker given by Container poa Portable Object Adapter from Container (normally root_poa)
contId container CORBA id inside the server
instanceName unique instance name for this object (see Container_i)
interfaceName component class name
notif use of notification

Engines_Component_i::Engines_Component_i CORBA::ORB_ptr  orb,
PortableServer::POA_ptr  poa,
PortableServer::ObjectId *  contId,
const char *  instanceName,
const char *  interfaceName,
int  flag,
bool  notif = false
 

Standard constructor for parallel component Connection Notification (no connection to Registry !)

Parameters:
orb Object Request broker given by Container poa Portable Object Adapter from Container (normally root_poa)
contId container CORBA id inside the server
instanceName unique instance name for this object (see Container_i)
interfaceName component class name
flag not used...
notif use of notification

Engines_Component_i::~Engines_Component_i  )  [virtual]
 

Destructor: call Container for decrement of instances count. When instances count falls to 0, the container tries to remove the component library (dlclose)


Member Function Documentation

char * Engines_Component_i::instanceName  ) 
 

CORBA method: return name of the instance, unique in this Container

char * Engines_Component_i::interfaceName  ) 
 

CORBA method: return name of the component class

void Engines_Component_i::ping  ) 
 

CORBA method: Test if instance is alive and responds

void Engines_Component_i::destroy  ) 
 

CORBA method: Deactivate this instance. CORBA object is deactivated (do not respond any more to CORBA calls), the connection to Regsitry is removed (Registry informed of deactivation), internal server reference counter on the derived servant class is decremented, to allow destruction of the class (delete) by POA, when there are no more references. -- TO BE USED BY CONTAINER ONLY (Container housekeeping) --

CORBA::Long Engines_Component_i::getStudyId  ) 
 

CORBA method: Get study Id

Returns:
-1: not initialised (Internal Error) 0: multistudy component instance >0: study id associated to this instance

Engines::Container_ptr Engines_Component_i::GetContainerRef  ) 
 

CORBA method: return CORBA reference of the Container

void Engines_Component_i::setProperties const Engines::FieldsDict dico  ) 
 

CORBA method: Gives a sequence of (key=string,value=any) to the component. Base class component stores the sequence in a map. The map is cleared before. This map is for use by derived classes.

Parameters:
dico sequence of (key=string,value=any)

Engines::FieldsDict * Engines_Component_i::getProperties  ) 
 

CORBA method: returns a previously stored map (key=string,value=any) as a sequence. (see setProperties)

void Engines_Component_i::Names const char *  graphName,
const char *  nodeName
 

CORBA method: used by Supervision to give names to this instance

bool Engines_Component_i::Kill_impl  ) 
 

CORBA method: used in Supervision

bool Engines_Component_i::Stop_impl  ) 
 

CORBA method: used in Supervision

bool Engines_Component_i::Suspend_impl  ) 
 

CORBA method: used in Supervision

bool Engines_Component_i::Resume_impl  ) 
 

CORBA method: used in Supervision

CORBA::Long Engines_Component_i::CpuUsed_impl  ) 
 

CORBA method:

Engines::TMPFile * Engines_Component_i::DumpPython CORBA::Object_ptr  theStudy,
CORBA::Boolean  isPublished,
CORBA::Boolean &  isValidScript
[virtual]
 

C++ method: DumpPython default implementation

PortableServer::ObjectId * Engines_Component_i::getId  ) 
 

C++ method: return CORBA instance id, the id is set in derived class constructor, when instance is activated.

Engines_Container_i * Engines_Component_i::GetContainerPtr  ) 
 

C++ method: return Container Servant

CORBA::Boolean Engines_Component_i::setStudyId CORBA::Long  studyId  ) 
 

C++ method: set study Id

Parameters:
studyId 0 if instance is not associated to a study, >0 otherwise (== study id)
Returns:
true if the set of study Id is OK must be set once by Container, at instance creation, and cannot be changed after.

static bool Engines_Component_i::isMultiStudy  )  [static]
 

static bool Engines_Component_i::isMultiInstance  )  [static]
 

string Engines_Component_i::GetDynLibraryName const char *  componentName  )  [static]
 

C++ method: return standard library name built on component name

void Engines_Component_i::beginService const char *  serviceName  ) 
 

C++ method: used by derived classes for supervision

void Engines_Component_i::endService const char *  serviceName  ) 
 

C++ method: used by derived classes for supervision

void Engines_Component_i::sendMessage const char *  event_type,
const char *  message
 

C++ method: Send message to event channel

char * Engines_Component_i::graphName  ) 
 

C++ method: -- CHECK IF USED --

char * Engines_Component_i::nodeName  ) 
 

C++ method: -- CHECK IF USED --

bool Engines_Component_i::Killer pthread_t  ThreadId,
int  signum
 

C++ method: used in Supervision (see kill_impl)

void Engines_Component_i::SetCurCpu  ) 
 

C++ method:

long Engines_Component_i::CpuUsed  ) 
 

C++ method:

void Engines_Component_i::CancelThread  ) 
 

C++ method:


Field Documentation

int Engines_Component_i::_studyId [protected]
 

bool Engines_Component_i::_isMultiStudy = true [static, protected]
 

bool Engines_Component_i::_isMultiInstance = false [static, protected]
 

std::string Engines_Component_i::_instanceName [protected]
 

std::string Engines_Component_i::_interfaceName [protected]
 

CORBA::ORB_ptr Engines_Component_i::_orb [protected]
 

PortableServer::POA_ptr Engines_Component_i::_poa [protected]
 

PortableServer::ObjectId* Engines_Component_i::_id [protected]
 

PortableServer::ObjectId* Engines_Component_i::_contId [protected]
 

Engines_Component_i* Engines_Component_i::_thisObj [protected]
 

RegistryConnexion* Engines_Component_i::_myConnexionToRegistry [protected]
 

NOTIFICATION_Supplier* Engines_Component_i::_notifSupplier [protected]
 

std::map<std::string,CORBA::Any> Engines_Component_i::_fieldsDict [protected]
 

std::string Engines_Component_i::_serviceName [protected]
 

std::string Engines_Component_i::_graphName [protected]
 

std::string Engines_Component_i::_nodeName [protected]