Xalan-C++ API Reference
1.12.0
xalanc
TestXPath
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
22
#include <
xalanc/Include/XalanVector.hpp
>
23
24
25
26
#include <
xalanc/XalanDOM/XalanDOMString.hpp
>
27
28
29
30
// Base class include file.
31
#include <
xalanc/DOMSupport/TreeWalker.hpp
>
32
33
34
35
namespace
XALAN_CPP_NAMESPACE
{
36
37
38
39
class
NodeNameTreeWalker
:
public
TreeWalker
40
{
41
public
:
42
43
typedef
XalanVector<const XalanNode*>
NodeVectorType
;
44
45
NodeNameTreeWalker
(MemoryManager& theManager);
46
47
virtual
48
~
NodeNameTreeWalker
();
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
58
findMatchingNodes(
59
const
XalanDOMString
& theNodeName,
60
const
XalanNode
* theStartNode);
61
62
virtual
void
63
findMatchingNodes(
64
const
XalanDOMString
& theNodeName,
65
XalanNode
* theStartNode);
66
67
/**
68
* Retrieve the matching nodes from the last search.
69
*
70
* @return vector of nodes
71
*/
72
const
NodeVectorType
&
73
getMatchingNodes
()
const
74
{
75
return
m_matchingNodes;
76
}
77
78
protected
:
79
80
virtual
bool
81
startNode(
XalanNode
* node);
82
83
virtual
bool
84
endNode(
XalanNode
* node);
85
86
virtual
bool
87
startNode(
const
XalanNode
* node);
88
89
virtual
bool
90
endNode(
const
XalanNode
* node);
91
92
private
:
93
94
XalanDOMString
m_nodeName;
95
96
NodeVectorType m_matchingNodes;
97
};
98
99
100
101
}
102
103
104
105
#endif // NODENAMETREEWALKER_HEADER_GUARD_1357924680
xalanc::NodeNameTreeWalker
Definition:
NodeNameTreeWalker.hpp:39
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
XalanDOMString.hpp
xalanc::XalanVector< const XalanNode * >
xalanc::NodeNameTreeWalker::getMatchingNodes
const NodeVectorType & getMatchingNodes() const
Retrieve the matching nodes from the last search.
Definition:
NodeNameTreeWalker.hpp:73
XalanVector.hpp
TreeWalker.hpp
xalanc::NodeNameTreeWalker::NodeVectorType
XalanVector< const XalanNode * > NodeVectorType
Definition:
NodeNameTreeWalker.hpp:43
xalanc::XalanDOMString
Definition:
XalanDOMString.hpp:45
xalanc::TreeWalker
Definition:
TreeWalker.hpp:36
Copyright © 1999-2020 The Apache Software Foundation. All Rights Reserved.
Generated on Sun May 31 2020 10:37:17 for Xalan-C++ API Reference by
1.8.17