Salome HOME
sources v1.2
[modules/kernel.git] / src / RessourcesCatalog / SALOME_RessourcesCatalog_impl.hxx
1 //  SALOME RessourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl)
2 //
3 //  Copyright (C) 2003  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. 
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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : SALOME_RessourcesCatalog_impl.hxx
25 //  Author : Estelle Deville
26 //  Module : SALOME
27 //  $Header$
28
29 #ifndef RESSOURCESCATALOG_IMPL_H
30 #define RESSOURCESCATALOG_IMPL_H
31
32 #include "utilities.h"
33 #include "SALOME_RessourcesCatalog_Handler.hxx"
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SALOME_RessourcesCatalog)
36
37 class SALOME_RessourcesCatalogImpl: public POA_SALOME_RessourcesCatalog::RessourcesCatalog,
38                                   public PortableServer::RefCountServantBase 
39 {
40 public:
41   //! standard constructor
42   SALOME_RessourcesCatalogImpl(int argc, char** argv);
43
44   //! standard destructor
45   virtual ~SALOME_RessourcesCatalogImpl();
46
47   //! method to get the ressources list
48   /*!
49     \return a computer list 
50   */
51   virtual SALOME_RessourcesCatalog::ListOfComputer* GetComputerList();
52
53   //! method to get the container type list of a computer
54   /*!
55     \param computer const char* arguments
56     \return a container type list 
57   */
58   virtual SALOME_RessourcesCatalog::ListOfContainerType* GetContainerTypeList(const char* computer) throw(SALOME_RessourcesCatalog::NotFound);
59
60   //! method to get informations on a computer
61   /*!
62     \param computer const char* arguments
63     \return informations of the computer
64   */
65   virtual SALOME_RessourcesCatalog::computer_info* GetComputerInfo(const char* computer) throw(SALOME_RessourcesCatalog::NotFound);
66
67
68 private:
69
70   //! method to parse the data type catalog
71   /*! 
72     \param file const char* arguments
73     \param datatypelist ListOfParserDataType arguments
74   */
75   virtual void _parse_xml_file(const char* file, 
76                                ListOfParserressources& ressourceslist);
77
78
79  //! method to verify ressources catalog content
80   /*!
81     \param ressourceslist ListOfParserRessources arguments
82     \return true if verfication is OK
83   */
84   virtual bool _verify_ressources(ListOfParserressources ressourceslist);
85
86
87  //! method to parse arguments to get catalog file
88   /*!
89     \param argc int arguments
90     \param argv char** arguments
91     \param _path char** arguments
92     \return true if parsing is OK
93   */
94   virtual bool _parseArguments(int argc, char **argv, char **_path);
95
96  //! method to create a list of processors information from the catalog parsing
97   /*!
98     \param list_procs ListOfParserProc arguments
99     \return the processors information list
100   */
101   virtual SALOME_RessourcesCatalog::ListOfProc
102           _duplicate_procs(ListOfParserProc list_procs);
103
104
105   // will contain the path to the ressources catalog
106   char* _path_ressources;
107
108
109   //will contain the informations on the data type catalog(after parsing)
110   ListOfParserressources _ressourceslist ;
111 };
112
113 #endif // RESSOURCESCATALOG_IMPL_H