Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


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 
35 XALAN_CPP_NAMESPACE_BEGIN
36 
37 
38 
40 {
41 public:
42 
44 
45  NodeNameTreeWalker(MemoryManager& theManager);
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
59  const XalanDOMString& theNodeName,
60  const XalanNode* theStartNode);
61 
62  virtual void
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&
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 XALAN_CPP_NAMESPACE_END
102 
103 
104 
105 #endif // NODENAMETREEWALKER_HEADER_GUARD_1357924680
virtual bool startNode(XalanNode *node)
Called when first walking a node.
NodeNameTreeWalker(MemoryManager &theManager)
virtual void findMatchingNodes(const XalanDOMString &theNodeName, const XalanNode *theStartNode)
Find all nodes matching a specified node in a specified node tree.
const NodeVectorType & getMatchingNodes() const
Retrieve the matching nodes from the last search.
virtual ~NodeNameTreeWalker()
XalanVector< const XalanNode * > NodeVectorType
virtual bool endNode(XalanNode *node)
Called when leaving a node.

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.

Apache Logo