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_PROPERTYINFOHASH_HXX_
25 #define _COMPHELPER_PROPERTYINFOHASH_HXX_
26 
27 #include <rtl/ustring.hxx>
28 #include <comphelper/TypeGeneration.hxx>
29 #include <hash_map>
30 namespace comphelper
31 {
32 	struct PropertyInfo
33 	{
34 		const sal_Char* mpName;
35 		sal_uInt16 mnNameLen;
36 		sal_Int32 mnHandle;
37 		CppuTypes meCppuType;
38 		sal_Int16 mnAttributes;
39 		sal_uInt8 mnMemberId;
40 	};
41 	struct PropertyData
42 	{
43 		sal_uInt8 mnMapId;
44 		PropertyInfo *mpInfo;
PropertyDatacomphelper::PropertyData45 		PropertyData ( sal_uInt8 nMapId, PropertyInfo *pInfo )
46 		: mnMapId ( nMapId )
47 		, mpInfo ( pInfo ) {}
48 	};
49 	struct eqFunc
50 	{
operator ()comphelper::eqFunc51 		sal_Bool operator()( const rtl::OUString &r1,
52 							 const rtl::OUString &r2) const
53 		{
54 			return r1 == r2;
55 		}
56 	};
57 }
58 
59 typedef std::hash_map < ::rtl::OUString,
60 						::comphelper::PropertyInfo*,
61 						::rtl::OUStringHash,
62 						::comphelper::eqFunc > PropertyInfoHash;
63 typedef std::hash_map < ::rtl::OUString,
64 						::comphelper::PropertyData*,
65 						::rtl::OUStringHash,
66 						::comphelper::eqFunc > PropertyDataHash;
67 #endif
68