Xerces-C++: DOMTreeWalker.hpp Source File

Xerces-C++ 3.2.3

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
25 #include <xercesc/dom/DOMNode.hpp>
26 #include <xercesc/dom/DOMNodeFilter.hpp>
27
28 XERCES_CPP_NAMESPACE_BEGIN
29
30
50 class CDOM_EXPORT DOMTreeWalker {
51 protected:
52 // -----------------------------------------------------------------------
53 // Hidden constructors
54 // -----------------------------------------------------------------------
57 DOMTreeWalker() {}
58 DOMTreeWalker(const DOMTreeWalker &) {}
60
61 private:
62 // -----------------------------------------------------------------------
63 // Unimplemented constructors and operators
64 // -----------------------------------------------------------------------
67 DOMTreeWalker & operator = (const DOMTreeWalker &);
69
70 public:
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;
109 virtual DOMNodeFilter::ShowType getWhatToShow()= 0;
110
116 virtual DOMNodeFilter* getFilter()= 0;
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
194 virtual DOMNode* previousSibling()= 0;
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
274 XERCES_CPP_NAMESPACE_END
275
276 #endif
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
CDOM_EXPORT
#define CDOM_EXPORT
Definition: XercesDefs.hpp:166
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
DOMNodeFilter::ShowType
unsigned long ShowType
Definition: DOMNodeFilter.hpp:193
DOMNode.hpp
DOMTreeWalker::DOMTreeWalker
DOMTreeWalker(const DOMTreeWalker &)
Definition: DOMTreeWalker.hpp:58
DOMTreeWalker::~DOMTreeWalker
virtual ~DOMTreeWalker()
Destructor.
Definition: DOMTreeWalker.hpp:80
DOMNodeFilter.hpp
DOMTreeWalker
DOMTreeWalker objects are used to navigate a document tree or subtree using the view of the document ...
Definition: DOMTreeWalker.hpp:50
DOMTreeWalker::DOMTreeWalker
DOMTreeWalker()
Definition: DOMTreeWalker.hpp:57
DOMNodeFilter
Filters are objects that know how to "filter out" nodes.
Definition: DOMNodeFilter.hpp:49
DOMNode
The DOMNode interface is the primary datatype for the entire Document Object Model.
Definition: DOMNode.hpp:139