LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
SymbolicCodeXMLHandler.h
Go to the documentation of this file.
1// Copyright 2002-2022 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6/***************************************************************************
7 * Copyright (C) 2004 by CEA LIST *
8 * *
9 ***************************************************************************/
10
11#ifndef SYMBOLICCODEXMLHANDLER_H
12#define SYMBOLICCODEXMLHANDLER_H
13
15
16#include<QtXml/QXmlDefaultHandler>
17
18#include <string>
19#include <vector>
20#include <map>
21
23
24class LIMA_PROPERTYCODE_EXPORT SymbolicCodeXMLHandler : public QXmlDefaultHandler
25{
26public:
27 // -----------------------------------------------------------------------
28 // Constructors
29 // -----------------------------------------------------------------------
30 SymbolicCodeXMLHandler(const Lima::Common::PropertyCode::PropertyCodeManager& pcm,std::map<std::string,Lima::LinguisticCode>& outputMap);
32
33
34 // -----------------------------------------------------------------------
35 // Implementations of the SAX DocumentHandler interface
36 // -----------------------------------------------------------------------
37 bool endElement(const QString & namespaceURI, const QString & name, const QString & qName) override;
38
39 bool startElement(const QString & namespaceURI, const QString & name, const QString & qName, const QXmlAttributes & attributes) override;
40
41private:
42
43 std::string m_currentCode;
44 std::map<std::string,std::string> m_currentPropertyValues;
45 std::map<std::string,Lima::LinguisticCode>& m_outputMap;
47};
48
49#endif
#define LIMA_PROPERTYCODE_EXPORT
Provide tools to parse a property file, and deal with the property coding system.