Xalan-C++ API Reference  1.12.0
XercesBridgeNavigator.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #if !defined(XERCESBRIDGENAVIGATOR_HEADER_GUARD_1357924680)
19 #define XERCESBRIDGENAVIGATOR_HEADER_GUARD_1357924680
20 
21 
22 
24 
25 
26 
27 #include <cassert>
28 
29 
30 
33 
34 
35 
37 
38 
39 
40 namespace XALAN_CPP_NAMESPACE {
41 
42 
43 
44 class XercesDocumentBridge;
45 class XalanAttr;
46 class XalanElement;
47 class XalanText;
48 
49 
50 /**
51  * This class is deprecated.
52  *
53  * @deprecated This class is part of the deprecated Xerces DOM bridge.
54  */
56 {
57 public:
58 
60 
61  explicit
63  XercesDocumentBridge* theOwnerDocument = 0,
64  bool mappingMode = true);
65 
67 
68  virtual
70 
71 
74  {
75  return m_ownerDocument;
76  }
77 
78  void
80  {
81  m_ownerDocument = theDocument;
82  }
83 
84  XalanNode*
85  mapNode(const DOM_NodeType& theXercesNode) const;
86 
87  XalanAttr*
88  mapNode(const DOM_AttrType& theXercesNode) const;
89 
91  mapNode(const XalanNode* theXalanNode) const;
92 
94  mapNode(const XalanAttr* theXercesNode) const;
95 
96  IndexType
97  getIndex() const
98  {
99  return m_index;
100  }
101 
102  void
103  setIndex(IndexType theIndex)
104  {
105  m_index = theIndex;
106  }
107 
108  XalanNode*
109  getParentNode(const DOM_NodeType& theXercesNode) const;
110 
111  XalanNode*
113  {
114  return m_parentNode;
115  }
116 
117  void
119  {
120  m_parentNode = theParent;
121  }
122 
123  XalanNode*
124  getPreviousSibling(const DOM_NodeType& theXercesNode) const;
125 
126  XalanNode*
128  {
129  return m_previousSibling;
130  }
131 
132  void
133  setPreviousSibling(XalanNode* thePreviousSibling)
134  {
135  m_previousSibling = thePreviousSibling;
136  }
137 
138  XalanNode*
139  getNextSibling(const DOM_NodeType& theXercesNode) const;
140 
141  XalanNode*
143  {
144  return m_nextSibling;
145  }
146 
147  void
148  setNextSibling(XalanNode* theNextSibling)
149  {
150  m_nextSibling = theNextSibling;
151  }
152 
153  XalanNode*
154  getFirstChild(const DOM_NodeType& theXercesNode) const;
155 
156  XalanNode*
158  {
159  return m_firstChild;
160  }
161 
162  void
163  setFirstChild(XalanNode* theFirstChild)
164  {
165  m_firstChild = theFirstChild;
166  }
167 
168  XalanNode*
169  getLastChild(const DOM_NodeType& theXercesNode) const;
170 
171  XalanNode*
172  getLastChild() const
173  {
174  return m_lastChild;
175  }
176 
177  void
178  setLastChild(XalanNode* theLastChild)
179  {
180  m_lastChild = theLastChild;
181  }
182 
183  XalanNode*
184  insertBefore(
185  DOM_NodeType& theXercesParent,
186  XalanNode* newChild,
187  XalanNode* refChild) const;
188 
189  XalanNode*
190  replaceChild(
191  DOM_NodeType& theXercesParent,
192  XalanNode* newChild,
193  XalanNode* oldChild) const;
194 
195  XalanNode*
196  removeChild(
197  DOM_NodeType& theXercesParent,
198  XalanNode* oldChild) const;
199 
200  XalanNode*
201  appendChild(
202  DOM_NodeType& theXercesParent,
203  XalanNode* newChild) const;
204 
205  XalanElement*
206  getOwnerElement(const DOM_AttrType& theXercesAttr) const;
207 
208  XalanNode*
209  cloneNode(
210  const XalanNode* theXalanNode,
211  const DOM_NodeType& theXercesNode,
212  bool deep) const;
213 
214  XalanText*
215  splitText(
216  DOM_TextType& theXercesText,
217  unsigned int offset) const;
218 
219  /**
220  * Get a pooled string. If the string is not in the pool,
221  * add it.
222  *
223  * @param theString The string to pool.
224  * @return A const reference to the pooled string.
225  */
226  const XalanDOMString&
227  getPooledString(const DOMStringType& theString) const;
228 
229 private:
230 
231  // Not implemented...
232  bool
233  operator==(const XercesBridgeNavigator& theRHS) const;
234 
235  // Data members...
236  XercesDocumentBridge* m_ownerDocument;
237 
238  mutable XalanNode* m_parentNode;
239 
240  mutable XalanNode* m_previousSibling;
241 
242  mutable XalanNode* m_nextSibling;
243 
244  mutable XalanNode* m_firstChild;
245 
246  mutable XalanNode* m_lastChild;
247 
248  IndexType m_index;
249 };
250 
251 
252 
253 }
254 
255 
256 
257 #endif // !defined(XERCESBRIDGENAVIGATOR_HEADER_GUARD_1357924680)
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::XalanNode
Definition: XalanNode.hpp:38
xalanc::XercesBridgeNavigator::setNextSibling
void setNextSibling(XalanNode *theNextSibling)
Definition: XercesBridgeNavigator.hpp:148
XalanDOMString.hpp
xalanc::XercesBridgeNavigator::setParentNode
void setParentNode(XalanNode *theParent)
Definition: XercesBridgeNavigator.hpp:118
xalanc::XalanText
Definition: XalanText.hpp:40
xalanc::XercesBridgeNavigator::setLastChild
void setLastChild(XalanNode *theLastChild)
Definition: XercesBridgeNavigator.hpp:178
xalanc::XercesBridgeNavigator::getPreviousSibling
XalanNode * getPreviousSibling() const
Definition: XercesBridgeNavigator.hpp:127
xalanc::operator==
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1118
xalanc::XalanNode::IndexType
unsigned long IndexType
Definition: XalanNode.hpp:64
xalanc::XercesBridgeNavigator::getNextSibling
XalanNode * getNextSibling() const
Definition: XercesBridgeNavigator.hpp:142
xalanc::XercesBridgeNavigator::getFirstChild
XalanNode * getFirstChild() const
Definition: XercesBridgeNavigator.hpp:157
xalanc::XercesBridgeNavigator::getLastChild
XalanNode * getLastChild() const
Definition: XercesBridgeNavigator.hpp:172
xalanc::DOM_NodeType
xercesc::DOM_Node DOM_NodeType
Definition: XercesBridgeTypes.hpp:74
xalanc::XalanAttr
Definition: XalanAttr.hpp:40
XalanNode.hpp
XercesParserLiaisonDefinitions.hpp
xalanc::DOM_TextType
xercesc::DOM_Text DOM_TextType
Definition: XercesBridgeTypes.hpp:75
xalanc::XercesBridgeNavigator::setPreviousSibling
void setPreviousSibling(XalanNode *thePreviousSibling)
Definition: XercesBridgeNavigator.hpp:133
XALAN_XERCESPARSERLIAISON_EXPORT
#define XALAN_XERCESPARSERLIAISON_EXPORT
Definition: XercesParserLiaisonDefinitions.hpp:39
xalanc::XercesBridgeNavigator::setOwnerDocument
void setOwnerDocument(XercesDocumentBridge *theDocument)
Definition: XercesBridgeNavigator.hpp:79
xalanc::XercesBridgeNavigator::IndexType
XalanNode::IndexType IndexType
Definition: XercesBridgeNavigator.hpp:59
xalanc::DOMStringType
xercesc::DOMString DOMStringType
Definition: XercesBridgeTypes.hpp:86
xalanc::XalanElement
Definition: XalanElement.hpp:44
xalanc::XercesBridgeNavigator
This class is deprecated.
Definition: XercesBridgeNavigator.hpp:55
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
xalanc::XercesBridgeNavigator::getParentNode
XalanNode * getParentNode() const
Definition: XercesBridgeNavigator.hpp:112
xalanc::XercesDocumentBridge
This class is deprecated.
Definition: XercesDocumentBridge.hpp:92
XercesBridgeTypes.hpp
xalanc::XercesBridgeNavigator::setFirstChild
void setFirstChild(XalanNode *theFirstChild)
Definition: XercesBridgeNavigator.hpp:163
xalanc::XercesBridgeNavigator::getOwnerDocument
XercesDocumentBridge * getOwnerDocument() const
Definition: XercesBridgeNavigator.hpp:73
xalanc::DOM_AttrType
xercesc::DOM_Attr DOM_AttrType
Definition: XercesBridgeTypes.hpp:62
xalanc::XercesBridgeNavigator::getIndex
IndexType getIndex() const
Definition: XercesBridgeNavigator.hpp:97
xalanc::XercesBridgeNavigator::setIndex
void setIndex(IndexType theIndex)
Definition: XercesBridgeNavigator.hpp:103