Salome HOME
Updated environment and import/export directives
[modules/kernel.git] / src / Container / SALOME_ContainerManager.hxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either 
7 // version 2.1 of the License.
8 // 
9 // This library is distributed in the hope that it will be useful 
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public  
15 // License along with this library; if not, write to the Free Software 
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/
19 //
20 #ifndef __SALOME_CONTAINERMANAGER_HXX__
21 #define __SALOME_CONTAINERMANAGER_HXX__
22
23 #include <SALOME_Container.hxx>
24
25 #include <SALOMEconfig.h>
26 #include CORBA_CLIENT_HEADER(SALOME_Component)
27 #include CORBA_CLIENT_HEADER(SALOME_ContainerManager)
28 #include "SALOME_ResourcesManager.hxx"
29 #include "SALOME_LoadRateManager.hxx"
30
31 #include <string>
32
33 class SALOME_NamingService;
34
35 class CONTAINER_EXPORT SALOME_ContainerManager:
36   public POA_Engines::ContainerManager,
37   public PortableServer::RefCountServantBase
38 {
39
40 public:
41   SALOME_ContainerManager(CORBA::ORB_ptr orb);
42   ~SALOME_ContainerManager();
43
44   Engines::Container_ptr
45   FindOrStartContainer(const Engines::MachineParameters& params,
46                        const Engines::MachineList& possibleComputer);
47
48   Engines::MachineList *
49   GetFittingResources(const Engines::MachineParameters& params,
50                       const char *componentName);
51
52   char* FindBest(const Engines::MachineList& possibleComputers);
53
54   void Shutdown();
55   void ShutdownContainers();
56
57   static const char *_ContainerManagerNameInNS;
58
59 protected:
60   Engines::Container_ptr
61   FindContainer(const Engines::MachineParameters& params,
62                 const Engines::MachineList& possibleComputers);
63
64   Engines::Container_ptr
65   FindContainer(const Engines::MachineParameters& params,
66                 const char *theMachine);
67
68   long GetIdForContainer(void);
69   long _id;
70
71   SALOME_ResourcesManager *_ResManager;
72   SALOME_NamingService *_NS;
73 };
74
75 #endif