Xalan-C++ API Reference 1.12.0
XObjectTypeCallback.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(XOBJECT_TYPE_CALLBACK_HEADER_GUARD_1357924680)
19#define XOBJECT_TYPE_CALLBACK_HEADER_GUARD_1357924680
20
21
22
23// Base header file. Must be first.
25
26
27
28// $$$ ToDo: This is necessarh while XalanDOMString is a typedef...
30
31
32
33
34namespace XALAN_CPP_NAMESPACE {
35
36
37
38class MutableNodeRefList;
39class NodeRefListBase;
40class XalanDocumentFragment;
41class XObject;
42class XPathExecutionContext;
43
44
45
46/**
47 * The purpose of this class is to provide a way to get the "preferred" or
48 * closest matching type for XObject-derived classes. The idea is to pass a
49 * reference to an instance of this class to an XObject instance. It will
50 * then call back to the member function that most closely matches its type.
51 * This makes it possible to get preferred typing information without doing
52 * RTTI or other such type introspections.
53 */
55{
56public:
57
59
60 virtual
62
63 /**
64 * Call back the XObject with a numeric value.
65 *
66 * @param theXObject
67 * @param theValue
68 */
69 virtual void
71 double theValue) = 0;
72
73 /**
74 * Call back the XObject with a boolean value.
75 *
76 * @param theXObject
77 * @param theValue
78 */
79 virtual void
81 bool theValue) = 0;
82
83 /**
84 * Call back the XObject with a string value.
85 *
86 * @param theXObject
87 * @param theValue
88 */
89 virtual void
91 const XalanDOMString& theValue) = 0;
92
93 /**
94 * Call back the XObject with a result tree fragment value.
95 *
96 * @param theXObject
97 * @param theValue
98 */
99 virtual void
102
103 /**
104 * Call back the XObject with a result tree fragment value.
105 *
106 * @param theXObject
107 * @param theValue
108 */
109 virtual void
112
113 /**
114 * Call back the XObject with a node set value.
115 *
116 * @param theXObject
117 * @param theValue
118 */
119 virtual void
121 const NodeRefListBase& theValue) = 0;
122
123 /**
124 * Call back the XObject with an unknown value.
125 *
126 * @param theXObject
127 * @param theValue
128 */
129 virtual void
131 const XalanDOMString& theName) = 0;
132
133 /**
134 * Call back the XObject with a null value.
135 *
136 * @param theXObject
137 * @param theValue
138 */
139 virtual void
140 Null(const XObject& theObject) = 0;
141
144 {
145 return m_executionContext;
146 }
147
148 /*
149 MemoryManager&
150 getMemoryManager()
151 {
152 return m_memoryManager;
153 }
154 */
155
156private:
157
158 XPathExecutionContext& m_executionContext;
159};
160
161
162
163}
164
165
166
167#endif // XOBJECT_TYPE_CALLBACK_HEADER_GUARD_1357924680
#define XALAN_XPATH_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Local implementation of NodeRefList.
The purpose of this class is to provide a way to get the "preferred" or closest matching type for XOb...
virtual void NodeSet(const XObject &theXObject, const NodeRefListBase &theValue)=0
Call back the XObject with a node set value.
virtual void String(const XObject &theXObject, const XalanDOMString &theValue)=0
Call back the XObject with a string value.
XPathExecutionContext & getExecutionContext()
virtual void ResultTreeFragment(const XObject &theXObject, const XalanDocumentFragment &theValue)=0
Call back the XObject with a result tree fragment value.
virtual void ResultTreeFragment(const XObject &theXObject, XalanDocumentFragment &theValue)=0
Call back the XObject with a result tree fragment value.
virtual void Null(const XObject &theObject)=0
Call back the XObject with a null value.
virtual void Number(const XObject &theXObject, double theValue)=0
Call back the XObject with a numeric value.
XObjectTypeCallback(XPathExecutionContext &theExecutionContext)
virtual void Unknown(const XObject &theObject, const XalanDOMString &theName)=0
Call back the XObject with an unknown value.
virtual void Boolean(const XObject &theXObject, bool theValue)=0
Call back the XObject with a boolean value.
Class to hold XPath return types.
Definition XObject.hpp:64