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_MASTERPROPERTYSETINFO_HXX_
25 #define _COMPHELPER_MASTERPROPERTYSETINFO_HXX_
26 #include <com/sun/star/beans/XPropertySetInfo.hpp>
27 #include <comphelper/PropertyInfoHash.hxx>
28 #include <cppuhelper/implbase1.hxx>
29 #include <comphelper/TypeGeneration.hxx>
30 #include "comphelper/comphelperdllapi.h"
31 
32 namespace comphelper
33 {
34 	class COMPHELPER_DLLPUBLIC MasterPropertySetInfo:
35         public ::cppu::WeakImplHelper1<
36         ::com::sun::star::beans::XPropertySetInfo >
37 	{
38 		friend class MasterPropertySet;
39 	protected:
40 		PropertyDataHash maMap;
41 		com::sun::star::uno::Sequence < com::sun::star::beans::Property > maProperties;
42 	public:
43 		MasterPropertySetInfo()
44 			throw();
45 		MasterPropertySetInfo( PropertyInfo * pMap )
46 			throw();
47 		virtual ~MasterPropertySetInfo()
48 			throw();
49 		void add( PropertyInfo* pMap, sal_Int32 nCount = -1, sal_uInt8 nMapId = 0 )
50 			throw();
51 		void add( PropertyInfoHash &rHash, sal_uInt8 nMapId )
52 			throw();
53 		void remove( const rtl::OUString& aName )
54 			throw();
55 
56 		// XPropertySetInfo
57 		virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getProperties()
58 			throw(::com::sun::star::uno::RuntimeException);
59 		virtual ::com::sun::star::beans::Property SAL_CALL getPropertyByName( const ::rtl::OUString& aName )
60 			throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
61 		virtual sal_Bool SAL_CALL hasPropertyByName( const ::rtl::OUString& Name )
62 			throw(::com::sun::star::uno::RuntimeException);
63 	};
64 }
65 #endif
66