Xalan-C++ API Reference 1.12.0
TraceListener.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18#if !defined(XALAN_TraceListener_HEADER_GUARD)
19#define XALAN_TraceListener_HEADER_GUARD
20
21// Base include file. Must be first.
22#include "XSLTDefinitions.hpp"
23
24
25
26namespace XALAN_CPP_NAMESPACE {
27
28
29
30class TracerEvent;
31class SelectionEvent;
32class GenerateEvent;
33
34
35
37{
38public:
39
41
42 virtual
44
45 /**
46 * Method that is called when a trace event occurs. The method is blocking.
47 * It must return before processing continues.
48 *
49 * @param ev trace event
50 */
51 virtual void
52 trace(const TracerEvent& ev) = 0;
53
54 /**
55 * Method that is called just after the formatter listener is called.
56 *
57 * @param ev generate event
58 */
59 virtual void
61
62 /**
63 * Method that is called just after the formatter listener is called.
64 *
65 * @param ev generate event
66 */
67 virtual void
69
71 {
73 m_event(theEvent)
74 {
75 }
76
77 void
79 {
80 theListener->trace(m_event);
81 }
82
84 };
85
87 {
92
93 void
95 {
96 theListener->selected(m_event);
97 }
98
100 };
101
103 {
108
109 void
111 {
112 theListener->generated(m_event);
113 }
114
116 };
117
118};
119
120
121
122}
123
124
125
126#endif //XALAN_TraceListener_HEADER_GUARD
#define XALAN_XSLT_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
This is the class for events generated by the XSL processor after it generates a new node in the resu...
virtual void selected(const SelectionEvent &ev)=0
Method that is called just after the formatter listener is called.
virtual void generated(const GenerateEvent &ev)=0
Method that is called just after the formatter listener is called.
virtual void trace(const TracerEvent &ev)=0
Method that is called when a trace event occurs.
This is the parent class of events generated for tracing the progress of the XSL processor.
void operator()(TraceListener *theListener) const
TraceListenerGenerateFunctor(const GenerateEvent &theEvent)
void operator()(TraceListener *theListener) const
TraceListenerSelectFunctor(const SelectionEvent &theEvent)
TraceListenerTraceFunctor(const TracerEvent &theEvent)
void operator()(TraceListener *theListener) const