Xalan-C++ API Reference 1.12.0
XalanNamedNodeMap.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(XALANNAMEDNODEMAP_HEADER_GUARD_1357924680)
19#define XALANNAMEDNODEMAP_HEADER_GUARD_1357924680
20
21
22
24
25
26
27namespace XALAN_CPP_NAMESPACE {
28
29
30
31class XalanDOMString;
32class XalanNode;
33
34
35
37{
38public:
39
41
42 virtual
44
45 /**
46 * Returns the <code>index</code>th item in the map.
47 *
48 * If <code>index</code>
49 * is greater than or equal to the number of nodes in the map, this returns
50 * <code>null</code>.
51 * @param index Index into the map.
52 * @return The node at the <code>index</code>th position in the
53 * <code>NamedNodeMap</code>, or <code>null</code> if that is not a valid
54 * index.
55 */
56 virtual XalanNode*
57 item(XalanSize_t index) const = 0;
58
59 /**
60 * Retrieves a node specified by name.
61 *
62 * @param name The <code>nodeName</code> of a node to retrieve.
63 * @return A <code>Node</code> (of any type) with the specified <code>nodeName</code>, or
64 * <code>null</code> if it does not identify any node in
65 * the map.
66 */
67 virtual XalanNode*
68 getNamedItem(const XalanDOMString& name) const = 0;
69
70 /**
71 * The number of nodes in the map.
72 *
73 * The range of valid child node indices is
74 * 0 to <code>length-1</code> inclusive.
75 */
76 virtual XalanSize_t
77 getLength() const = 0;
78
79 /**
80 * Retrieves a node specified by local name and namespace URI.
81 *
82 * @param namespaceURI The <em>namespace URI</em> of
83 * the node to retrieve.
84 * @param localName The <em>local name</em> of the node to retrieve.
85 * @return A <code>Node</code> (of any type) with the specified
86 * local name and namespace URI, or <code>null</code> if they do not
87 * identify any node in the map.
88 */
89 virtual XalanNode*
92 const XalanDOMString& localName) const = 0;
93
94protected:
95
97
100
101 bool
103
104private:
105};
106
107
108
109}
110
111
112
113#endif // !defined(XALANNAMEDNODEMAP_HEADER_GUARD_1357924680)
#define XALAN_DOM_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
XalanNamedNodeMap(const XalanNamedNodeMap &theSource)
virtual XalanNode * getNamedItemNS(const XalanDOMString &namespaceURI, const XalanDOMString &localName) const =0
Retrieves a node specified by local name and namespace URI.
bool operator==(const XalanNamedNodeMap &theRHS) const
virtual XalanNode * item(XalanSize_t index) const =0
Returns the indexth item in the map.
XalanNamedNodeMap & operator=(const XalanNamedNodeMap &theSource)
virtual XalanNode * getNamedItem(const XalanDOMString &name) const =0
Retrieves a node specified by name.
virtual XalanSize_t getLength() const =0
The number of nodes in the map.