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 _COMPHELPER_CHAINABLEPROPERTYSETINFO_HXX_ 25 #define _COMPHELPER_CHAINABLEPROPERTYSETINFO_HXX_ 26 27 #include <com/sun/star/beans/XPropertySetInfo.hpp> 28 #include <comphelper/PropertyInfoHash.hxx> 29 #include <cppuhelper/implbase1.hxx> 30 #include <comphelper/TypeGeneration.hxx> 31 #include "comphelper/comphelperdllapi.h" 32 33 /* 34 * A ChainablePropertySetInfo is usually initialised with a pointer to the first element 35 * of a null-terminated static table of PropertyInfo structs. This is placed in a hash_map 36 * for fast access 37 * 38 */ 39 namespace comphelper 40 { 41 class COMPHELPER_DLLPUBLIC ChainablePropertySetInfo: 42 public ::cppu::WeakImplHelper1< 43 ::com::sun::star::beans::XPropertySetInfo > 44 { 45 friend class ChainablePropertySet; 46 friend class MasterPropertySet; 47 protected: 48 PropertyInfoHash maMap; 49 com::sun::star::uno::Sequence < com::sun::star::beans::Property > maProperties; 50 public: 51 ChainablePropertySetInfo() 52 throw(); 53 ChainablePropertySetInfo( PropertyInfo * pMap ) 54 throw(); 55 56 virtual ~ChainablePropertySetInfo() 57 throw(); 58 59 void add( PropertyInfo* pMap, sal_Int32 nCount = -1 ) 60 throw(); 61 void remove( const rtl::OUString& aName ) 62 throw(); 63 64 // XPropertySetInfo 65 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getProperties() 66 throw(::com::sun::star::uno::RuntimeException); 67 virtual ::com::sun::star::beans::Property SAL_CALL getPropertyByName( const ::rtl::OUString& aName ) 68 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); 69 virtual sal_Bool SAL_CALL hasPropertyByName( const ::rtl::OUString& Name ) 70 throw(::com::sun::star::uno::RuntimeException); 71 }; 72 } 73 #endif 74