Xalan-C++ API Reference 1.12.0
ProblemListenerDefault.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_PROBLEMLISTENERDEFAULT_HEADER_GUARD)
19#define XALAN_PROBLEMLISTENERDEFAULT_HEADER_GUARD
20
21
22
23// Base include file. Must be first.
24#include "XSLTDefinitions.hpp"
25
26
27
28// Xalan header files.
30
31
32
33namespace XERCES_CPP_NAMESPACE
34{
35 class MemoryManager;
36}
37
38
39
40namespace XALAN_CPP_NAMESPACE {
41
42
43
44using xercesc::MemoryManager;
45
46
47
48/**
49 * The implementation of the default error handling for Xalan.
50 */
52{
53public:
54
56 MemoryManager& theManager,
57 PrintWriter* pw = 0);
58
59 virtual
61
62
63 // These methods are inherited from ProblemListener ...
64
65 virtual void
67
68 virtual void
70 eSource source,
72 const XalanDOMString& msg,
73 const Locator* locator,
74 const XalanNode* sourceNode);
75
76 virtual void
78 eSource source,
80 const XalanDOMString& msg,
81 const XalanNode* sourceNode);
82
83 virtual void
85 eSource source,
87 const XalanNode* sourceNode,
89 const XalanDOMString& msg,
90 const XalanDOMChar* uri,
93
94 // These methods are new...
95
98 {
99 return m_pw;
100 }
101
102 static void
105 eSource source,
107 const XalanDOMString& msg,
108 const Locator* locator,
109 const XalanNode* sourceNode)
110 {
111 ProblemListenerBase::defaultFormat(
112 pw,
113 source,
115 msg,
116 locator,
117 sourceNode);
118 }
119
120 static void
123 eSource source,
125 const XalanDOMString& msg,
126 const XalanNode* sourceNode)
127 {
128 ProblemListenerBase::defaultFormat(
129 pw,
130 source,
132 msg,
133 sourceNode);
134 }
135
136 static void
139 eSource source,
141 const XalanNode* sourceNode,
143 const XalanDOMString& msg,
144 const XalanDOMChar* uri,
147
148private:
149
150 MemoryManager& m_memoryManager;
151
152 PrintWriter* m_pw;
153};
154
155
156
157}
158
159
160
161#endif // XALAN_PROBLEMLISTENERDEFAULT_HEADER_GUARD
#define XALAN_XSLT_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
The implementation of the default error handling for Xalan.
virtual void problem(eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode)
Function that is called when a problem event occurs.
virtual void problem(eSource source, eClassification classification, const XalanNode *sourceNode, const ElemTemplateElement *styleNode, const XalanDOMString &msg, const XalanDOMChar *uri, XalanFileLoc lineNo, XalanFileLoc charOffset)
Function that is called when a problem event occurs.
static void defaultFormat(PrintWriter &pw, eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)
static void defaultFormat(PrintWriter &pw, eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode)
virtual void setPrintWriter(PrintWriter *pw)
ProblemListenerDefault(MemoryManager &theManager, PrintWriter *pw=0)
static void defaultFormat(PrintWriter &pw, eSource source, eClassification classification, const XalanNode *sourceNode, const ElemTemplateElement *styleNode, const XalanDOMString &msg, const XalanDOMChar *uri, XalanFileLoc lineNo, XalanFileLoc charOffset)
virtual void problem(eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)
Function that is called when a problem event occurs.
This is the abstract class that the XSL processor uses when it has a problem of some kind,...