1 // SALOME ModuleCatalog : implementation of ModuleCatalog server which parsers xml description of modules
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_ModuleCatalog_Handler.hxx
25 // Author : Estelle Deville
29 #ifndef SALOME_CATALOG_HANDLER_H
30 #define SALOME_CATALOG_HANDLER_H
32 #include "utilities.h"
33 #include "SALOME_ModuleCatalog_Parser.hxx"
39 class SALOME_ModuleCatalog_Handler : public QXmlDefaultHandler
42 //! standard constructor
43 SALOME_ModuleCatalog_Handler();
45 //! standard destructor
46 virtual ~SALOME_ModuleCatalog_Handler();
49 //! method to overload handler function startDocument
50 /*! Is called before a xml file is parsed
51 \return true if no error was detected
53 virtual bool startDocument();
56 //! method to overload handler function startElement
58 \param QString argument by value
59 \param QString argument by value
60 \param QString argument by value
61 \param QXmlAttributes argument by value
62 \return true if no error was detected
64 virtual bool startElement(const QString&, const QString &,
65 const QString& qName, const QXmlAttributes& atts);
67 //! method to overload handler function endElement
69 \param QString argument by value
70 \param QString argument by value
71 \param QString argument by value
72 \return true if no error was detected
75 virtual bool endElement(const QString&, const QString &,
76 const QString& qName);
79 //! method to overload handler function characters
81 \param QString argument by value
82 \return true if no error was detected
84 virtual bool characters(const QString& chars);
86 //! method to overload handler function endDocument
87 /*! Is called at the end of the parsing
88 \return true if no error was detected
90 virtual bool endDocument();
92 //! method to overload handler function errorProtocol
94 \return the error message
96 virtual QString errorProtocol();
98 //! method to overload handler function fatalError
100 \param QXmlParseExecption argument by value
101 \return true if no error was detected
103 virtual bool fatalError(const QXmlParseException& exception);
110 QString test_path_prefix_name ;
111 QString test_computer_name ;
112 QString test_path_prefix ;
114 QString test_component_name;
115 QString test_component_username;
116 QString test_component_type ;
117 QString test_component_multistudy ;
118 QString test_component_icon ;
119 QString test_component_impltype;
121 QString test_interface_name;
123 QString test_service_name;
124 QString test_defaultservice;
125 QString test_typeofnode;
127 QString test_inParameter_type;
128 QString test_inParameter_name;
129 QString test_inParameter;
130 QString test_inParameter_list;
132 QString test_outParameter_type;
133 QString test_outParameter_name;
134 QString test_outParameter;
135 QString test_outParameter_list;
137 QString test_inDataStreamParameter_type;
138 QString test_inDataStreamParameter_name;
139 QString test_inDataStreamParameter_dependency;
140 QString test_inDataStreamParameter;
141 QString test_inDataStreamParameter_list;
143 QString test_outDataStreamParameter_type;
144 QString test_outDataStreamParameter_name;
145 QString test_outDataStreamParameter_dependency;
146 QString test_outDataStreamParameter;
147 QString test_outDataStreamParameter_list;
149 QString test_service;
150 QString test_service_list;
151 QString test_interface_list;
152 QString test_constraint;
154 QString test_component;
156 ParserPathPrefix _pathPrefix;
158 ParserComponent _aModule;
161 ParserInterfaces _interfaceList;
162 ParserInterface _aInterface;
164 ParserServices _serviceList;
165 ParserService _aService;
167 ParserParameters _inParamList;
168 ParserParameter _inParam;
170 ParserParameters _outParamList;
171 ParserParameter _outParam;
173 ParserDataStreamParameters _inDataStreamParamList;
174 ParserDataStreamParameter _inDataStreamParam;
176 ParserDataStreamParameters _outDataStreamParamList;
177 ParserDataStreamParameter _outDataStreamParam;
179 std::stack<QString> _xml_pile;
182 #endif // SALOME_CATALOG_HANDLER_H