Xalan-C++ API Reference  1.12.0
TraceListenerDefault.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_TraceListenerDefault_HEADER_GUARD)
19 #define XALAN_TraceListenerDefault_HEADER_GUARD
20 
21 
22 
23 // Base include file. Must be first.
25 
26 
27 
28 // Base class header file...
30 
32 
33 
34 
35 namespace XALAN_CPP_NAMESPACE {
36 
37 
38 
39 class DOMSupport;
40 class ElemTemplateElement;
41 class ExecutionContext;
42 class NodeRefListBase;
43 class PrintWriter;
44 class XPathExecutionContext;
45 
46 
47 
49 {
50 public:
51 
53  PrintWriter& thePrintWriter,
54  MemoryManager& theManager,
55  bool traceTemplates = false,
56  bool traceElements = false,
57  bool traceGeneration = false,
58  bool traceSelection = false);
59 
61  XPathExecutionContext& theExecutionContext,
62  PrintWriter& thePrintWriter,
63  MemoryManager& theManager,
64  bool traceTemplates = false,
65  bool traceElements = false,
66  bool traceGeneration = false,
67  bool traceSelection = false);
68 
69  virtual
71 
72  virtual void
73  trace(const TracerEvent& ev);
74 
75  virtual void
76  selected(const SelectionEvent& ev);
77 
78  virtual void
79  generated(const GenerateEvent& ev);
80 
81  bool
83  {
84  return m_traceTemplates;
85  }
86 
87  void
89  {
90  m_traceTemplates = b;
91  }
92 
93  bool
95  {
96  return m_traceElements;
97  }
98 
99  void
101  {
102  m_traceElements = b;
103  }
104 
105  bool
107  {
108  return m_traceGeneration;
109  }
110 
111  void
113  {
114  m_traceGeneration = b;
115  }
116 
117  bool
119  {
120  return m_traceSelection;
121  }
122 
123  void
125  {
126  m_traceSelection = b;
127  }
128 
129 private:
130 
131  void
132  processNodeList(const NodeRefListBase& nl);
133 
134  void
135  printNodeInfo(const ElemTemplateElement& node);
136 
137 
138  // Data members...
139  XPathExecutionContext* m_executionContext;
140 
141  PrintWriter& m_printWriter;
142 
143  bool m_traceTemplates;
144 
145  bool m_traceElements;
146 
147  bool m_traceGeneration;
148 
149  bool m_traceSelection;
150 
151  MemoryManager& m_memoryManager;
152 };
153 
154 
155 
156 }
157 
158 
159 
160 #endif //XALAN_TraceListenerDefault_HEADER_GUARD
xalanc::TraceListenerDefault::setTraceElements
void setTraceElements(bool b)
Definition: TraceListenerDefault.hpp:100
xalanc::TraceListenerDefault::getTraceTemplates
bool getTraceTemplates() const
Definition: TraceListenerDefault.hpp:82
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::TraceListenerDefault::setTraceTemplates
void setTraceTemplates(bool b)
Definition: TraceListenerDefault.hpp:88
XALAN_XSLT_EXPORT
#define XALAN_XSLT_EXPORT
Definition: XSLTDefinitions.hpp:27
xalanc::TraceListener
Definition: TraceListener.hpp:36
xalanc::ElemTemplateElement
Definition: ElemTemplateElement.hpp:79
xalanc::TraceListenerDefault::getTraceGeneration
bool getTraceGeneration() const
Definition: TraceListenerDefault.hpp:106
xalanc::SelectionEvent
Definition: SelectionEvent.hpp:47
xalanc::TraceListenerDefault::getTraceSelection
bool getTraceSelection() const
Definition: TraceListenerDefault.hpp:118
XalanMemoryManagement.hpp
xalanc::TraceListenerDefault::setTraceGeneration
void setTraceGeneration(bool b)
Definition: TraceListenerDefault.hpp:112
TraceListener.hpp
xalanc::PrintWriter
Definition: PrintWriter.hpp:37
xalanc::TraceListenerDefault::getTraceElement
bool getTraceElement() const
Definition: TraceListenerDefault.hpp:94
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::TraceListenerDefault
Definition: TraceListenerDefault.hpp:48
xalanc::XPathExecutionContext
Definition: XPathExecutionContext.hpp:82
xalanc::NodeRefListBase
Local implementation of NodeRefList.
Definition: NodeRefListBase.hpp:44
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::TraceListenerDefault::setTraceSelection
void setTraceSelection(bool b)
Definition: TraceListenerDefault.hpp:124