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 
26 namespace XALAN_CPP_NAMESPACE {
27 
28 
29 
30 class TracerEvent;
31 class SelectionEvent;
32 class GenerateEvent;
33 
34 
35 
37 {
38 public:
39 
40  TraceListener();
41 
42  virtual
43  ~TraceListener();
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
60  selected(const SelectionEvent& ev) = 0;
61 
62  /**
63  * Method that is called just after the formatter listener is called.
64  *
65  * @param ev generate event
66  */
67  virtual void
68  generated(const GenerateEvent& ev) = 0;
69 
71  {
73  m_event(theEvent)
74  {
75  }
76 
77  void
78  operator()(TraceListener* theListener) const
79  {
80  theListener->trace(m_event);
81  }
82 
84  };
85 
87  {
89  m_event(theEvent)
90  {
91  }
92 
93  void
94  operator()(TraceListener* theListener) const
95  {
96  theListener->selected(m_event);
97  }
98 
100  };
101 
103  {
105  m_event(theEvent)
106  {
107  }
108 
109  void
110  operator()(TraceListener* theListener) const
111  {
112  theListener->generated(m_event);
113  }
114 
116  };
117 
118 };
119 
120 
121 
122 }
123 
124 
125 
126 #endif //XALAN_TraceListener_HEADER_GUARD
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::TraceListener::TraceListenerGenerateFunctor::m_event
const GenerateEvent & m_event
Definition: TraceListener.hpp:115
xalanc::TraceListener::TraceListenerSelectFunctor::TraceListenerSelectFunctor
TraceListenerSelectFunctor(const SelectionEvent &theEvent)
Definition: TraceListener.hpp:88
xalanc::TraceListener::TraceListenerSelectFunctor::m_event
const SelectionEvent & m_event
Definition: TraceListener.hpp:99
xalanc::TraceListener::TraceListenerSelectFunctor
Definition: TraceListener.hpp:86
XALAN_XSLT_EXPORT
#define XALAN_XSLT_EXPORT
Definition: XSLTDefinitions.hpp:27
xalanc::TraceListener
Definition: TraceListener.hpp:36
xalanc::TraceListener::TraceListenerTraceFunctor::m_event
const TracerEvent & m_event
Definition: TraceListener.hpp:83
xalanc::TraceListener::TraceListenerGenerateFunctor::TraceListenerGenerateFunctor
TraceListenerGenerateFunctor(const GenerateEvent &theEvent)
Definition: TraceListener.hpp:104
xalanc::TraceListener::TraceListenerGenerateFunctor::operator()
void operator()(TraceListener *theListener) const
Definition: TraceListener.hpp:110
xalanc::SelectionEvent
Definition: SelectionEvent.hpp:47
xalanc::TraceListener::TraceListenerTraceFunctor::TraceListenerTraceFunctor
TraceListenerTraceFunctor(const TracerEvent &theEvent)
Definition: TraceListener.hpp:72
xalanc::TraceListener::TraceListenerTraceFunctor
Definition: TraceListener.hpp:70
xalanc::TraceListener::TraceListenerSelectFunctor::operator()
void operator()(TraceListener *theListener) const
Definition: TraceListener.hpp:94
xalanc::TraceListener::selected
virtual void selected(const SelectionEvent &ev)=0
Method that is called just after the formatter listener is called.
xalanc::TracerEvent
This is the parent class of events generated for tracing the progress of the XSL processor.
Definition: TracerEvent.hpp:49
XSLTDefinitions.hpp
xalanc::GenerateEvent
This is the class for events generated by the XSL processor after it generates a new node in the resu...
Definition: GenerateEvent.hpp:55
xalanc::TraceListener::TraceListenerGenerateFunctor
Definition: TraceListener.hpp:102
xalanc::TraceListener::trace
virtual void trace(const TracerEvent &ev)=0
Method that is called when a trace event occurs.
xalanc::TraceListener::TraceListenerTraceFunctor::operator()
void operator()(TraceListener *theListener) const
Definition: TraceListener.hpp:78
xalanc::TraceListener::generated
virtual void generated(const GenerateEvent &ev)=0
Method that is called just after the formatter listener is called.