Version: 9.15.0
SALOME_LifeCycleCORBA.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2025 CEA, EDF, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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, or (at your option) any later version.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 
23 // File : SALOME_LifeCycleCORBA.hxx
24 // Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA
25 // Module : SALOME
26 
27 #ifndef _SALOME_LIFECYCLECORBA_HXX_
28 #define _SALOME_LIFECYCLECORBA_HXX_
29 
30 #include <stdlib.h>
31 #ifndef WIN32
32 #include <unistd.h>
33 #endif
34 #include <string>
35 
36 #include <SALOMEconfig.h>
37 #include <Utils_SALOME_Exception.hxx>
38 #include CORBA_CLIENT_HEADER(SALOME_ContainerManager)
39 #include CORBA_CLIENT_HEADER(SALOME_Component)
40 #include <iostream>
41 
42 #ifdef WIN32
43 # if defined LIFECYCLECORBA_EXPORTS || defined SalomeLifeCycleCORBA_EXPORTS
44 # define LIFECYCLECORBA_EXPORT __declspec( dllexport )
45 # else
46 # define LIFECYCLECORBA_EXPORT __declspec( dllimport )
47 # endif
48 #else
49 # define LIFECYCLECORBA_EXPORT
50 #endif
51 
52 
54 
56 {
57 public :
60 };
61 
63 {
64 public:
66  virtual ~SALOME_LifeCycleCORBA();
67 
68  Engines::EngineComponent_ptr
69  FindComponent(const Engines::ContainerParameters& params,
70  const char *componentName);
71 
72  Engines::EngineComponent_ptr
73  LoadComponent(const Engines::ContainerParameters& params,
74  const char *componentName);
75 
76  Engines::EngineComponent_ptr
77  FindOrLoad_Component(const Engines::ContainerParameters& params,
78  const char *componentName);
79 
80  Engines::EngineComponent_ptr
81  FindOrLoad_Component(const char *containerName,
82  const char *componentName);
83 
84  // Parallel extension
85  Engines::EngineComponent_ptr
86  Load_ParallelComponent(const Engines::ContainerParameters& params,
87  const char *componentName);
88 
89  bool isKnownComponentClass(const char *componentName);
90 
91  int NbProc(const Engines::ContainerParameters& params);
92 
93  static void preSet(Engines::ResourceParameters& outparams);
94  static void preSet(Engines::ContainerParameters& outparams);
95 
96  Engines::ContainerManager_ptr getContainerManager();
97  Engines::ResourcesManager_ptr getResourcesManager();
98  SALOME_NamingService_Abstract * namingService();
99  CORBA::ORB_ptr orb();
100  void copyFile(const char* hostSrc, const char* fileSrc, const char* hostDest, const char* fileDest);
101 
102  void shutdownServers(bool shutdownLauncher=true);
103  static void killOmniNames();
104 
105 protected:
106 
112  Engines::EngineComponent_ptr
113  _FindComponent(const Engines::ContainerParameters& params,
114  const char *componentName,
115  const Engines::ResourceList& listOfResources);
116 
117  Engines::EngineComponent_ptr
118  _LoadComponent(const Engines::ContainerParameters& params,
119  const char *componentName);
120 
123  Engines::ContainerManager_var _ContManager;
124  Engines::ResourcesManager_var _ResManager;
125 
126 } ;
127 
129 {
130 public:
132 };
133 
134 #endif
#define LIFECYCLECORBA_EXPORT
Definition: SALOME_LifeCycleCORBA.hxx:49
Definition: SALOME_LifeCycleCORBA.hxx:56
Definition: SALOME_LifeCycleCORBA.hxx:129
A class to manage life cycle of SALOME components.
Definition: SALOME_LifeCycleCORBA.hxx:63
SALOME_NamingService_Abstract * _NSnew
Definition: SALOME_LifeCycleCORBA.hxx:122
SALOME_NamingService_Abstract * _NS
Definition: SALOME_LifeCycleCORBA.hxx:121
Engines::ContainerManager_var _ContManager
Definition: SALOME_LifeCycleCORBA.hxx:123
Engines::ResourcesManager_var _ResManager
Definition: SALOME_LifeCycleCORBA.hxx:124
Definition: SALOME_NamingService_Abstract.hxx:46
sequence< string > ResourceList
Type to transmit list of resources.
Definition: SALOME_ResourcesManager.idl:35
Engines::ResourcesManager_ptr getResourcesManager()
Definition: SALOME_KernelServices.cxx:123
containerName
Definition: SALOME_ContainerPy.py:383
def killOmniNames(port)
Definition: salome_utils.py:556
orb
Definition: salome.py:122
Type to describe required properties of a container.
Definition: SALOME_ContainerManager.idl:38
Type to describe required properties of a resource.
Definition: SALOME_ResourcesManager.idl:42