X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FContainer%2FSALOME_Container_i.hxx;h=a3840cfb615f83c6280ae1b89f432c02260f998d;hb=dc01e26a20460b62262624152720eef916dff4f4;hp=6f309c50c8302c1d91249d0562d18a7680b9e23c;hpb=ca921d4a4fa66c9dfe515a6f31bee1817601dfb9;p=modules%2Fkernel.git diff --git a/src/Container/SALOME_Container_i.hxx b/src/Container/SALOME_Container_i.hxx index 6f309c50c..a3840cfb6 100644 --- a/src/Container/SALOME_Container_i.hxx +++ b/src/Container/SALOME_Container_i.hxx @@ -52,34 +52,66 @@ public: PortableServer::POA_ptr poa, char * containerName , int argc, char* argv[], - bool regist = true, - bool activ = true); + bool activAndRegist = true, + bool isServantAloneInProcess = true); virtual ~Engines_Container_i(); + // --- CORBA methods - //! Launch a new container from the current container - Engines::Container_ptr start_impl(const char* ContainerName); + bool load_component_Library(const char* componentName); + + Engines::Component_ptr + create_component_instance( const char* componentName, + CORBA::Long studyId); // 0 for multiStudy + + Engines::Component_ptr + find_component_instance( const char* registeredName, + CORBA::Long studyId); // 0 for multiStudy + + Engines::Component_ptr + load_impl(const char* nameToRegister, + const char* componentName); - //! Load component in current container - Engines::Component_ptr load_impl(const char* nameToRegister, - const char* componentName); - //! Unload component from current container void remove_impl(Engines::Component_ptr component_i); void finalize_removal(); + void Shutdown(); + char* getHostName(); + CORBA::Long getPID(); char* name(); - char* machineName(); void ping(); - //! Kill current container bool Kill_impl() ; - char* getHostName(); - CORBA::Long getPID(); + //char* machineName(); + //Engines::Component_ptr instance(const char* nameToRegister, + // const char* componentName); + + // --- local C++ methods + + Engines::Component_ptr + find_or_create_instance( std::string genericRegisterName, + std::string componentLibraryName); + + Engines::Component_ptr + createInstance(std::string genericRegisterName, + void *handle, + int studyId); + + static bool isPythonContainer(const char* ContainerName); + static std::string BuildContainerNameForNS(const char *ContainerName, + const char *hostname); + static void decInstanceCnt(std::string genericRegisterName); protected: + static const char *_defaultContainerName; + static std::map _cntInstances_map; + static std::map _library_map; // library names, loaded + static std::map _toRemove_map;// library names to remove + static omni_mutex _numInstanceMutex ; // lib and instance protection + SALOME_NamingService *_NS ; std::string _library_path; std::string _containerName; @@ -87,16 +119,14 @@ protected: PortableServer::POA_var _poa; PortableServer::ObjectId * _id ; int _numInstance ; - std::map handle_map ; - std::map remove_map ; - omni_mutex _numInstanceMutex ; // if several threads on the same object + std::map _listInstances_map; //private: - int _argc ; + int _argc ; char** _argv ; - long _pid; - + long _pid; + bool _isServantAloneInProcess; }; #endif