LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
AbstractXmlAnalysisHandler.h
Go to the documentation of this file.
1// Copyright 2002-2013 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6#ifndef ABSTRACTXMLANALYSISHANDLER_H
7#define ABSTRACTXMLANALYSISHANDLER_H
8
9#include <sstream>
13
14namespace Lima {
15
25{
26public:
27 AbstractXmlAnalysisHandler(std::shared_ptr<const ShiftFrom> shiftFrom) :
28 m_shiftFrom(shiftFrom)
29 {}
30
32
35
37 virtual void endDocument() = 0;
38
40 virtual void handle(const char* buf,int length) override = 0;
41
43 virtual void startNode( const std::string& elementName, bool forIndexing ) = 0;
44
46 virtual void endNode( const Common::Misc::GenericDocumentProperties& props ) = 0;
47
49 virtual void setOut( std::ostream* out ) = 0;
50
51 std::shared_ptr<const ShiftFrom> shiftFrom() const {return m_shiftFrom;}
52
53private:
54 std::shared_ptr<const ShiftFrom> m_shiftFrom;
55};
56
57} // Lima
58
59#endif
The AbstractAnalysisHandler class defines the callback interface: the functions that are to be define...
The AbstractAnalysisHandler class defines the callback interface: the functions that are to be define...
AbstractXmlAnalysisHandler(std::shared_ptr< const ShiftFrom > shiftFrom)
std::shared_ptr< const ShiftFrom > shiftFrom() const
virtual void endDocument()=0
notify the end of the document
virtual void startDocument(const Common::Misc::GenericDocumentProperties &props)=0
notify the start of a new document, and give its properties
virtual void startNode(const std::string &elementName, bool forIndexing)=0
notify the start of a new hierarchyNode
virtual void setOut(std::ostream *out)=0
set the output stream.
virtual void handle(const char *buf, int length) override=0
gives content.
virtual void endNode(const Common::Misc::GenericDocumentProperties &props)=0
notify the end of a hierarchyNode
NAUTITIA.