00001 /* 00002 * Copyright 1999-2004 The Apache Software Foundation. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 #if !defined(XERCESBRIDGENAVIGATOR_HEADER_GUARD_1357924680) 00017 #define XERCESBRIDGENAVIGATOR_HEADER_GUARD_1357924680 00018 00019 00020 00021 #include <xalanc/XercesParserLiaison/XercesParserLiaisonDefinitions.hpp> 00022 00023 00024 00025 #include <cassert> 00026 00027 00028 00029 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00030 #include <xalanc/XalanDOM/XalanNode.hpp> 00031 00032 00033 00034 #include <xalanc/XercesParserLiaison/Deprecated/XercesBridgeTypes.hpp> 00035 00036 00037 00038 XALAN_CPP_NAMESPACE_BEGIN 00039 00040 00041 00042 class XercesDocumentBridge; 00043 class XalanAttr; 00044 class XalanElement; 00045 class XalanText; 00046 00047 00053 class XALAN_XERCESPARSERLIAISON_EXPORT XercesBridgeNavigator 00054 { 00055 public: 00056 00057 typedef XalanNode::IndexType IndexType; 00058 00059 explicit 00060 XercesBridgeNavigator( 00061 XercesDocumentBridge* theOwnerDocument = 0, 00062 bool mappingMode = true); 00063 00064 XercesBridgeNavigator(const XercesBridgeNavigator& theSource); 00065 00066 virtual 00067 ~XercesBridgeNavigator(); 00068 00069 00070 XercesDocumentBridge* 00071 getOwnerDocument() const 00072 { 00073 return m_ownerDocument; 00074 } 00075 00076 void 00077 setOwnerDocument(XercesDocumentBridge* theDocument) 00078 { 00079 m_ownerDocument = theDocument; 00080 } 00081 00082 XalanNode* 00083 mapNode(const DOM_NodeType& theXercesNode) const; 00084 00085 XalanAttr* 00086 mapNode(const DOM_AttrType& theXercesNode) const; 00087 00088 DOM_NodeType 00089 mapNode(const XalanNode* theXalanNode) const; 00090 00091 DOM_AttrType 00092 mapNode(const XalanAttr* theXercesNode) const; 00093 00094 IndexType 00095 getIndex() const 00096 { 00097 return m_index; 00098 } 00099 00100 void 00101 setIndex(IndexType theIndex) 00102 { 00103 m_index = theIndex; 00104 } 00105 00106 XalanNode* 00107 getParentNode(const DOM_NodeType& theXercesNode) const; 00108 00109 XalanNode* 00110 getParentNode() const 00111 { 00112 return m_parentNode; 00113 } 00114 00115 void 00116 setParentNode(XalanNode* theParent) 00117 { 00118 m_parentNode = theParent; 00119 } 00120 00121 XalanNode* 00122 getPreviousSibling(const DOM_NodeType& theXercesNode) const; 00123 00124 XalanNode* 00125 getPreviousSibling() const 00126 { 00127 return m_previousSibling; 00128 } 00129 00130 void 00131 setPreviousSibling(XalanNode* thePreviousSibling) 00132 { 00133 m_previousSibling = thePreviousSibling; 00134 } 00135 00136 XalanNode* 00137 getNextSibling(const DOM_NodeType& theXercesNode) const; 00138 00139 XalanNode* 00140 getNextSibling() const 00141 { 00142 return m_nextSibling; 00143 } 00144 00145 void 00146 setNextSibling(XalanNode* theNextSibling) 00147 { 00148 m_nextSibling = theNextSibling; 00149 } 00150 00151 XalanNode* 00152 getFirstChild(const DOM_NodeType& theXercesNode) const; 00153 00154 XalanNode* 00155 getFirstChild() const 00156 { 00157 return m_firstChild; 00158 } 00159 00160 void 00161 setFirstChild(XalanNode* theFirstChild) 00162 { 00163 m_firstChild = theFirstChild; 00164 } 00165 00166 XalanNode* 00167 getLastChild(const DOM_NodeType& theXercesNode) const; 00168 00169 XalanNode* 00170 getLastChild() const 00171 { 00172 return m_lastChild; 00173 } 00174 00175 void 00176 setLastChild(XalanNode* theLastChild) 00177 { 00178 m_lastChild = theLastChild; 00179 } 00180 00181 XalanNode* 00182 insertBefore( 00183 DOM_NodeType& theXercesParent, 00184 XalanNode* newChild, 00185 XalanNode* refChild) const; 00186 00187 XalanNode* 00188 replaceChild( 00189 DOM_NodeType& theXercesParent, 00190 XalanNode* newChild, 00191 XalanNode* oldChild) const; 00192 00193 XalanNode* 00194 removeChild( 00195 DOM_NodeType& theXercesParent, 00196 XalanNode* oldChild) const; 00197 00198 XalanNode* 00199 appendChild( 00200 DOM_NodeType& theXercesParent, 00201 XalanNode* newChild) const; 00202 00203 XalanElement* 00204 getOwnerElement(const DOM_AttrType& theXercesAttr) const; 00205 00206 XalanNode* 00207 cloneNode( 00208 const XalanNode* theXalanNode, 00209 const DOM_NodeType& theXercesNode, 00210 bool deep) const; 00211 00212 XalanText* 00213 splitText( 00214 DOM_TextType& theXercesText, 00215 unsigned int offset) const; 00216 00224 const XalanDOMString& 00225 getPooledString(const DOMStringType& theString) const; 00226 00227 private: 00228 00229 // Not implemented... 00230 bool 00231 operator==(const XercesBridgeNavigator& theRHS) const; 00232 00233 // Data members... 00234 XercesDocumentBridge* m_ownerDocument; 00235 00236 mutable XalanNode* m_parentNode; 00237 00238 mutable XalanNode* m_previousSibling; 00239 00240 mutable XalanNode* m_nextSibling; 00241 00242 mutable XalanNode* m_firstChild; 00243 00244 mutable XalanNode* m_lastChild; 00245 00246 IndexType m_index; 00247 }; 00248 00249 00250 00251 XALAN_CPP_NAMESPACE_END 00252 00253 00254 00255 #endif // !defined(XERCESBRIDGENAVIGATOR_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.10 |
|