Salome HOME
NRI : Remove OCC_LIBS.
[modules/kernel.git] / src / RessourcesCatalog / SALOME_RessourcesCatalog_Handler.hxx
1 //File SALOME_RessourcesCatalog_Handler.hxx
2 //Created: Fri Sept 07 2001
3 //Author: Estelle Deville
4 //Project: SALOME
5 //Copyright: CEA/DEN/DM2S/LGLS
6 //$Header$
7
8 #ifndef SALOME_RESSOURCES_CATALOG_HANDLER
9 #define SALOME_RESSOURCES_CATALOG_HANDLER
10
11 #include "utilities.h"
12 #include "SALOME_RessourcesCatalog_Parser.hxx"
13 #include <qxml.h>
14 #include <string>
15 #include <vector>
16
17 class SALOME_RessourcesCatalog_Handler : public QXmlDefaultHandler
18 {
19 public :
20   //! standard constructor
21   SALOME_RessourcesCatalog_Handler();
22
23   //! standard destructor
24   virtual ~SALOME_RessourcesCatalog_Handler();
25
26   //! method to overload handler function startDocument
27   /*! is called before a xml file is parsed
28     \return true if no error was detected
29   */
30   virtual bool startDocument();
31
32   //! method to overload handler function startElement
33   /*!
34     \param QString argument by value
35     \param QString argument by value
36     \param QString qName argument by value
37     \param QXmlAttributes atts argument by value
38     \return true if no error was detected
39   */
40   virtual bool startElement(const QString& , const QString& ,
41                             const QString& qName, const QXmlAttributes& atts);
42
43  //! method to overload handler function endElement
44   /*!
45     \param QString argument by value
46     \param QString argument by value
47     \param QString qName argument by value
48     \return true if no error was detected
49   */
50   virtual bool endElement(const QString&, const QString&,
51                           const QString& qName);
52
53  //! method to overload handler function characters
54   /*!
55     \param QString chars argument by value
56     \return true if no error was detected
57   */
58   virtual bool characters(const QString& chars);
59
60  //! method to overload handler function endDocument
61   /*! is called at the end of the parsing
62     \return true if no error was detected
63   */
64   virtual bool endDocument();
65
66  //! method to overload handler function errorProtocol
67   /*!
68     \return the error message
69   */
70   virtual QString errorProtocol();
71
72 //! method to overload handler function fatalError
73   /*!
74     \param QXmlParseException exception argument by value
75     \return true if no error was detected
76   */
77   virtual bool fatalError(const QXmlParseException& exception);
78
79
80 private :
81   QString errorProt;
82
83   string content;
84
85   const char* test_computer;
86   const char* test_computer_name;
87   const char* test_computer_OS;
88   const char* test_computer_OS_version;
89   const char* test_proc;
90   const char* test_proc_number;
91   const char* test_proc_model;
92   const char* test_proc_cpu;
93   const char* test_proc_cache;
94   const char* test_proc_list;
95   const char* test_container_type;
96   const char* test_container_type_list;
97
98   Parserressources _a_ressource;
99   
100   ListOfParserProc _procs_list;
101   ParserProc _a_proc;
102   ListOfParserContainerType _container_list;
103
104 };
105
106 #endif // SALOME_RESSOURCES_CATALOG_HANDLER