X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FContainer%2FSALOME_Container_i.hxx;h=a3840cfb615f83c6280ae1b89f432c02260f998d;hb=dc01e26a20460b62262624152720eef916dff4f4;hp=1f0eb93cc523e7fc83a71cc79063edc8d62354bf;hpb=7d930a2d3b091ed99fc85208ce36606a3eb431e0;p=modules%2Fkernel.git diff --git a/src/Container/SALOME_Container_i.hxx b/src/Container/SALOME_Container_i.hxx index 1f0eb93cc..a3840cfb6 100644 --- a/src/Container/SALOME_Container_i.hxx +++ b/src/Container/SALOME_Container_i.hxx @@ -56,33 +56,62 @@ public: bool isServantAloneInProcess = true); virtual ~Engines_Container_i(); + // --- CORBA methods - //! Load component in current container - Engines::Component_ptr load_impl(const char* nameToRegister, - const char* componentName); + 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); - Engines::Component_ptr instance(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(); - void Shutdown(); - //! 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); - static std::string BuildContainerNameForNS(const char *ContainerName, const char *hostname); - static const char *_defaultContainerName; 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; @@ -90,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; - bool _isServantAloneInProcess; + long _pid; + bool _isServantAloneInProcess; }; #endif