]> git.donarmstrong.com Git - flightcrew.git/blob - src/XercesExtensions/LocationAwareDOMParser.h
debian/patches/*: fix quilt-patch-missing-description lintian tag
[flightcrew.git] / src / XercesExtensions / LocationAwareDOMParser.h
1 /************************************************************************
2 **
3 **  Copyright (C) 2010  Strahinja Markovic
4 **
5 **  This file is part of FlightCrew.
6 **
7 **  FlightCrew is free software: you can redistribute it and/or modify
8 **  it under the terms of the GNU Lesser General Public License as published
9 **  by the Free Software Foundation, either version 3 of the License, or
10 **  (at your option) any later version.
11 **
12 **  FlightCrew is distributed in the hope that it will be useful,
13 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 **  GNU Lesser General Public License for more details.
16 **
17 **  You should have received a copy of the GNU Lesser General Public License
18 **  along with FlightCrew.  If not, see <http://www.gnu.org/licenses/>.
19 **
20 *************************************************************************/
21
22 #pragma once
23 #ifndef LOCATIONAWAREDOMPARSER_H
24 #define LOCATIONAWAREDOMPARSER_H
25
26 #include <xercesc/util/PlatformUtils.hpp>
27 #include <xercesc/parsers/XercesDOMParser.hpp>
28 #include "NodeLocationInfo.h"
29
30 namespace xc = XERCES_CPP_NAMESPACE;
31
32 namespace XercesExt
33 {
34
35 class LocationAwareDOMParser : public xc::XercesDOMParser
36 {
37 public:
38
39     LocationAwareDOMParser( xc::XMLValidator   *const valToAdopt = 0,
40                             xc::MemoryManager  *const manager = xc::XMLPlatformUtils::fgMemoryManager,
41                             xc::XMLGrammarPool *const gramPool = 0 );
42
43     /**
44       * Destructor.
45       */
46     ~LocationAwareDOMParser();
47
48     // override
49     void startElement( const xc::XMLElementDecl &elemDecl,
50                        const unsigned int uriId,
51                        const XMLCh *const prefixName,
52                        const xc::RefVectorOf< xc::XMLAttr > &attrList,
53                        const XMLSize_t attrCount,
54                        const bool isEmpty,
55                        const bool isRoot );
56
57 private:
58     XMLCh *m_LocationInfoKey;
59 };
60
61 }
62
63 #endif // LOCATIONAWAREDOMPARSER_H