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.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File : SALOME_ModuleCatalog_Handler.hxx
25 // Author : Estelle Deville
29 #ifndef SALOME_CATALOG_HANDLER_H
30 #define SALOME_CATALOG_HANDLER_H
32 #include <SALOME_ModuleCatalog.hxx>
34 #include "SALOME_ModuleCatalog_Parser.hxx"
40 class MODULECATALOG_EXPORT SALOME_ModuleCatalog_Handler : public QXmlDefaultHandler
43 //! standard constructor
44 SALOME_ModuleCatalog_Handler();
46 //! standard destructor
47 virtual ~SALOME_ModuleCatalog_Handler();
50 //! method to overload handler function startDocument
51 /*! Is called before a xml file is parsed
52 \return true if no error was detected
54 virtual bool startDocument();
57 //! method to overload handler function startElement
59 \param QString argument by value
60 \param QString argument by value
61 \param QString argument by value
62 \param QXmlAttributes argument by value
63 \return true if no error was detected
65 virtual bool startElement(const QString&, const QString &,
66 const QString& qName, const QXmlAttributes& atts);
68 //! method to overload handler function endElement
70 \param QString argument by value
71 \param QString argument by value
72 \param QString argument by value
73 \return true if no error was detected
76 virtual bool endElement(const QString&, const QString &,
77 const QString& qName);
80 //! method to overload handler function characters
82 \param QString argument by value
83 \return true if no error was detected
85 virtual bool characters(const QString& chars);
87 //! method to overload handler function endDocument
88 /*! Is called at the end of the parsing
89 \return true if no error was detected
91 virtual bool endDocument();
93 //! method to overload handler function errorProtocol
95 \return the error message
97 virtual QString errorProtocol();
99 //! method to overload handler function fatalError
101 \param QXmlParseExecption argument by value
102 \return true if no error was detected
104 virtual bool fatalError(const QXmlParseException& exception);
111 QString test_path_prefix_name ;
112 QString test_computer_name ;
113 QString test_path_prefix ;
115 QString test_component_name;
116 QString test_component_username;
117 QString test_component_type ;
118 QString test_component_multistudy ;
119 QString test_component_icon ;
120 QString test_component_impltype;
121 QString test_component_version;
122 QString test_component_comment;
124 QString test_interface_name;
126 QString test_service_name;
127 QString test_defaultservice;
128 QString test_typeofnode;
130 QString test_inParameter_type;
131 QString test_inParameter_name;
132 QString test_inParameter;
133 QString test_inParameter_list;
135 QString test_outParameter_type;
136 QString test_outParameter_name;
137 QString test_outParameter;
138 QString test_outParameter_list;
140 QString test_inDataStreamParameter_type;
141 QString test_inDataStreamParameter_name;
142 QString test_inDataStreamParameter_dependency;
143 QString test_inDataStreamParameter;
144 QString test_inDataStreamParameter_list;
146 QString test_outDataStreamParameter_type;
147 QString test_outDataStreamParameter_name;
148 QString test_outDataStreamParameter_dependency;
149 QString test_outDataStreamParameter;
150 QString test_outDataStreamParameter_list;
152 QString test_service;
153 QString test_service_list;
154 QString test_interface_list;
155 QString test_constraint;
157 QString test_component;
159 ParserPathPrefix _pathPrefix;
161 ParserComponent _aModule;
164 ParserInterfaces _interfaceList;
165 ParserInterface _aInterface;
167 ParserServices _serviceList;
168 ParserService _aService;
170 ParserParameters _inParamList;
171 ParserParameter _inParam;
173 ParserParameters _outParamList;
174 ParserParameter _outParam;
176 ParserDataStreamParameters _inDataStreamParamList;
177 ParserDataStreamParameter _inDataStreamParam;
179 ParserDataStreamParameters _outDataStreamParamList;
180 ParserDataStreamParameter _outDataStreamParam;
182 std::stack<QString> _xml_pile;
185 #endif // SALOME_CATALOG_HANDLER_H