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 #ifndef _XMLOFF_PROPERTYSETINFOKEY_HXX
24 #define _XMLOFF_PROPERTYSETINFOKEY_HXX
25 
26 #include <osl/diagnose.h>
27 #include <com/sun/star/uno/Sequence.hxx>
28 
29 namespace com { namespace sun { namespace star {
30 	namespace beans { class XPropertySetInfo; }
31 } } }
32 
33 
34 struct PropertySetInfoKey
35 {
36 	::com::sun::star::uno::Reference <
37 		::com::sun::star::beans::XPropertySetInfo >	xPropInfo;
38 	::com::sun::star::uno::Sequence < sal_Int8 > aImplementationId;
39 
40 	inline PropertySetInfoKey();
41 	inline PropertySetInfoKey(
42 			const ::com::sun::star::uno::Reference <
43 					::com::sun::star::beans::XPropertySetInfo >& rPropInfo,
44 			const ::com::sun::star::uno::Sequence < sal_Int8 >& rImplId );
45 };
46 
PropertySetInfoKey()47 inline PropertySetInfoKey::PropertySetInfoKey()
48 {
49 	OSL_ENSURE( aImplementationId.getLength()==16, "illegal constructor call" );
50 }
51 
PropertySetInfoKey(const::com::sun::star::uno::Reference<::com::sun::star::beans::XPropertySetInfo> & rPropInfo,const::com::sun::star::uno::Sequence<sal_Int8> & rImplId)52 inline PropertySetInfoKey::PropertySetInfoKey(
53 		const ::com::sun::star::uno::Reference <
54 			::com::sun::star::beans::XPropertySetInfo >& rPropInfo,
55 		const ::com::sun::star::uno::Sequence < sal_Int8 >& rImplId ) :
56 	xPropInfo( rPropInfo ),
57 	aImplementationId( rImplId )
58 {
59 	OSL_ENSURE( rPropInfo.is(), "prop info missing" );
60 	OSL_ENSURE( aImplementationId.getLength()==16, "invalid implementation id" );
61 }
62 
63 #endif
64