1 // SALOME RessourcesCatalog : implementation of catalog resources parsing (SALOME_ModuleCatalog.idl)
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_RessourcesCatalog_Handler.hxx
25 // Author : Estelle Deville
29 #ifndef SALOME_RESSOURCES_CATALOG_HANDLER
30 #define SALOME_RESSOURCES_CATALOG_HANDLER
32 #include "SALOME_RessourcesCatalog_Parser.hxx"
38 #if defined RESSOURCESCatalog_EXPORTS
40 #define RESSOURCESCatalog_EXPORT __declspec( dllexport )
42 #define RESSOURCESCatalog_EXPORT
46 #define RESSOURCESCatalog_EXPORT __declspec( dllimport )
48 #define RESSOURCESCatalog_EXPORT
52 class RESSOURCESCatalog_EXPORT SALOME_RessourcesCatalog_Handler : public QXmlDefaultHandler
55 //! standard constructor
56 SALOME_RessourcesCatalog_Handler();
58 //! standard destructor
59 virtual ~SALOME_RessourcesCatalog_Handler();
61 //! method to overload handler function startDocument
62 /*! is called before a xml file is parsed
63 \return true if no error was detected
65 virtual bool startDocument();
67 //! method to overload handler function startElement
69 \param QString argument by value
70 \param QString argument by value
71 \param QString qName argument by value
72 \param QXmlAttributes atts argument by value
73 \return true if no error was detected
75 virtual bool startElement(const QString& , const QString& ,
76 const QString& qName, const QXmlAttributes& atts);
78 //! method to overload handler function endElement
80 \param QString argument by value
81 \param QString argument by value
82 \param QString qName argument by value
83 \return true if no error was detected
85 virtual bool endElement(const QString&, const QString&,
86 const QString& qName);
88 //! method to overload handler function characters
90 \param QString chars argument by value
91 \return true if no error was detected
93 virtual bool characters(const QString& chars);
95 //! method to overload handler function endDocument
96 /*! is called at the end of the parsing
97 \return true if no error was detected
99 virtual bool endDocument();
101 //! method to overload handler function errorProtocol
103 \return the error message
105 virtual QString errorProtocol();
107 //! method to overload handler function fatalError
109 \param QXmlParseException exception argument by value
110 \return true if no error was detected
112 virtual bool fatalError(const QXmlParseException& exception);
120 const char* test_computer;
121 const char* test_computer_name;
122 const char* test_computer_OS;
123 const char* test_computer_OS_version;
124 const char* test_proc;
125 const char* test_proc_number;
126 const char* test_proc_model;
127 const char* test_proc_cpu;
128 const char* test_proc_cache;
129 const char* test_proc_list;
130 const char* test_container_type;
131 const char* test_container_type_list;
133 Parserressources _a_ressource;
135 ListOfParserProc _procs_list;
137 ListOfParserContainerType _container_list;
141 #endif // SALOME_RESSOURCES_CATALOG_HANDLER