Xerces-C++ 3.2.5
DOMTreeWalker.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id$
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_DOMTREEWALKER_HPP)
23#define XERCESC_INCLUDE_GUARD_DOMTREEWALKER_HPP
24
27
29
30
51protected:
52 // -----------------------------------------------------------------------
53 // Hidden constructors
54 // -----------------------------------------------------------------------
60
61private:
62 // -----------------------------------------------------------------------
63 // Unimplemented constructors and operators
64 // -----------------------------------------------------------------------
67 DOMTreeWalker & operator = (const DOMTreeWalker &);
69
70public:
71 // -----------------------------------------------------------------------
72 // All constructors are hidden, just the destructor is available
73 // -----------------------------------------------------------------------
80 virtual ~DOMTreeWalker() {};
82
83 // -----------------------------------------------------------------------
84 // Virtual DOMTreeWalker interface
85 // -----------------------------------------------------------------------
88 // -----------------------------------------------------------------------
89 // Getter methods
90 // -----------------------------------------------------------------------
91
98 virtual DOMNode* getRoot() = 0;
110
117
135 virtual bool getExpandEntityReferences()= 0;
136
142 virtual DOMNode* getCurrentNode()= 0;
143
144 // -----------------------------------------------------------------------
145 // Query methods
146 // -----------------------------------------------------------------------
158 virtual DOMNode* parentNode()= 0;
159
170 virtual DOMNode* firstChild()= 0;
171
182 virtual DOMNode* lastChild()= 0;
183
195
205 virtual DOMNode* nextSibling()= 0;
206
219 virtual DOMNode* previousNode()= 0;
220
232 virtual DOMNode* nextNode()= 0;
233
234 // -----------------------------------------------------------------------
235 // Setter methods
236 // -----------------------------------------------------------------------
254 virtual void setCurrentNode(DOMNode* currentNode)= 0;
256
257 // -----------------------------------------------------------------------
258 // Non-standard Extension
259 // -----------------------------------------------------------------------
268 virtual void release() = 0;
270};
271
272#define GetDOMTreeWalkerMemoryManager GET_INDIRECT_MM(fCurrentNode)
273
275
276#endif
#define CDOM_EXPORT
Definition XercesDefs.hpp:166
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
Filters are objects that know how to "filter out" nodes.
Definition DOMNodeFilter.hpp:50
unsigned long ShowType
Definition DOMNodeFilter.hpp:193
The DOMNode interface is the primary datatype for the entire Document Object Model.
Definition DOMNode.hpp:139
DOMTreeWalker objects are used to navigate a document tree or subtree using the view of the document ...
Definition DOMTreeWalker.hpp:50
virtual DOMNode * getCurrentNode()=0
Return the node at which the DOMTreeWalker is currently positioned.
virtual ~DOMTreeWalker()
Destructor.
Definition DOMTreeWalker.hpp:80
DOMTreeWalker(const DOMTreeWalker &)
Definition DOMTreeWalker.hpp:58
virtual DOMNodeFilter * getFilter()=0
Return The filter used to screen nodes.
DOMTreeWalker()
Definition DOMTreeWalker.hpp:57
virtual DOMNode * nextNode()=0
Moves the DOMTreeWalker to the next visible node in document order relative to the current node,...
virtual void setCurrentNode(DOMNode *currentNode)=0
The node at which the DOMTreeWalker is currently positioned.
virtual DOMNode * parentNode()=0
Moves to and returns the closest visible ancestor node of the current node.
virtual DOMNode * lastChild()=0
Moves the DOMTreeWalker to the last visible child of the current node, and returns the new node.
virtual void release()=0
Called to indicate that this TreeWalker is no longer in use and that the implementation may relinquis...
virtual DOMNode * getRoot()=0
The root node of the DOMTreeWalker, as specified when it was created.
virtual DOMNode * nextSibling()=0
Moves the DOMTreeWalker to the next sibling of the current node, and returns the new node.
virtual DOMNode * previousSibling()=0
Moves the DOMTreeWalker to the previous sibling of the current node, and returns the new node.
virtual DOMNode * firstChild()=0
Moves the DOMTreeWalker to the first visible child of the current node, and returns the new node.
virtual DOMNodeFilter::ShowType getWhatToShow()=0
This attribute determines which node types are presented via the DOMTreeWalker.
virtual DOMNode * previousNode()=0
Moves the DOMTreeWalker to the previous visible node in document order relative to the current node,...
virtual bool getExpandEntityReferences()=0
The value of this flag determines whether the children of entity reference nodes are visible to the D...