|
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_IMPLBASE11_HXX_ 00020 #define _CPPUHELPER_IMPLBASE11_HXX_ 00021 00022 #include <cppuhelper/implbase_ex.hxx> 00023 #include <rtl/instance.hxx> 00024 00025 namespace cppu 00026 { 00028 00029 struct class_data11 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[ 11 + 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 Impl > 00039 struct ImplClassData11 00040 { 00041 class_data* operator ()() 00042 { 00043 static class_data11 s_cd = 00044 { 00045 11 +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 { { com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } 00060 } 00061 }; 00062 return reinterpret_cast< class_data * >(&s_cd); 00063 } 00064 }; 00065 00067 00076 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > 00077 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelper11 00078 : public com::sun::star::lang::XTypeProvider 00079 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11 00080 { 00081 struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, ImplHelper11<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {}; 00082 public: 00083 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00084 { return ImplHelper_query( rType, cd::get(), this ); } 00085 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00086 { return ImplHelper_getTypes( cd::get() ); } 00087 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00088 { return ImplHelper_getImplementationId( cd::get() ); } 00089 00090 #if !defined _MSC_VER // public -> protected changes mangled names there 00091 protected: 00092 #endif 00093 ~ImplHelper11() throw () {} 00094 }; 00103 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > 00104 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper11 00105 : public OWeakObject 00106 , public com::sun::star::lang::XTypeProvider 00107 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11 00108 { 00109 struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, WeakImplHelper11<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {}; 00110 public: 00111 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00112 { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } 00113 virtual void SAL_CALL acquire() throw () 00114 { OWeakObject::acquire(); } 00115 virtual void SAL_CALL release() throw () 00116 { OWeakObject::release(); } 00117 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00118 { return WeakImplHelper_getTypes( cd::get() ); } 00119 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00120 { return ImplHelper_getImplementationId( cd::get() ); } 00121 }; 00135 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > 00136 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggImplHelper11 00137 : public OWeakAggObject 00138 , public com::sun::star::lang::XTypeProvider 00139 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11 00140 { 00141 struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, WeakAggImplHelper11<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {}; 00142 public: 00143 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00144 { return OWeakAggObject::queryInterface( rType ); } 00145 virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00146 { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } 00147 virtual void SAL_CALL acquire() throw () 00148 { OWeakAggObject::acquire(); } 00149 virtual void SAL_CALL release() throw () 00150 { OWeakAggObject::release(); } 00151 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00152 { return WeakAggImplHelper_getTypes( cd::get() ); } 00153 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00154 { return ImplHelper_getImplementationId( cd::get() ); } 00155 }; 00172 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 > 00173 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper11 00174 : public BaseClass 00175 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11 00176 { 00177 struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, ImplInheritanceHelper11<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {}; 00178 protected: 00179 template< typename T1 > 00180 explicit ImplInheritanceHelper11(T1 const & arg1): BaseClass(arg1) {} 00181 template< typename T1, typename T2 > 00182 ImplInheritanceHelper11(T1 const & arg1, T2 const & arg2): 00183 BaseClass(arg1, arg2) {} 00184 template< typename T1, typename T2, typename T3 > 00185 ImplInheritanceHelper11( 00186 T1 const & arg1, T2 const & arg2, T3 const & arg3): 00187 BaseClass(arg1, arg2, arg3) {} 00188 template< typename T1, typename T2, typename T3, typename T4 > 00189 ImplInheritanceHelper11( 00190 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): 00191 BaseClass(arg1, arg2, arg3, arg4) {} 00192 template< 00193 typename T1, typename T2, typename T3, typename T4, typename T5 > 00194 ImplInheritanceHelper11( 00195 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00196 T5 const & arg5): 00197 BaseClass(arg1, arg2, arg3, arg4, arg5) {} 00198 template< 00199 typename T1, typename T2, typename T3, typename T4, typename T5, 00200 typename T6 > 00201 ImplInheritanceHelper11( 00202 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00203 T5 const & arg5, T6 const & arg6): 00204 BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} 00205 public: 00206 ImplInheritanceHelper11() {} 00207 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00208 { 00209 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); 00210 if (aRet.hasValue()) 00211 return aRet; 00212 return BaseClass::queryInterface( rType ); 00213 } 00214 virtual void SAL_CALL acquire() throw () 00215 { BaseClass::acquire(); } 00216 virtual void SAL_CALL release() throw () 00217 { BaseClass::release(); } 00218 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00219 { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } 00220 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00221 { return ImplHelper_getImplementationId( cd::get() ); } 00222 }; 00240 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 > 00241 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE AggImplInheritanceHelper11 00242 : public BaseClass 00243 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11 00244 { 00245 struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, AggImplInheritanceHelper11<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {}; 00246 protected: 00247 template< typename T1 > 00248 explicit AggImplInheritanceHelper11(T1 const & arg1): BaseClass(arg1) {} 00249 template< typename T1, typename T2 > 00250 AggImplInheritanceHelper11(T1 const & arg1, T2 const & arg2): 00251 BaseClass(arg1, arg2) {} 00252 template< typename T1, typename T2, typename T3 > 00253 AggImplInheritanceHelper11( 00254 T1 const & arg1, T2 const & arg2, T3 const & arg3): 00255 BaseClass(arg1, arg2, arg3) {} 00256 template< typename T1, typename T2, typename T3, typename T4 > 00257 AggImplInheritanceHelper11( 00258 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): 00259 BaseClass(arg1, arg2, arg3, arg4) {} 00260 template< 00261 typename T1, typename T2, typename T3, typename T4, typename T5 > 00262 AggImplInheritanceHelper11( 00263 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00264 T5 const & arg5): 00265 BaseClass(arg1, arg2, arg3, arg4, arg5) {} 00266 template< 00267 typename T1, typename T2, typename T3, typename T4, typename T5, 00268 typename T6 > 00269 AggImplInheritanceHelper11( 00270 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00271 T5 const & arg5, T6 const & arg6): 00272 BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} 00273 public: 00274 AggImplInheritanceHelper11() {} 00275 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00276 { return BaseClass::queryInterface( rType ); } 00277 virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00278 { 00279 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); 00280 if (aRet.hasValue()) 00281 return aRet; 00282 return BaseClass::queryAggregation( rType ); 00283 } 00284 virtual void SAL_CALL acquire() throw () 00285 { BaseClass::acquire(); } 00286 virtual void SAL_CALL release() throw () 00287 { BaseClass::release(); } 00288 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00289 { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } 00290 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00291 { return ImplHelper_getImplementationId( cd::get() ); } 00292 }; 00293 } 00294 00295 #endif 00296 00297 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
1.7.3