LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
XmlSimpleHandler.h
Go to the documentation of this file.
1// Copyright : (c) 2010 by CEA
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6#ifndef XMLSIMPLEHANDLER_H
7#define XMLSIMPLEHANDLER_H
8
10#include <sstream>
12
13namespace Lima {
16{
17public:
18 XmlSimpleHandler(std::shared_ptr<const ShiftFrom> shiftFrom);
19
21
22 void handle ( const char* buf,int length ) override;
23
24 void startAnalysis() override;
25
26 // OLD : garde la version avec le props car hérite de AbstractTextualAnalysisHandler
27 void startDocument (const Lima::Common::Misc::GenericDocumentProperties& props) override;
28
30 void endDocument() override;
31
33 void endAnalysis() override {}
34
36 // TODO devrait s'appeler startHierarchyNode ?
37 void startNode ( const std::string& elementName, bool forIndexing ) override;
38
40 // TODO devrait s'appeler endHierarchyNode ?
41 void endNode ( const Lima::Common::Misc::GenericDocumentProperties& props ) override;
42
43 void setOut(std::ostream* out) override;
44
45 std::ostream* m_out;
46 std::ostringstream m_buffer;
47 std::vector<bool> m_indexingNodeStack;
48};
49
50}
51
52#endif
#define LIMA_ANALYSISHANDLERS_EXPORT
abstract handler for XML processing : just inherits from different handlers
Manipulation de media ; separation du contenu et de la structure.
void endAnalysis() override
notify the end of an analysis content
std::ostringstream m_buffer
std::vector< bool > m_indexingNodeStack
NAUTITIA.