1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef DOM_CHILDLIST_HXX 25 #define DOM_CHILDLIST_HXX 26 27 #include <sal/types.h> 28 #include <rtl/ref.hxx> 29 30 #include <com/sun/star/uno/Reference.h> 31 #include <com/sun/star/xml/dom/XNode.hpp> 32 #include <com/sun/star/xml/dom/XNodeList.hpp> 33 34 #include <cppuhelper/implbase1.hxx> 35 36 37 using ::rtl::OUString; 38 using namespace com::sun::star::uno; 39 using namespace com::sun::star::xml::dom; 40 41 namespace DOM 42 { 43 class CNode; 44 45 class CChildList 46 : public cppu::WeakImplHelper1< XNodeList > 47 { 48 private: 49 ::rtl::Reference<CNode> const m_pNode; 50 ::osl::Mutex & m_rMutex; 51 52 public: 53 CChildList(::rtl::Reference<CNode> const& pBase, 54 ::osl::Mutex & rMutex); 55 56 /** 57 The number of nodes in the list. 58 */ 59 virtual sal_Int32 SAL_CALL getLength() throw (RuntimeException); 60 /** 61 Returns the indexth item in the collection. 62 */ 63 virtual Reference< XNode > SAL_CALL item(sal_Int32 index) 64 throw (RuntimeException); 65 }; 66 } 67 68 #endif 69