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(XERCESWRAPPERNAVIGATOR_HEADER_GUARD_1357924680) 00019 #define XERCESWRAPPERNAVIGATOR_HEADER_GUARD_1357924680 00020 00021 00022 00023 #include <xalanc/XercesParserLiaison/XercesParserLiaisonDefinitions.hpp> 00024 00025 00026 00027 #include <cassert> 00028 00029 00030 00031 #include <xercesc/util/XercesDefs.hpp> 00032 00033 00034 00035 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00036 #include <xalanc/XalanDOM/XalanNode.hpp> 00037 00038 00039 00040 #include <xalanc/XercesParserLiaison/XercesWrapperTypes.hpp> 00041 00042 00043 00044 XALAN_CPP_NAMESPACE_BEGIN 00045 00046 00047 00048 class XercesDocumentWrapper; 00049 class XalanAttr; 00050 class XalanElement; 00051 class XalanText; 00052 00053 00054 00055 class XALAN_XERCESPARSERLIAISON_EXPORT XercesWrapperNavigator 00056 { 00057 public: 00058 00059 typedef XalanNode::IndexType IndexType; 00060 00061 explicit 00062 XercesWrapperNavigator(XercesDocumentWrapper* theOwnerDocument = 0); 00063 00064 XercesWrapperNavigator(const XercesWrapperNavigator& theSource); 00065 00066 virtual 00067 ~XercesWrapperNavigator(); 00068 00069 00070 XercesDocumentWrapper* 00071 getOwnerDocument() const 00072 { 00073 return m_ownerDocument; 00074 } 00075 00076 void 00077 setOwnerDocument(XercesDocumentWrapper* theDocument) 00078 { 00079 m_ownerDocument = theDocument; 00080 } 00081 00082 XalanNode* 00083 mapNode(const DOMNodeType* theXercesNode) const; 00084 00085 XalanAttr* 00086 mapNode(const DOMAttrType* theXercesNode) const; 00087 00088 const DOMNodeType* 00089 mapNode(XalanNode* theXalanNode) const; 00090 00091 IndexType 00092 getIndex() const 00093 { 00094 return m_index; 00095 } 00096 00097 void 00098 setIndex(IndexType theIndex) 00099 { 00100 m_index = theIndex; 00101 } 00102 00103 XalanNode* 00104 getParentNode(const DOMNodeType* theXercesNode) const; 00105 00106 XalanNode* 00107 getParentNode() const 00108 { 00109 return m_parentNode; 00110 } 00111 00112 void 00113 setParentNode(XalanNode* theParent) 00114 { 00115 m_parentNode = theParent; 00116 } 00117 00118 XalanNode* 00119 getPreviousSibling(const DOMNodeType* theXercesNode) const; 00120 00121 XalanNode* 00122 getPreviousSibling() const 00123 { 00124 return m_previousSibling; 00125 } 00126 00127 void 00128 setPreviousSibling(XalanNode* thePreviousSibling) 00129 { 00130 m_previousSibling = thePreviousSibling; 00131 } 00132 00133 XalanNode* 00134 getNextSibling(const DOMNodeType* theXercesNode) const; 00135 00136 XalanNode* 00137 getNextSibling() const 00138 { 00139 return m_nextSibling; 00140 } 00141 00142 void 00143 setNextSibling(XalanNode* theNextSibling) 00144 { 00145 m_nextSibling = theNextSibling; 00146 } 00147 00148 XalanNode* 00149 getFirstChild(const DOMNodeType* theXercesNode) const; 00150 00151 XalanNode* 00152 getFirstChild() const 00153 { 00154 return m_firstChild; 00155 } 00156 00157 void 00158 setFirstChild(XalanNode* theFirstChild) 00159 { 00160 m_firstChild = theFirstChild; 00161 } 00162 00163 XalanNode* 00164 getLastChild(const DOMNodeType* theXercesNode) const; 00165 00166 XalanNode* 00167 getLastChild() const 00168 { 00169 return m_lastChild; 00170 } 00171 00172 void 00173 setLastChild(XalanNode* theLastChild) 00174 { 00175 m_lastChild = theLastChild; 00176 } 00177 00178 XalanElement* 00179 getOwnerElement(const DOMAttrType* theXercesAttr) const; 00180 00181 /** 00182 * Get a pooled string. If the string is not in the pool, 00183 * add it. 00184 * 00185 * @param theString The string to pool. 00186 * @return A const reference to the pooled string. 00187 */ 00188 const XalanDOMString& 00189 getPooledString(const XMLCh* theString) const; 00190 00191 private: 00192 00193 // Not implemented... 00194 bool 00195 operator==(const XercesWrapperNavigator& theRHS) const; 00196 00197 // Data members... 00198 XercesDocumentWrapper* m_ownerDocument; 00199 00200 XalanNode* m_parentNode; 00201 00202 XalanNode* m_previousSibling; 00203 00204 XalanNode* m_nextSibling; 00205 00206 XalanNode* m_firstChild; 00207 00208 XalanNode* m_lastChild; 00209 00210 IndexType m_index; 00211 00212 static const XalanDOMString s_emptyString; 00213 }; 00214 00215 00216 00217 XALAN_CPP_NAMESPACE_END 00218 00219 00220 00221 #endif // !defined(XERCESWRAPPERNAVIGATOR_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 |
|