1 // SALOME Container : implementation of container and engine for Kernel
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SALOME_Container_i.hxx
25 // Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA
29 #ifndef _SALOME_CONTAINER_I_HXX_
30 #define _SALOME_CONTAINER_I_HXX_
32 #include <SALOMEconfig.h>
33 #include CORBA_SERVER_HEADER(SALOME_Component)
39 #include <sys/types.h>
40 #include <omnithread.h>
44 class SALOME_NamingService;
46 class Engines_Container_i: public virtual POA_Engines::Container,
47 public virtual PortableServer::RefCountServantBase
50 Engines_Container_i();
51 Engines_Container_i(CORBA::ORB_ptr orb,
52 PortableServer::POA_ptr poa,
53 char * containerName ,
54 int argc, char* argv[],
57 virtual ~Engines_Container_i();
60 //! Launch a new container from the current container
61 Engines::Container_ptr start_impl(const char* ContainerName);
63 //! Load component in current container
64 Engines::Component_ptr load_impl(const char* nameToRegister,
65 const char* componentName);
67 //! Unload component from current container
68 void remove_impl(Engines::Component_ptr component_i);
69 void finalize_removal();
75 //! Kill current container
83 SALOME_NamingService *_NS ;
84 std::string _library_path;
85 std::string _containerName;
87 PortableServer::POA_var _poa;
88 PortableServer::ObjectId * _id ;
90 std::map<std::string, void *> handle_map ;
91 std::map<std::string, void *> remove_map ;
92 omni_mutex _numInstanceMutex ; // if several threads on the same object