|
UDK 3.2.7 C/C++ API Reference
|
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 00002 /* 00003 * This file is part of the LibreOffice project. 00004 * 00005 * This Source Code Form is subject to the terms of the Mozilla Public 00006 * License, v. 2.0. If a copy of the MPL was not distributed with this 00007 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 00008 * 00009 * This file incorporates work covered by the following license notice: 00010 * 00011 * Licensed to the Apache Software Foundation (ASF) under one or more 00012 * contributor license agreements. See the NOTICE file distributed 00013 * with this work for additional information regarding copyright 00014 * ownership. The ASF licenses this file to you under the Apache 00015 * License, Version 2.0 (the "License"); you may not use this file 00016 * except in compliance with the License. You may obtain a copy of 00017 * the License at http://www.apache.org/licenses/LICENSE-2.0 . 00018 */ 00019 #ifndef _CPPUHELPER_IMPLBASE12_HXX_ 00020 #define _CPPUHELPER_IMPLBASE12_HXX_ 00021 00022 #include <cppuhelper/implbase_ex.hxx> 00023 #include <rtl/instance.hxx> 00024 00025 namespace cppu 00026 { 00028 00029 struct class_data12 00030 { 00031 sal_Int16 m_nTypes; 00032 sal_Bool m_storedTypeRefs; 00033 sal_Bool m_storedId; 00034 sal_Int8 m_id[ 16 ]; 00035 type_entry m_typeEntries[ 12 + 1 ]; 00036 }; 00037 00038 template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Ifc7, typename Ifc8, typename Ifc9, typename Ifc10, typename Ifc11, typename Ifc12, typename Impl > 00039 struct ImplClassData12 00040 { 00041 class_data* operator ()() 00042 { 00043 static class_data12 s_cd = 00044 { 00045 12 +1, sal_False, sal_False, 00046 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 00047 { 00048 { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 }, 00049 { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 }, 00050 { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 }, 00051 { { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 }, 00052 { { Ifc5::static_type }, ((sal_IntPtr)(Ifc5 *) (Impl *) 16) - 16 }, 00053 { { Ifc6::static_type }, ((sal_IntPtr)(Ifc6 *) (Impl *) 16) - 16 }, 00054 { { Ifc7::static_type }, ((sal_IntPtr)(Ifc7 *) (Impl *) 16) - 16 }, 00055 { { Ifc8::static_type }, ((sal_IntPtr)(Ifc8 *) (Impl *) 16) - 16 }, 00056 { { Ifc9::static_type }, ((sal_IntPtr)(Ifc9 *) (Impl *) 16) - 16 }, 00057 { { Ifc10::static_type }, ((sal_IntPtr)(Ifc10 *) (Impl *) 16) - 16 }, 00058 { { Ifc11::static_type }, ((sal_IntPtr)(Ifc11 *) (Impl *) 16) - 16 }, 00059 { { Ifc12::static_type }, ((sal_IntPtr)(Ifc12 *) (Impl *) 16) - 16 }, 00060 { { com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } 00061 } 00062 }; 00063 return reinterpret_cast< class_data * >(&s_cd); 00064 } 00065 }; 00066 00068 00077 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 > 00078 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelper12 00079 : public com::sun::star::lang::XTypeProvider 00080 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12 00081 { 00082 struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, ImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {}; 00083 public: 00084 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00085 { return ImplHelper_query( rType, cd::get(), this ); } 00086 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00087 { return ImplHelper_getTypes( cd::get() ); } 00088 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00089 { return ImplHelper_getImplementationId( cd::get() ); } 00090 00091 #if !defined _MSC_VER // public -> protected changes mangled names there 00092 protected: 00093 #endif 00094 ~ImplHelper12() throw () {} 00095 }; 00104 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 > 00105 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper12 00106 : public OWeakObject 00107 , public com::sun::star::lang::XTypeProvider 00108 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12 00109 { 00110 struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, WeakImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {}; 00111 public: 00112 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00113 { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } 00114 virtual void SAL_CALL acquire() throw () 00115 { OWeakObject::acquire(); } 00116 virtual void SAL_CALL release() throw () 00117 { OWeakObject::release(); } 00118 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00119 { return WeakImplHelper_getTypes( cd::get() ); } 00120 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00121 { return ImplHelper_getImplementationId( cd::get() ); } 00122 }; 00136 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 > 00137 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggImplHelper12 00138 : public OWeakAggObject 00139 , public com::sun::star::lang::XTypeProvider 00140 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12 00141 { 00142 struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, WeakAggImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {}; 00143 public: 00144 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00145 { return OWeakAggObject::queryInterface( rType ); } 00146 virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00147 { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } 00148 virtual void SAL_CALL acquire() throw () 00149 { OWeakAggObject::acquire(); } 00150 virtual void SAL_CALL release() throw () 00151 { OWeakAggObject::release(); } 00152 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00153 { return WeakAggImplHelper_getTypes( cd::get() ); } 00154 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00155 { return ImplHelper_getImplementationId( cd::get() ); } 00156 }; 00173 template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 > 00174 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper12 00175 : public BaseClass 00176 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12 00177 { 00178 struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, ImplInheritanceHelper12<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {}; 00179 protected: 00180 template< typename T1 > 00181 explicit ImplInheritanceHelper12(T1 const & arg1): BaseClass(arg1) {} 00182 template< typename T1, typename T2 > 00183 ImplInheritanceHelper12(T1 const & arg1, T2 const & arg2): 00184 BaseClass(arg1, arg2) {} 00185 template< typename T1, typename T2, typename T3 > 00186 ImplInheritanceHelper12( 00187 T1 const & arg1, T2 const & arg2, T3 const & arg3): 00188 BaseClass(arg1, arg2, arg3) {} 00189 template< typename T1, typename T2, typename T3, typename T4 > 00190 ImplInheritanceHelper12( 00191 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): 00192 BaseClass(arg1, arg2, arg3, arg4) {} 00193 template< 00194 typename T1, typename T2, typename T3, typename T4, typename T5 > 00195 ImplInheritanceHelper12( 00196 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00197 T5 const & arg5): 00198 BaseClass(arg1, arg2, arg3, arg4, arg5) {} 00199 template< 00200 typename T1, typename T2, typename T3, typename T4, typename T5, 00201 typename T6 > 00202 ImplInheritanceHelper12( 00203 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00204 T5 const & arg5, T6 const & arg6): 00205 BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} 00206 public: 00207 ImplInheritanceHelper12() {} 00208 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00209 { 00210 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); 00211 if (aRet.hasValue()) 00212 return aRet; 00213 return BaseClass::queryInterface( rType ); 00214 } 00215 virtual void SAL_CALL acquire() throw () 00216 { BaseClass::acquire(); } 00217 virtual void SAL_CALL release() throw () 00218 { BaseClass::release(); } 00219 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00220 { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } 00221 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00222 { return ImplHelper_getImplementationId( cd::get() ); } 00223 }; 00241 template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 > 00242 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE AggImplInheritanceHelper12 00243 : public BaseClass 00244 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12 00245 { 00246 struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, AggImplInheritanceHelper12<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {}; 00247 protected: 00248 template< typename T1 > 00249 explicit AggImplInheritanceHelper12(T1 const & arg1): BaseClass(arg1) {} 00250 template< typename T1, typename T2 > 00251 AggImplInheritanceHelper12(T1 const & arg1, T2 const & arg2): 00252 BaseClass(arg1, arg2) {} 00253 template< typename T1, typename T2, typename T3 > 00254 AggImplInheritanceHelper12( 00255 T1 const & arg1, T2 const & arg2, T3 const & arg3): 00256 BaseClass(arg1, arg2, arg3) {} 00257 template< typename T1, typename T2, typename T3, typename T4 > 00258 AggImplInheritanceHelper12( 00259 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): 00260 BaseClass(arg1, arg2, arg3, arg4) {} 00261 template< 00262 typename T1, typename T2, typename T3, typename T4, typename T5 > 00263 AggImplInheritanceHelper12( 00264 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00265 T5 const & arg5): 00266 BaseClass(arg1, arg2, arg3, arg4, arg5) {} 00267 template< 00268 typename T1, typename T2, typename T3, typename T4, typename T5, 00269 typename T6 > 00270 AggImplInheritanceHelper12( 00271 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00272 T5 const & arg5, T6 const & arg6): 00273 BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} 00274 public: 00275 AggImplInheritanceHelper12() {} 00276 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00277 { return BaseClass::queryInterface( rType ); } 00278 virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00279 { 00280 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); 00281 if (aRet.hasValue()) 00282 return aRet; 00283 return BaseClass::queryAggregation( rType ); 00284 } 00285 virtual void SAL_CALL acquire() throw () 00286 { BaseClass::acquire(); } 00287 virtual void SAL_CALL release() throw () 00288 { BaseClass::release(); } 00289 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00290 { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } 00291 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00292 { return ImplHelper_getImplementationId( cd::get() ); } 00293 }; 00294 } 00295 00296 #endif 00297 00298 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
1.7.3