00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one 00003 * or more contributor license agreements. See the NOTICE file 00004 * distributed with this work for additional information 00005 * regarding copyright ownership. The ASF licenses this file 00006 * to you under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 #if !defined(XOBJECT_TYPE_CALLBACK_HEADER_GUARD_1357924680) 00019 #define XOBJECT_TYPE_CALLBACK_HEADER_GUARD_1357924680 00020 00021 00022 00023 // Base header file. Must be first. 00024 #include <xalanc/XPath/XPathDefinitions.hpp> 00025 00026 00027 00028 // $$$ ToDo: This is necessarh while XalanDOMString is a typedef... 00029 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00030 00031 00032 00033 00034 XALAN_CPP_NAMESPACE_BEGIN 00035 00036 00037 00038 class MutableNodeRefList; 00039 class NodeRefListBase; 00040 class XalanDocumentFragment; 00041 class XObject; 00042 class XPathExecutionContext; 00043 00044 00045 00046 /** 00047 * The purpose of this class is to provide a way to get the "preferred" or 00048 * closest matching type for XObject-derived classes. The idea is to pass a 00049 * reference to an instance of this class to an XObject instance. It will 00050 * then call back to the member function that most closely matches its type. 00051 * This makes it possible to get preferred typing information without doing 00052 * RTTI or other such type introspections. 00053 */ 00054 class XALAN_XPATH_EXPORT XObjectTypeCallback 00055 { 00056 public: 00057 00058 XObjectTypeCallback(XPathExecutionContext& theExecutionContext); 00059 00060 virtual 00061 ~XObjectTypeCallback(); 00062 00063 /** 00064 * Call back the XObject with a numeric value. 00065 * 00066 * @param theXObject 00067 * @param theValue 00068 */ 00069 virtual void 00070 Number(const XObject& theXObject, 00071 double theValue) = 0; 00072 00073 /** 00074 * Call back the XObject with a boolean value. 00075 * 00076 * @param theXObject 00077 * @param theValue 00078 */ 00079 virtual void 00080 Boolean(const XObject& theXObject, 00081 bool theValue) = 0; 00082 00083 /** 00084 * Call back the XObject with a string value. 00085 * 00086 * @param theXObject 00087 * @param theValue 00088 */ 00089 virtual void 00090 String(const XObject& theXObject, 00091 const XalanDOMString& theValue) = 0; 00092 00093 /** 00094 * Call back the XObject with a result tree fragment value. 00095 * 00096 * @param theXObject 00097 * @param theValue 00098 */ 00099 virtual void 00100 ResultTreeFragment(const XObject& theXObject, 00101 const XalanDocumentFragment& theValue) = 0; 00102 00103 /** 00104 * Call back the XObject with a result tree fragment value. 00105 * 00106 * @param theXObject 00107 * @param theValue 00108 */ 00109 virtual void 00110 ResultTreeFragment(const XObject& theXObject, 00111 XalanDocumentFragment& theValue) = 0; 00112 00113 /** 00114 * Call back the XObject with a node set value. 00115 * 00116 * @param theXObject 00117 * @param theValue 00118 */ 00119 virtual void 00120 NodeSet(const XObject& theXObject, 00121 const NodeRefListBase& theValue) = 0; 00122 00123 /** 00124 * Call back the XObject with an unknown value. 00125 * 00126 * @param theXObject 00127 * @param theValue 00128 */ 00129 virtual void 00130 Unknown(const XObject& theObject, 00131 const XalanDOMString& theName) = 0; 00132 00133 /** 00134 * Call back the XObject with a null value. 00135 * 00136 * @param theXObject 00137 * @param theValue 00138 */ 00139 virtual void 00140 Null(const XObject& theObject) = 0; 00141 00142 XPathExecutionContext& 00143 getExecutionContext() 00144 { 00145 return m_executionContext; 00146 } 00147 00148 /* 00149 MemoryManager& 00150 getMemoryManager() 00151 { 00152 return m_memoryManager; 00153 } 00154 */ 00155 00156 private: 00157 00158 XPathExecutionContext& m_executionContext; 00159 }; 00160 00161 00162 00163 XALAN_CPP_NAMESPACE_END 00164 00165 00166 00167 #endif // XOBJECT_TYPE_CALLBACK_HEADER_GUARD_1357924680
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|