1*1c4c525fSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1c4c525fSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1c4c525fSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1c4c525fSAndrew Rist  * distributed with this work for additional information
6*1c4c525fSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1c4c525fSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1c4c525fSAndrew Rist  * "License"); you may not use this file except in compliance
9*1c4c525fSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*1c4c525fSAndrew Rist  *
11*1c4c525fSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*1c4c525fSAndrew Rist  *
13*1c4c525fSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1c4c525fSAndrew Rist  * software distributed under the License is distributed on an
15*1c4c525fSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1c4c525fSAndrew Rist  * KIND, either express or implied.  See the License for the
17*1c4c525fSAndrew Rist  * specific language governing permissions and limitations
18*1c4c525fSAndrew Rist  * under the License.
19*1c4c525fSAndrew Rist  *
20*1c4c525fSAndrew Rist  *************************************************************/
21*1c4c525fSAndrew Rist 
22*1c4c525fSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _STOC_TDMGR_COMMON_HXX
25cdf0e10cSrcweir #define _STOC_TDMGR_COMMON_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <rtl/unload.h>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include "com/sun/star/reflection/XTypeDescription.hpp"
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
32cdf0e10cSrcweir #define ARLEN(x) (sizeof (x) / sizeof *(x))
33cdf0e10cSrcweir 
34cdf0e10cSrcweir 
35cdf0e10cSrcweir namespace css = ::com::sun::star;
36cdf0e10cSrcweir 
37cdf0e10cSrcweir namespace stoc_tdmgr
38cdf0e10cSrcweir {
39cdf0e10cSrcweir     extern rtl_StandardModuleCount g_moduleCount;
40cdf0e10cSrcweir 
41cdf0e10cSrcweir struct IncompatibleTypeException
42cdf0e10cSrcweir {
43cdf0e10cSrcweir     ::rtl::OUString m_cause;
IncompatibleTypeExceptionstoc_tdmgr::IncompatibleTypeException44cdf0e10cSrcweir     IncompatibleTypeException( ::rtl::OUString const & cause )
45cdf0e10cSrcweir         : m_cause( cause ) {}
46cdf0e10cSrcweir };
47cdf0e10cSrcweir 
48cdf0e10cSrcweir void check(
49cdf0e10cSrcweir     css::uno::Reference<css::reflection::XTypeDescription> const & xNewTD,
50cdf0e10cSrcweir     css::uno::Reference<css::reflection::XTypeDescription> const & xExistingTD,
51cdf0e10cSrcweir     ::rtl::OUString const & context = ::rtl::OUString() );
52cdf0e10cSrcweir /* throw (css::uno::RuntimeException, IncompatibleTypeException) */
53cdf0e10cSrcweir 
54cdf0e10cSrcweir } // namespace stoc_tdmgr
55cdf0e10cSrcweir 
56cdf0e10cSrcweir #endif /* _STOC_TDMGR_COMMON_HXX */
57