1 // SALOME ResourcesCatalog : 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File : SALOME_ResourcesCatalog_Handler.hxx
25 // Author : Estelle Deville
29 #ifndef SALOME_RESOURCES_CATALOG_HANDLER
30 #define SALOME_RESOURCES_CATALOG_HANDLER
32 #include "SALOME_ResourcesCatalog_Parser.hxx"
42 class SALOME_ResourcesCatalog_Handler : public QXmlDefaultHandler
46 SALOME_ResourcesCatalog_Handler(MapOfParserResourcesType& listOfResources);
48 const MapOfParserResourcesType& GetResourcesAfterParsing() const;
50 virtual ~SALOME_ResourcesCatalog_Handler();
52 virtual bool startDocument();
54 virtual bool startElement(const QString& , const QString& ,
56 const QXmlAttributes& attrs);
58 virtual bool endElement(const QString&, const QString&,
59 const QString& qName);
61 virtual bool characters(const QString& chars);
63 virtual bool endDocument();
65 virtual QString errorProtocol();
66 virtual bool fatalError(const QXmlParseException& exception);
68 void PrepareDocToXmlFile(QDomDocument& doc);
73 std::string previous_module_name;
74 std::string previous_module_path;
76 ParserResourcesType _resource;
77 MapOfParserResourcesType& _resources_list;
79 const char *test_machine;
80 const char *test_resources;
82 const char *test_hostname;
83 const char *test_alias;
84 const char *test_protocol;
85 const char *test_mode;
86 const char *test_user_name;
87 const char *test_appli_path;
88 const char *test_modules;
89 const char *test_module_name;
90 const char *test_module_path;
91 const char *test_pre_req_file_path;
93 const char *test_mem_in_mb;
94 const char *test_cpu_freq_mhz;
95 const char *test_nb_of_nodes;
96 const char *test_nb_of_proc_per_node;
100 #endif // SALOME_RESOURCES_CATALOG_HANDLER