]> SALOME platform Git repositories - modules/yacs.git/blob - src/RessourcesCatalog/SALOME_RessourcesCatalog_impl.hxx
Salome HOME
42237b98bb63286a240400c3647af73c1569436d
[modules/yacs.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 #if defined RESSOURCESCatalog_EXPORTS
38 #if defined WIN32
39 #define RESSOURCESCatalog_EXPORT __declspec( dllexport )
40 #else
41 #define RESSOURCESCatalog_EXPORT
42 #endif
43 #else
44 #if defined WNT
45 #define RESSOURCESCatalog_EXPORT __declspec( dllimport )
46 #else
47 #define RESSOURCESCatalog_EXPORT
48 #endif
49 #endif
50
51 class RESSOURCESCatalog_EXPORT SALOME_RessourcesCatalogImpl: public POA_SALOME_RessourcesCatalog::RessourcesCatalog,
52                                   public PortableServer::RefCountServantBase 
53 {
54 public:
55   //! standard constructor
56   SALOME_RessourcesCatalogImpl(int argc, char** argv);
57
58   //! standard destructor
59   virtual ~SALOME_RessourcesCatalogImpl();
60
61   //! method to get the ressources list
62   /*!
63     \return a computer list 
64   */
65   virtual SALOME_RessourcesCatalog::ListOfComputer* GetComputerList();
66
67   //! method to get the container type list of a computer
68   /*!
69     \param computer const char* arguments
70     \return a container type list 
71   */
72   virtual SALOME_RessourcesCatalog::ListOfContainerType* GetContainerTypeList(const char* computer) throw(SALOME_RessourcesCatalog::NotFound);
73
74   //! method to get informations on a computer
75   /*!
76     \param computer const char* arguments
77     \return informations of the computer
78   */
79   virtual SALOME_RessourcesCatalog::computer_info* GetComputerInfo(const char* computer) throw(SALOME_RessourcesCatalog::NotFound);
80
81
82 private:
83
84   //! method to parse the data type catalog
85   /*! 
86     \param file const char* arguments
87     \param datatypelist ListOfParserDataType arguments
88   */
89   virtual void _parse_xml_file(const char* file, 
90                                ListOfParserressources& ressourceslist);
91
92
93  //! method to verify ressources catalog content
94   /*!
95     \param ressourceslist ListOfParserRessources arguments
96     \return true if verfication is OK
97   */
98   virtual bool _verify_ressources(ListOfParserressources ressourceslist);
99
100
101  //! method to parse arguments to get catalog file
102   /*!
103     \param argc int arguments
104     \param argv char** arguments
105     \param _path char** arguments
106     \return true if parsing is OK
107   */
108   virtual bool _parseArguments(int argc, char **argv, char **_path);
109
110  //! method to create a list of processors information from the catalog parsing
111   /*!
112     \param list_procs ListOfParserProc arguments
113     \return the processors information list
114   */
115   virtual SALOME_RessourcesCatalog::ListOfProc
116           _duplicate_procs(ListOfParserProc list_procs);
117
118
119   // will contain the path to the ressources catalog
120   char* _path_ressources;
121
122
123   //will contain the informations on the data type catalog(after parsing)
124   ListOfParserressources _ressourceslist ;
125 };
126
127 #endif // RESSOURCESCATALOG_IMPL_H