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 "SALOME_ModuleCatalog_Parser.hxx"
38 class SALOME_ModuleCatalog_Handler : public QXmlDefaultHandler
41 //! standard constructor
42 SALOME_ModuleCatalog_Handler();
44 //! standard destructor
45 virtual ~SALOME_ModuleCatalog_Handler();
48 //! method to overload handler function startDocument
49 /*! Is called before a xml file is parsed
50 \return true if no error was detected
52 virtual bool startDocument();
55 //! method to overload handler function startElement
57 \param QString argument by value
58 \param QString argument by value
59 \param QString argument by value
60 \param QXmlAttributes argument by value
61 \return true if no error was detected
63 virtual bool startElement(const QString&, const QString &,
64 const QString& qName, const QXmlAttributes& atts);
66 //! method to overload handler function endElement
68 \param QString argument by value
69 \param QString argument by value
70 \param QString argument by value
71 \return true if no error was detected
74 virtual bool endElement(const QString&, const QString &,
75 const QString& qName);
78 //! method to overload handler function characters
80 \param QString argument by value
81 \return true if no error was detected
83 virtual bool characters(const QString& chars);
85 //! method to overload handler function endDocument
86 /*! Is called at the end of the parsing
87 \return true if no error was detected
89 virtual bool endDocument();
91 //! method to overload handler function errorProtocol
93 \return the error message
95 virtual QString errorProtocol();
97 //! method to overload handler function fatalError
99 \param QXmlParseExecption argument by value
100 \return true if no error was detected
102 virtual bool fatalError(const QXmlParseException& exception);
109 QString test_path_prefix_name ;
110 QString test_computer_name ;
111 QString test_path_prefix ;
113 QString test_component_name;
114 QString test_component_username;
115 QString test_component_type ;
116 QString test_component_multistudy ;
117 QString test_component_icon ;
118 QString test_component_impltype;
119 QString test_component_version;
120 QString test_component_comment;
122 QString test_interface_name;
124 QString test_service_name;
125 QString test_defaultservice;
126 QString test_typeofnode;
128 QString test_inParameter_type;
129 QString test_inParameter_name;
130 QString test_inParameter;
131 QString test_inParameter_list;
133 QString test_outParameter_type;
134 QString test_outParameter_name;
135 QString test_outParameter;
136 QString test_outParameter_list;
138 QString test_inDataStreamParameter_type;
139 QString test_inDataStreamParameter_name;
140 QString test_inDataStreamParameter_dependency;
141 QString test_inDataStreamParameter;
142 QString test_inDataStreamParameter_list;
144 QString test_outDataStreamParameter_type;
145 QString test_outDataStreamParameter_name;
146 QString test_outDataStreamParameter_dependency;
147 QString test_outDataStreamParameter;
148 QString test_outDataStreamParameter_list;
150 QString test_service;
151 QString test_service_list;
152 QString test_interface_list;
153 QString test_constraint;
155 QString test_component;
157 ParserPathPrefix _pathPrefix;
159 ParserComponent _aModule;
162 ParserInterfaces _interfaceList;
163 ParserInterface _aInterface;
165 ParserServices _serviceList;
166 ParserService _aService;
168 ParserParameters _inParamList;
169 ParserParameter _inParam;
171 ParserParameters _outParamList;
172 ParserParameter _outParam;
174 ParserDataStreamParameters _inDataStreamParamList;
175 ParserDataStreamParameter _inDataStreamParam;
177 ParserDataStreamParameters _outDataStreamParamList;
178 ParserDataStreamParameter _outDataStreamParam;
180 std::stack<QString> _xml_pile;
183 #endif // SALOME_CATALOG_HANDLER_H