Xalan-C++ API Reference
1.12.0
xalanc
XPath
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.
24
#include <
xalanc/XPath/XPathDefinitions.hpp
>
25
26
27
28
#include <cstddef>
29
30
31
32
namespace
XALAN_CPP_NAMESPACE
{
33
34
35
36
class
XalanNode;
37
38
39
40
/**
41
* Local implementation of NodeRefList. This class is for internal use only.
42
*/
43
44
class
XALAN_XPATH_EXPORT
NodeRefListBase
45
{
46
public
:
47
48
NodeRefListBase
();
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
static
const
size_type
npos
;
87
88
protected
:
89
90
NodeRefListBase
(
const
NodeRefListBase
&)
91
{
92
}
93
94
NodeRefListBase
&
95
operator=
(
const
NodeRefListBase
&)
96
{
97
return
*
this
;
98
}
99
};
100
101
102
103
}
104
105
106
107
#endif // NODEREFLISTBASE_HEADER_GUARD_1357924680
xalanc::NodeRefListBase::operator=
NodeRefListBase & operator=(const NodeRefListBase &)
Definition:
NodeRefListBase.hpp:95
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
xalanc::indexOf
XalanDOMString::size_type indexOf(const XalanDOMChar *theString, XalanDOMChar theChar)
Simulates the java String method indexOf().
Definition:
DOMStringHelper.hpp:308
XALAN_XPATH_EXPORT
#define XALAN_XPATH_EXPORT
Definition:
XPathDefinitions.hpp:35
xalanc::NodeRefListBase::npos
static const size_type npos
Definition:
NodeRefListBase.hpp:86
xalanc::NodeRefListBase
Local implementation of NodeRefList.
Definition:
NodeRefListBase.hpp:44
xalanc::NodeRefListBase::size_type
XalanSize_t size_type
Definition:
NodeRefListBase.hpp:53
xalanc::NodeRefListBase::NodeRefListBase
NodeRefListBase(const NodeRefListBase &)
Definition:
NodeRefListBase.hpp:90
XPathDefinitions.hpp
Copyright © 1999-2020 The Apache Software Foundation. All Rights Reserved.
Generated on Sun May 31 2020 10:37:20 for Xalan-C++ API Reference by
1.8.17