|
||||
File indexing completed on 2025-01-18 10:14:51
0001 /* 0002 * Licensed to the Apache Software Foundation (ASF) under one or more 0003 * contributor license agreements. See the NOTICE file distributed with 0004 * this work for additional information regarding copyright ownership. 0005 * The ASF licenses this file to You under the Apache License, Version 2.0 0006 * (the "License"); you may not use this file except in compliance with 0007 * the License. You may obtain a copy of the License at 0008 * 0009 * http://www.apache.org/licenses/LICENSE-2.0 0010 * 0011 * Unless required by applicable law or agreed to in writing, software 0012 * distributed under the License is distributed on an "AS IS" BASIS, 0013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0014 * See the License for the specific language governing permissions and 0015 * limitations under the License. 0016 */ 0017 0018 /* 0019 * $Id$ 0020 */ 0021 0022 #if !defined(XERCESC_INCLUDE_GUARD_DOMNODELIST_HPP) 0023 #define XERCESC_INCLUDE_GUARD_DOMNODELIST_HPP 0024 0025 #include <xercesc/util/XercesDefs.hpp> 0026 0027 XERCES_CPP_NAMESPACE_BEGIN 0028 0029 0030 class DOMNode; 0031 0032 0033 /** 0034 * The <code>DOMNodeList</code> interface provides the abstraction of an ordered 0035 * collection of nodes. DOMNodeLists are created by DOMDocument::getElementsByTagName(), 0036 * DOMNode::getChildNodes(), 0037 * 0038 * <p>The items in the <code>DOMNodeList</code> are accessible via an integral 0039 * index, starting from 0. 0040 * 0041 * DOMNodeLists are "live", in that any changes to the document tree are immediately 0042 * reflected in any DOMNodeLists that may have been created for that tree. 0043 */ 0044 0045 class CDOM_EXPORT DOMNodeList { 0046 protected: 0047 // ----------------------------------------------------------------------- 0048 // Hidden constructors 0049 // ----------------------------------------------------------------------- 0050 /** @name Hidden constructors */ 0051 //@{ 0052 DOMNodeList() {}; 0053 //@} 0054 0055 private: 0056 // ----------------------------------------------------------------------- 0057 // Unimplemented constructors and operators 0058 // ----------------------------------------------------------------------- 0059 /** @name Unimplemented constructors and operators */ 0060 //@{ 0061 DOMNodeList(const DOMNodeList &); 0062 DOMNodeList & operator = (const DOMNodeList &); 0063 //@} 0064 0065 public: 0066 // ----------------------------------------------------------------------- 0067 // All constructors are hidden, just the destructor is available 0068 // ----------------------------------------------------------------------- 0069 /** @name Destructor */ 0070 //@{ 0071 /** 0072 * Destructor 0073 * 0074 */ 0075 virtual ~DOMNodeList() {}; 0076 //@} 0077 0078 // ----------------------------------------------------------------------- 0079 // Virtual DOMNodeList interface 0080 // ----------------------------------------------------------------------- 0081 /** @name Functions introduced in DOM Level 1 */ 0082 //@{ 0083 // ----------------------------------------------------------------------- 0084 // Getter methods 0085 // ----------------------------------------------------------------------- 0086 /** 0087 * Returns the <code>index</code> item in the collection. 0088 * 0089 * If <code>index</code> is greater than or equal to the number of nodes in 0090 * the list, this returns <code>null</code>. 0091 * 0092 * @param index Index into the collection. 0093 * @return The node at the <code>index</code>th position in the 0094 * <code>DOMNodeList</code>, or <code>null</code> if that is not a valid 0095 * index. 0096 * @since DOM Level 1 0097 */ 0098 virtual DOMNode *item(XMLSize_t index) const = 0; 0099 0100 /** 0101 * Returns the number of nodes in the list. 0102 * 0103 * The range of valid child node indices is 0 to <code>length-1</code> inclusive. 0104 * @since DOM Level 1 0105 */ 0106 virtual XMLSize_t getLength() const = 0; 0107 //@} 0108 }; 0109 0110 XERCES_CPP_NAMESPACE_END 0111 0112 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |