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(XRESULTTREEFRAG_HEADER_GUARD_1357924680) 00019 #define XRESULTTREEFRAG_HEADER_GUARD_1357924680 00020 00021 00022 00023 // Base header file. Must be first. 00024 #include <xalanc/XSLT/XSLTDefinitions.hpp> 00025 00026 00027 00028 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00029 00030 00031 00032 // Base class header file. 00033 #include <xalanc/XPath/NodeRefListBase.hpp> 00034 #include <xalanc/XPath/XObject.hpp> 00035 00036 00037 00038 #include <xalanc/XSLT/StylesheetExecutionContext.hpp> 00039 00040 00041 00042 XALAN_CPP_NAMESPACE_BEGIN 00043 00044 00045 00046 class ResultTreeFrag; 00047 00048 00049 00050 class XALAN_XSLT_EXPORT XResultTreeFrag : public XObject 00051 { 00052 public: 00053 00054 typedef XObject ParentType; 00055 00056 00057 /** 00058 * Construct an XResultTreeFrag object from a result tree fragment 00059 * 00060 * @param value The source result tree fragment. 00061 * @param theManager The MemoryManager for this instance. 00062 */ 00063 XResultTreeFrag( 00064 XalanDocumentFragment& value, 00065 MemoryManager& theManager); 00066 00067 /** 00068 * Construct an XResultTreeFrag object from another 00069 * 00070 * @param source source XResultTreeFrag 00071 * @param theManager The MemoryManager for this instance. 00072 */ 00073 XResultTreeFrag( 00074 const XResultTreeFrag& source, 00075 MemoryManager& theManager); 00076 00077 virtual 00078 ~XResultTreeFrag(); 00079 00080 MemoryManager& 00081 getMemoryManager()const 00082 { 00083 return m_cachedStringValue.getMemoryManager(); 00084 } 00085 00086 void 00087 setExecutionContext(StylesheetExecutionContext* theExecutionContext) 00088 { 00089 m_executionContext = theExecutionContext; 00090 } 00091 00092 // These methods are inherited from XObject ... 00093 00094 virtual const XalanDOMString& 00095 getTypeString() const; 00096 00097 virtual double 00098 num(XPathExecutionContext& executionContext) const; 00099 00100 virtual double 00101 num() const; 00102 00103 virtual bool 00104 boolean(XPathExecutionContext& executionContext) const; 00105 00106 virtual const XalanDOMString& 00107 str(XPathExecutionContext& executionContext) const; 00108 00109 virtual const XalanDOMString& 00110 str() const; 00111 00112 virtual void 00113 str( 00114 XPathExecutionContext& executionContext, 00115 FormatterListener& formatterListener, 00116 MemberFunctionPtr function) const; 00117 00118 virtual void 00119 str( 00120 FormatterListener& formatterListener, 00121 MemberFunctionPtr function) const; 00122 00123 virtual void 00124 str( 00125 XPathExecutionContext& executionContext, 00126 XalanDOMString& theBuffer) const; 00127 00128 virtual void 00129 str(XalanDOMString& theBuffer) const; 00130 00131 virtual double 00132 stringLength(XPathExecutionContext& executionContext) const; 00133 00134 virtual const XalanDocumentFragment& 00135 rtree() const; 00136 00137 virtual void 00138 ProcessXObjectTypeCallback(XObjectTypeCallback& theCallbackObject); 00139 00140 virtual void 00141 ProcessXObjectTypeCallback(XObjectTypeCallback& theCallbackObject) const; 00142 00143 /** 00144 * Release the ResultTreeFrag held by the instance. 00145 */ 00146 XalanDocumentFragment* 00147 release(); 00148 00149 /** 00150 * Change the value of an XResultTreeFrag 00151 * 00152 * @param theValue The new value. 00153 */ 00154 void 00155 set(XalanDocumentFragment& theValue); 00156 00157 protected: 00158 00159 virtual void 00160 dereferenced(); 00161 00162 private: 00163 //not implemented 00164 XResultTreeFrag(); 00165 XResultTreeFrag(const XResultTreeFrag&); 00166 00167 // Data members... 00168 XalanDocumentFragment* m_value; 00169 00170 const XalanDOMString* m_singleTextChildValue; 00171 00172 StylesheetExecutionContext* m_executionContext; 00173 00174 mutable XalanDOMString m_cachedStringValue; 00175 00176 mutable double m_cachedNumberValue; 00177 }; 00178 00179 00180 00181 XALAN_CPP_NAMESPACE_END 00182 00183 00184 00185 #endif // XRESULTTREEFRAG_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 |
|