1 // SALOME LifeCycleCORBA : implementation of containers and engines life cycle both in Python and C++
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_LifeCycleCORBA.hxx
25 // Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA
29 #ifndef _SALOME_LIFECYCLECORBA_HXX_
30 #define _SALOME_LIFECYCLECORBA_HXX_
36 #include <SALOMEconfig.h>
37 #include CORBA_CLIENT_HEADER(SALOME_ContainerManager)
38 #include CORBA_CLIENT_HEADER(SALOME_Component)
40 class SALOME_NamingService;
42 class SALOME_LifeCycleCORBA
45 SALOME_LifeCycleCORBA(SALOME_NamingService *ns);
46 virtual ~SALOME_LifeCycleCORBA();
47 Engines::Component_ptr FindOrLoad_Component(const Engines::MachineParameters& params,
48 const char *componentName);
49 Engines::Component_ptr FindOrLoad_Component(const char *containerName,
50 const char *componentName);
52 //! Establish if a component called "componentName" in a container called "containerName" exists among the list of resources
53 //! in "listOfMachines". This method uses Naming Service to find the component.
54 Engines::Component_ptr FindComponent(const char *containerName,
55 const char *componentName,
56 const Engines::MachineList& listOfMachines);
58 Engines::Component_ptr LoadComponent(const char *containerName, const char *componentName, const Engines::MachineList& listOfMachines);
60 SALOME_NamingService *_NS;
61 Engines::ContainerManager_var _ContManager;
64 std::string ContainerName( const char * aComputerContainer ,
65 std::string * theComputer ,
66 std::string * theContainer ) ;
67 std::string ComputerPath( const char * theComputer ) ;