LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
EventHandler.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
/***************************************************************************
7
* Copyright (C) 2004-2012 by CEA LIST *
8
* *
9
***************************************************************************/
10
#ifndef LIMA_LINGUISTICPROCESSING_EVENTHANDLER_H
11
#define LIMA_LINGUISTICPROCESSING_EVENTHANDLER_H
12
13
#include "
EventAnalysisExport.h
"
14
#include "
common/Handler/AbstractAnalysisHandler.h
"
15
#include "
Events.h
"
16
#include "
linguisticProcessing/client/AnalysisHandlers/SimpleStreamHandler.h
"
17
#include "
linguisticProcessing/client/AnalysisHandlers/AbstractTextualAnalysisHandler.h
"
18
19
#include <ostream>
20
21
namespace
Lima
22
{
23
24
namespace
LinguisticProcessing
25
{
26
27
namespace
EventAnalysis
28
{
29
33
class
LIMA_EVENTANALISYS_EXPORT
EventHandler
:
public
Lima::AbstractTextualAnalysisHandler
34
{
35
Q_OBJECT
36
public
:
37
EventHandler
(std::ostream* out);
38
39
EventHandler
();
40
41
virtual
~EventHandler
();
42
44
void
startDocument(
const
Common::Misc::GenericDocumentProperties
& props)
override
;
45
47
void
endDocument()
override
;
48
49
void
endAnalysis()
override
;
50
51
void
startAnalysis()
override
;
52
53
Events
& getEvents();
54
55
57
void
handle(
const
char
* buf,
int
length)
override
;
58
60
void
startNode(
const
std::string& elementName,
bool
forIndexing )
override
;
61
63
void
endNode(
const
Common::Misc::GenericDocumentProperties
& props )
override
;
64
66
virtual
void
setOut( std::ostream* out )
override
;
67
68
private
:
69
std::ostringstream* m_stream;
70
std::ostream* m_out;
71
Lima::LinguisticProcessing::SimpleStreamHandler
* m_writer;
72
Events
m_events;
73
74
};
75
76
}
// closing namespace EventAnalysis
77
78
}
// closing namespace LinguisticProcessing
79
80
}
// closing namespace Lima
81
82
#endif
//LIMA_LINGUISTICPROCESSING_EVENTHANDLER_H
AbstractAnalysisHandler.h
AbstractTextualAnalysisHandler.h
EventAnalysisExport.h
LIMA_EVENTANALISYS_EXPORT
#define LIMA_EVENTANALISYS_EXPORT
Definition
EventAnalysisExport.h:27
Events.h
SimpleStreamHandler.h
Lima::AbstractTextualAnalysisHandler
defines callback interface
Definition
AbstractTextualAnalysisHandler.h:31
Lima::Common::Misc::GenericDocumentProperties
Definition
genericDocumentProperties.h:58
Lima::LinguisticProcessing::EventAnalysis::EventHandler
Definition
EventHandler.h:34
Lima::LinguisticProcessing::EventAnalysis::Events
Definition
Events.h:27
Lima::LinguisticProcessing::SimpleStreamHandler
Definition
SimpleStreamHandler.h:34
Lima
NAUTITIA.
Definition
AmosePluginsManager.h:15
lima_linguisticprocessing
src
linguisticProcessing
core
EventAnalysis
EventHandler.h
Generated by
1.9.8