C++ implementation of Engines::Component interface. More...
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, bool regist=true) | |
Standard Constructor for generic Component, used in derived class. More... | |
Engines_Component_i (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, Engines::Container_ptr container, const char *instanceName, const char *interfaceName, bool notif=false, bool regist=true) | |
Standard Constructor for standalone Component, used in derived class. More... | |
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::FieldsDict * | getProperties () |
virtual void | SetOption (const char *, const char *) |
virtual char * | GetOption (const char *) |
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::TMPFile * | DumpPython (CORBA::Object_ptr theStudy, CORBA::Boolean isPublished, CORBA::Boolean isMultiFile, CORBA::Boolean &isValidScript) |
virtual Engines::Salome_file_ptr | getInputFileToService (const char *service_name, const char *Salome_file_name) |
virtual Engines::Salome_file_ptr | getOutputFileToService (const char *service_name, const char *Salome_file_name) |
virtual void | checkInputFilesToService (const char *service_name) |
virtual Engines::Salome_file_ptr | setInputFileToService (const char *service_name, const char *Salome_file_name) |
virtual void | checkOutputFilesToService (const char *service_name) |
virtual Engines::Salome_file_ptr | setOutputFileToService (const char *service_name, const char *Salome_file_name) |
virtual bool | hasObjectInfo () |
virtual char * | getObjectInfo (CORBA::Long studyId, const char *entry) |
virtual char * | getVersion () |
Get version of the component. More... | |
PortableServer::ObjectId * | getId () |
Engines_Container_i * | GetContainerPtr () |
std::string | getContainerName () |
void | setContainerName () |
virtual 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 () |
virtual void | configureSalome_file (std::string service_name, std::string file_port_name, Salome_file_i *file) |
Static Public Member Functions | |
static bool | isMultiStudy () |
static bool | isMultiInstance () |
static std::string | GetDynLibraryName (const char *componentName) |
Protected Types | |
typedef std::map< std::string, Salome_file_i * > | _t_Salome_file_map |
typedef std::map< std::string, Engines_Component_i::_t_Salome_file_map * > | _t_Service_file_map |
Protected Attributes | |
int | _studyId |
std::string | _instanceName |
std::string | _interfaceName |
std::string | _containerName |
CORBA::ORB_var | _orb |
PortableServer::POA_var | _poa |
PortableServer::ObjectId * | _id |
PortableServer::ObjectId * | _contId |
Engines::Container_var | _container |
Engines_Component_i * | _thisObj |
RegistryConnexion * | _myConnexionToRegistry |
NOTIFICATION_Supplier * | _notifSupplier |
std::map< std::string, CORBA::Any > | _fieldsDict |
_t_Service_file_map | _Input_Service_file_map |
_t_Service_file_map | _Output_Service_file_map |
_t_Service_file_map::iterator | _Service_file_map_it |
_t_Salome_file_map::iterator | _Salome_file_map_it |
std::string | _serviceName |
std::string | _graphName |
std::string | _nodeName |
Static Protected Attributes | |
static bool | _isMultiStudy = true |
static bool | _isMultiInstance = false |
C++ implementation of Engines::Component interface.
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 , |
||
bool | regist = true |
||
) |
Standard Constructor for generic Component, used in derived class.
Connection to Registry and Notification
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 |
regist | (true or false) use of registry (default true) |
Engines_Component_i::Engines_Component_i | ( | CORBA::ORB_ptr | orb, |
PortableServer::POA_ptr | poa, | ||
Engines::Container_ptr | container, | ||
const char * | instanceName, | ||
const char * | interfaceName, | ||
bool | notif = false , |
||
bool | regist = true |
||
) |
Standard Constructor for standalone Component, used in derived class.
Connection to Registry and Notification
orb | Object Request broker given by Container |
poa | Portable Object Adapter from Container (normally root_poa) |
container | container CORBA reference |
instanceName | unique instance name for this object (see Container_i) |
interfaceName | component class name |
notif | use of notification |
regist | (true or false) use of registry (default true) |
|
virtual |
Destructor: call Container for decrement of instances count. When instances count falls to 0, the container tries to remove the component library (dlclose)
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
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.
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)
|
virtual |
CORBA method: This method is to set an option specific to a certain EngineComponent.
|
virtual |
CORBA method: This method is to get value of an option specific to a certain EngineComponent.
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:
|
virtual |
C++ method: DumpPython default implementation
|
virtual |
Get version of the component.
This method is supposed to be implemented in all derived classes; default implementation returns empty string that means that no version information about the component is available.
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
std::string Engines_Component_i::getContainerName | ( | ) |
C++ method: return the name of the container associated with this component This name does not contains the "/Containers" string and all "/" are replaced by "_"
void Engines_Component_i::setContainerName | ( | ) |
C++ method: set the name of the container associated with this component (attribute containerName) This name does not contains the "/Containers" string and all "/" are replaced by "</em>"
|
virtual |
C++ method: set study Id
studyId | 0 if instance is not associated to a study, >0 otherwise (== study id) |
|
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:
|
virtual |
C++ method: used to configure the Salome_file into the runtime.
service_name | name of the service that use this Salome_file |
file_port_name | name of the Salome_file |
file | Salome_file C++ object |