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(FUNCTIONID_HEADER_GUARD_1357924680) 00019 #define FUNCTIONID_HEADER_GUARD_1357924680 00020 00021 00022 00023 // Base header file. Must be first. 00024 #include <xalanc/XPath/XPathDefinitions.hpp> 00025 00026 00027 00028 #include <xalanc/XalanDOM/XalanElement.hpp> 00029 #include <xalanc/XalanDOM/XalanNode.hpp> 00030 #include <xalanc/XalanDOM/XalanDocument.hpp> 00031 00032 00033 00034 // Base class header files... 00035 #include <xalanc/XPath/Function.hpp> 00036 #include <xalanc/XPath/XObjectTypeCallback.hpp> 00037 00038 00039 00040 #include <xalanc/PlatformSupport/DOMStringHelper.hpp> 00041 #include <xalanc/PlatformSupport/StringTokenizer.hpp> 00042 00043 00044 00045 #include <xalanc/XPath/MutableNodeRefList.hpp> 00046 #include <xalanc/XPath/NodeRefListBase.hpp> 00047 00048 00049 00050 XALAN_CPP_NAMESPACE_BEGIN 00051 00052 00053 00054 /** 00055 * XPath implementation of "id" function. 00056 */ 00057 class XALAN_XPATH_EXPORT FunctionID : public Function 00058 { 00059 public: 00060 00061 typedef Function ParentType; 00062 00063 FunctionID(); 00064 00065 virtual 00066 ~FunctionID(); 00067 00068 // These methods are inherited from Function ... 00069 00070 virtual XObjectPtr 00071 execute( 00072 XPathExecutionContext& executionContext, 00073 XalanNode* context, 00074 const XObjectPtr arg1, 00075 const Locator* locator) const; 00076 00077 using ParentType::execute; 00078 00079 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE) 00080 virtual Function* 00081 #else 00082 virtual FunctionID* 00083 #endif 00084 clone(MemoryManager& theManager) const; 00085 00086 protected: 00087 00088 virtual const XalanDOMString& 00089 getError(XalanDOMString& theResult) const; 00090 00091 private: 00092 00093 class FunctionIDXObjectTypeCallback : public XObjectTypeCallback 00094 { 00095 public: 00096 00097 FunctionIDXObjectTypeCallback( 00098 XPathExecutionContext& theExecutionContext, 00099 XalanDOMString& theString); 00100 00101 void 00102 processCallback(const XObject& theXObject); 00103 00104 // These methods are inherited from XObjectTypeCallback ... 00105 00106 virtual void 00107 Number( 00108 const XObject& theXObject, 00109 double /* theValue */); 00110 00111 virtual void 00112 Boolean( 00113 const XObject& theXObject, 00114 bool /* theValue */); 00115 00116 virtual void 00117 String( 00118 const XObject& theXObject, 00119 const XalanDOMString& /* theValue */); 00120 00121 virtual void 00122 ResultTreeFragment( 00123 const XObject& theXObject, 00124 const XalanDocumentFragment& /* theValue */); 00125 00126 virtual void 00127 ResultTreeFragment( 00128 const XObject& theXObject, 00129 XalanDocumentFragment& /* theValue */); 00130 00131 virtual void 00132 NodeSet( 00133 const XObject& /* theXObject */, 00134 const NodeRefListBase& theValue); 00135 00136 virtual void 00137 Unknown( 00138 const XObject& /* theObject */, 00139 const XalanDOMString& /* theName */); 00140 00141 virtual void 00142 Null(const XObject& /* theObject */); 00143 00144 private: 00145 00146 XalanDOMString& m_resultString; 00147 00148 XPathExecutionContext& m_executionContext; 00149 }; 00150 00151 // Not implemented... 00152 FunctionID& 00153 operator=(const FunctionID&); 00154 00155 bool 00156 operator==(const FunctionID&) const; 00157 }; 00158 00159 00160 00161 XALAN_CPP_NAMESPACE_END 00162 00163 00164 00165 #endif // FUNCTIONID_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 |
|