29 #ifndef _SALOME_COMPONENT_I_HXX_
30 #define _SALOME_COMPONENT_I_HXX_
32 #include <SALOMEconfig.h>
34 #include "SALOME_Container.hxx"
42 #include <sys/types.h>
45 #include CORBA_SERVER_HEADER(SALOME_Component)
46 #include "NOTIFICATION.hxx"
47 #include "Salome_file_i.hxx"
49 class RegistryConnexion;
53 public virtual POA_Engines::EngineComponent,
54 public virtual PortableServer::ServantBase
59 PortableServer::POA_ptr poa,
60 PortableServer::ObjectId * contId,
61 const char *instanceName,
62 const char *interfaceName,
67 PortableServer::POA_ptr poa,
68 Engines::Container_ptr container,
69 const char *instanceName,
70 const char *interfaceName,
79 char* interfaceName();
84 CORBA::Long getStudyId();
85 Engines::Container_ptr GetContainerRef();
87 void setProperties(
const Engines::FieldsDict& dico);
88 Engines::FieldsDict* getProperties();
90 virtual void SetOption(
const char*,
const char*);
91 virtual char* GetOption(
const char*);
93 void Names(
const char * graphName ,
const char * nodeName ) ;
98 CORBA::Long CpuUsed_impl() ;
101 CORBA::Boolean isPublished,
102 CORBA::Boolean isMultiFile,
103 CORBA::Boolean& isValidScript);
106 virtual Engines::Salome_file_ptr getInputFileToService(
const char* service_name,
107 const char* Salome_file_name);
108 virtual Engines::Salome_file_ptr getOutputFileToService(
const char* service_name,
109 const char* Salome_file_name);
111 virtual void checkInputFilesToService(
const char* service_name);
112 virtual Engines::Salome_file_ptr setInputFileToService(
const char* service_name,
113 const char* Salome_file_name);
115 virtual void checkOutputFilesToService(
const char* service_name);
116 virtual Engines::Salome_file_ptr setOutputFileToService(
const char* service_name,
117 const char* Salome_file_name);
120 virtual bool hasObjectInfo() {
return false; }
121 virtual char* getObjectInfo(CORBA::Long studyId,
const char* entry) {
return CORBA::string_dup(
""); }
124 virtual char* getVersion();
128 PortableServer::ObjectId * getId();
130 std::string getContainerName();
131 void setContainerName();
133 virtual bool setStudyId(CORBA::Long studyId);
134 static bool isMultiStudy();
135 static bool isMultiInstance();
136 static std::string GetDynLibraryName(
const char *componentName);
138 void beginService(
const char *serviceName);
139 void endService(
const char *serviceName);
140 void sendMessage(
const char *event_type,
const char *message);
143 bool Killer( pthread_t ThreadId ,
int signum );
146 void CancelThread() ;
148 virtual void configureSalome_file(std::string service_name,
149 std::string file_port_name,
154 static bool _isMultiStudy;
155 static bool _isMultiInstance;
157 std::string _instanceName ;
158 std::string _interfaceName ;
159 std::string _containerName ;
162 PortableServer::POA_var _poa;
163 PortableServer::ObjectId * _id;
164 PortableServer::ObjectId * _contId;
165 Engines::Container_var _container;
167 RegistryConnexion *_myConnexionToRegistry;
169 std::map<std::string,CORBA::Any>_fieldsDict;
172 typedef std::map<std::string, Salome_file_i*> _t_Salome_file_map;
174 typedef std::map<std::string, Engines_Component_i::_t_Salome_file_map*> _t_Service_file_map;
176 _t_Service_file_map _Input_Service_file_map;
177 _t_Service_file_map _Output_Service_file_map;
178 _t_Service_file_map::iterator _Service_file_map_it;
179 _t_Salome_file_map::iterator _Salome_file_map_it;
181 std::string _serviceName ;
182 std::string _graphName ;
183 std::string _nodeName ;
187 pthread_t _ThreadId ;
189 pthread_t* _ThreadId ;
192 long _ThreadCpuUsed ;
194 bool _CanceledThread ;