Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


NodeRefListBase.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(NODEREFLISTBASE_HEADER_GUARD_1357924680)
19 #define NODEREFLISTBASE_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base include file. Must be first.
25 
26 
27 
28 #include <cstddef>
29 
30 
31 
32 XALAN_CPP_NAMESPACE_BEGIN
33 
34 
35 
36 class XalanNode;
37 
38 
39 
40 /**
41  * Local implementation of NodeRefList. This class is for internal use only.
42  */
43 
45 {
46 public:
47 
49 
50  virtual
51  ~NodeRefListBase();
52 
53  typedef XalanSize_t size_type;
54 
55  /**
56  * Returns the <code>index</code>th item in the collection. If
57  * <code>index</code> is greater than or equal to the number of nodes in
58  * the list, this returns <code>null</code>.
59  *
60  * @param index index into the collection
61  * @return node at the <code>index</code>th position in the
62  * <code>NodeList</code>, or <code>null</code> if that is not a
63  * valid index
64  */
65  virtual XalanNode*
66  item(size_type index) const = 0;
67 
68  /**
69  * Determine the number of nodes in the list. The range of valid child node
70  * indices is 0 to <code>length-1</code> inclusive.
71  *
72  * @return number of nodes
73  */
74  virtual size_type
75  getLength() const = 0;
76 
77  /**
78  * Retrieve the zero based index of the node in the list
79  *
80  * @param theNode node whose index to find
81  * @return index of node
82  */
83  virtual size_type
84  indexOf(const XalanNode* theNode) const = 0;
85 
86 #if defined(XALAN_INLINE_INITIALIZATION)
87  static const size_type npos = ~0u;
88 #else
89  static const size_type npos;
90 #endif
91 
92 protected:
93 
95  {
96  }
97 
100  {
101  return *this;
102  }
103 };
104 
105 
106 
107 XALAN_CPP_NAMESPACE_END
108 
109 
110 
111 #endif // NODEREFLISTBASE_HEADER_GUARD_1357924680
XalanSize_t size_type
NodeRefListBase(const NodeRefListBase &)
XalanDOMString::size_type indexOf(const XalanDOMChar *theString, XalanDOMChar theChar)
Simulates the java String method indexOf().
Local implementation of NodeRefList.
NodeRefListBase & operator=(const NodeRefListBase &)
#define XALAN_XPATH_EXPORT
static const size_type npos

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