Xalan-C++ API Reference 1.12.0
ExecutionContext.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(EXECUTIONCONTEXT_HEADER_GUARD_1357924680)
19#define EXECUTIONCONTEXT_HEADER_GUARD_1357924680
20
21
22
23// Base include file. Must be first.
25
26
27
29
30
31
33
34
35
36namespace XERCES_CPP_NAMESPACE
37{
38 class Locator;
39}
40
41
42
43namespace XALAN_CPP_NAMESPACE {
44
45
46
47typedef xercesc::Locator LocatorType;
48
49
50
51class XalanDOMString;
52class XalanNode;
53class XalanText;
54
55
56
57//
58// An abstract class which provides support for execution.
59//
61{
62public:
63
65
66 virtual
68
69
70 // These interfaces are inherited from ProblemListenerBase
71 virtual void
73 eSource source,
75 const XalanDOMString& msg,
76 const Locator* locator,
77 const XalanNode* sourceNode) = 0;
78
79 virtual void
81 eSource source,
83 const XalanDOMString& msg,
84 const XalanNode* sourceNode) = 0;
85
86 bool
88 {
89 return m_hasPreserveOrStripConditions;
90 }
91
92 /**
93 * Determine if a text node should be stripped from the source tree,
94 * as if it weren't there.
95 *
96 * @param textNode text node from the source tree
97 * @return true if the text node should be stripped
98 */
99 virtual bool
101
102 MemoryManager&
104 {
105 return m_memoryManager;
106 }
107
108 MemoryManager&
110 {
111 return XalanMemoryManager::getExceptionMemoryManager(m_memoryManager);
112 }
113
114protected:
115
116 MemoryManager& m_memoryManager;
117
119};
120
121
122
123}
124
125
126
127#endif // EXECUTIONCONTEXT_HEADER_GUARD_1357924680
#define XALAN_PLATFORMSUPPORT_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
virtual void problem(eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)=0
Function that is called when a problem event occurs.
MemoryManager & getExceptionMemoryManager() const
MemoryManager & getMemoryManager() const
ExecutionContext(MemoryManager &theMemoryManager)
bool hasPreserveOrStripSpaceConditions() const
virtual bool shouldStripSourceNode(const XalanText &node)=0
Determine if a text node should be stripped from the source tree, as if it weren't there.
virtual void problem(eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode)=0
Function that is called when a problem event occurs.
This is the abstract class that is used when reporting a problem some kind, that requires a message,...
xercesc::Locator LocatorType