Salome HOME
NRI : Temporary modification for reading catalog of modules.
[modules/kernel.git] / src / RessourcesCatalog / SALOME_RessourcesCatalog_impl.hxx
1 // File: SALOME_RessourcesCatalog_impl.hxx
2 // Created: Mon Sep 10 2001
3 // Author: Estelle Deville
4 // Project: SALOME
5 // Copyright : CEA/DEN/DMSS/LGLS
6 // $Header$
7
8
9 #ifndef RESSOURCESCATALOG_IMPL_H
10 #define RESSOURCESCATALOG_IMPL_H
11
12 #include "utilities.h"
13 #include "SALOME_RessourcesCatalog_Handler.hxx"
14 #include <SALOMEconfig.h>
15 #include CORBA_SERVER_HEADER(SALOME_RessourcesCatalog)
16
17 class SALOME_RessourcesCatalogImpl: public POA_SALOME_RessourcesCatalog::RessourcesCatalog,
18                                   public PortableServer::RefCountServantBase 
19 {
20 public:
21   //! standard constructor
22   SALOME_RessourcesCatalogImpl(int argc, char** argv);
23
24   //! standard destructor
25   virtual ~SALOME_RessourcesCatalogImpl();
26
27   //! method to get the ressources list
28   /*!
29     \return a computer list 
30   */
31   virtual SALOME_RessourcesCatalog::ListOfComputer* GetComputerList();
32
33   //! method to get the container type list of a computer
34   /*!
35     \param computer const char* arguments
36     \return a container type list 
37   */
38   virtual SALOME_RessourcesCatalog::ListOfContainerType* GetContainerTypeList(const char* computer) throw(SALOME_RessourcesCatalog::NotFound);
39
40   //! method to get informations on a computer
41   /*!
42     \param computer const char* arguments
43     \return informations of the computer
44   */
45   virtual SALOME_RessourcesCatalog::computer_info* GetComputerInfo(const char* computer) throw(SALOME_RessourcesCatalog::NotFound);
46
47
48 private:
49
50   //! method to parse the data type catalog
51   /*! 
52     \param file const char* arguments
53     \param datatypelist ListOfParserDataType arguments
54   */
55   virtual void _parse_xml_file(const char* file, 
56                                ListOfParserressources& ressourceslist);
57
58
59  //! method to verify ressources catalog content
60   /*!
61     \param ressourceslist ListOfParserRessources arguments
62     \return true if verfication is OK
63   */
64   virtual bool _verify_ressources(ListOfParserressources ressourceslist);
65
66
67  //! method to parse arguments to get catalog file
68   /*!
69     \param argc int arguments
70     \param argv char** arguments
71     \param _path char** arguments
72     \return true if parsing is OK
73   */
74   virtual bool _parseArguments(int argc, char **argv, char **_path);
75
76  //! method to create a list of processors information from the catalog parsing
77   /*!
78     \param list_procs ListOfParserProc arguments
79     \return the processors information list
80   */
81   virtual SALOME_RessourcesCatalog::ListOfProc
82           _duplicate_procs(ListOfParserProc list_procs);
83
84
85   // will contain the path to the ressources catalog
86   char* _path_ressources;
87
88
89   //will contain the informations on the data type catalog(after parsing)
90   ListOfParserressources _ressourceslist ;
91 };
92
93 #endif // RESSOURCESCATALOG_IMPL_H