Xalan-C++ API Reference 1.12.0
NodeNameTreeWalker.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(NODENAMETREEWALKER_HEADER_GUARD_1357924680)
19#define NODENAMETREEWALKER_HEADER_GUARD_1357924680
20
21
23
24
25
27
28
29
30// Base class include file.
32
33
34
35namespace XALAN_CPP_NAMESPACE {
36
37
38
40{
41public:
42
44
46
47 virtual
49
50 /**
51 * Find all nodes matching a specified node in a specified node tree. The
52 * member m_matchingNodes is populated as a side effect.
53 *
54 * @param theNodeName name of node sought
55 * @param theStartNode start node for search
56 */
57 virtual void
60 const XalanNode* theStartNode);
61
62 virtual void
66
67 /**
68 * Retrieve the matching nodes from the last search.
69 *
70 * @return vector of nodes
71 */
72 const NodeVectorType&
74 {
75 return m_matchingNodes;
76 }
77
78protected:
79
80 virtual bool
82
83 virtual bool
85
86 virtual bool
87 startNode(const XalanNode* node);
88
89 virtual bool
90 endNode(const XalanNode* node);
91
92private:
93
94 XalanDOMString m_nodeName;
95
96 NodeVectorType m_matchingNodes;
97};
98
99
100
101}
102
103
104
105#endif // NODENAMETREEWALKER_HEADER_GUARD_1357924680
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
const NodeVectorType & getMatchingNodes() const
Retrieve the matching nodes from the last search.
virtual bool endNode(const XalanNode *node)
Called when leaving a node.
virtual void findMatchingNodes(const XalanDOMString &theNodeName, XalanNode *theStartNode)
virtual void findMatchingNodes(const XalanDOMString &theNodeName, const XalanNode *theStartNode)
Find all nodes matching a specified node in a specified node tree.
NodeNameTreeWalker(MemoryManager &theManager)
virtual bool startNode(XalanNode *node)
Called when first walking a node.
virtual bool startNode(const XalanNode *node)
Called when first walking a node.
XalanVector< const XalanNode * > NodeVectorType
virtual bool endNode(XalanNode *node)
Called when leaving a node.