UDK 3.2.7 C/C++ API Reference
|
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 00002 /************************************************************************* 00003 * 00004 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 00005 * 00006 * Copyright 2000, 2010 Oracle and/or its affiliates. 00007 * 00008 * OpenOffice.org - a multi-platform office productivity suite 00009 * 00010 * This file is part of OpenOffice.org. 00011 * 00012 * OpenOffice.org is free software: you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License version 3 00014 * only, as published by the Free Software Foundation. 00015 * 00016 * OpenOffice.org is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Lesser General Public License version 3 for more details 00020 * (a copy is included in the LICENSE file that accompanied this code). 00021 * 00022 * You should have received a copy of the GNU Lesser General Public License 00023 * version 3 along with OpenOffice.org. If not, see 00024 * <http://www.openoffice.org/license.html> 00025 * for a copy of the LGPLv3 License. 00026 * 00027 ************************************************************************/ 00028 #ifndef _CPPUHELPER_IMPLBASE10_HXX_ 00029 #define _CPPUHELPER_IMPLBASE10_HXX_ 00030 00031 #include <cppuhelper/implbase_ex.hxx> 00032 #include <rtl/instance.hxx> 00033 00034 namespace cppu 00035 { 00037 00038 struct class_data10 00039 { 00040 sal_Int16 m_nTypes; 00041 sal_Bool m_storedTypeRefs; 00042 sal_Bool m_storedId; 00043 sal_Int8 m_id[ 16 ]; 00044 type_entry m_typeEntries[ 10 + 1 ]; 00045 }; 00046 00047 template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Ifc7, typename Ifc8, typename Ifc9, typename Ifc10, typename Impl > 00048 struct ImplClassData10 00049 { 00050 class_data* operator ()() 00051 { 00052 static class_data10 s_cd = 00053 { 00054 10 +1, sal_False, sal_False, 00055 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 00056 { 00057 { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 }, 00058 { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 }, 00059 { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 }, 00060 { { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 }, 00061 { { Ifc5::static_type }, ((sal_IntPtr)(Ifc5 *) (Impl *) 16) - 16 }, 00062 { { Ifc6::static_type }, ((sal_IntPtr)(Ifc6 *) (Impl *) 16) - 16 }, 00063 { { Ifc7::static_type }, ((sal_IntPtr)(Ifc7 *) (Impl *) 16) - 16 }, 00064 { { Ifc8::static_type }, ((sal_IntPtr)(Ifc8 *) (Impl *) 16) - 16 }, 00065 { { Ifc9::static_type }, ((sal_IntPtr)(Ifc9 *) (Impl *) 16) - 16 }, 00066 { { Ifc10::static_type }, ((sal_IntPtr)(Ifc10 *) (Impl *) 16) - 16 }, 00067 { { com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } 00068 } 00069 }; 00070 return reinterpret_cast< class_data * >(&s_cd); 00071 } 00072 }; 00073 00075 00084 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 > 00085 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelper10 00086 : public com::sun::star::lang::XTypeProvider 00087 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10 00088 { 00089 struct cd : public rtl::StaticAggregate< class_data, ImplClassData10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, ImplHelper10<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10> > > {}; 00090 public: 00091 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00092 { return ImplHelper_query( rType, cd::get(), this ); } 00093 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00094 { return ImplHelper_getTypes( cd::get() ); } 00095 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00096 { return ImplHelper_getImplementationId( cd::get() ); } 00097 00098 #if !defined _MSC_VER // public -> protected changes mangled names there 00099 protected: 00100 #endif 00101 ~ImplHelper10() throw () {} 00102 }; 00111 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 > 00112 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper10 00113 : public OWeakObject 00114 , public com::sun::star::lang::XTypeProvider 00115 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10 00116 { 00117 struct cd : public rtl::StaticAggregate< class_data, ImplClassData10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, WeakImplHelper10<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10> > > {}; 00118 public: 00119 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00120 { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } 00121 virtual void SAL_CALL acquire() throw () 00122 { OWeakObject::acquire(); } 00123 virtual void SAL_CALL release() throw () 00124 { OWeakObject::release(); } 00125 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00126 { return WeakImplHelper_getTypes( cd::get() ); } 00127 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00128 { return ImplHelper_getImplementationId( cd::get() ); } 00129 }; 00143 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 > 00144 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggImplHelper10 00145 : public OWeakAggObject 00146 , public com::sun::star::lang::XTypeProvider 00147 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10 00148 { 00149 struct cd : public rtl::StaticAggregate< class_data, ImplClassData10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, WeakAggImplHelper10<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10> > > {}; 00150 public: 00151 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00152 { return OWeakAggObject::queryInterface( rType ); } 00153 virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00154 { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } 00155 virtual void SAL_CALL acquire() throw () 00156 { OWeakAggObject::acquire(); } 00157 virtual void SAL_CALL release() throw () 00158 { OWeakAggObject::release(); } 00159 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00160 { return WeakAggImplHelper_getTypes( cd::get() ); } 00161 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00162 { return ImplHelper_getImplementationId( cd::get() ); } 00163 }; 00180 template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 > 00181 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper10 00182 : public BaseClass 00183 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10 00184 { 00185 struct cd : public rtl::StaticAggregate< class_data, ImplClassData10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, ImplInheritanceHelper10<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10> > > {}; 00186 protected: 00187 template< typename T1 > 00188 explicit ImplInheritanceHelper10(T1 const & arg1): BaseClass(arg1) {} 00189 template< typename T1, typename T2 > 00190 ImplInheritanceHelper10(T1 const & arg1, T2 const & arg2): 00191 BaseClass(arg1, arg2) {} 00192 template< typename T1, typename T2, typename T3 > 00193 ImplInheritanceHelper10( 00194 T1 const & arg1, T2 const & arg2, T3 const & arg3): 00195 BaseClass(arg1, arg2, arg3) {} 00196 template< typename T1, typename T2, typename T3, typename T4 > 00197 ImplInheritanceHelper10( 00198 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): 00199 BaseClass(arg1, arg2, arg3, arg4) {} 00200 template< 00201 typename T1, typename T2, typename T3, typename T4, typename T5 > 00202 ImplInheritanceHelper10( 00203 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00204 T5 const & arg5): 00205 BaseClass(arg1, arg2, arg3, arg4, arg5) {} 00206 template< 00207 typename T1, typename T2, typename T3, typename T4, typename T5, 00208 typename T6 > 00209 ImplInheritanceHelper10( 00210 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00211 T5 const & arg5, T6 const & arg6): 00212 BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} 00213 public: 00214 ImplInheritanceHelper10() {} 00215 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00216 { 00217 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); 00218 if (aRet.hasValue()) 00219 return aRet; 00220 return BaseClass::queryInterface( rType ); 00221 } 00222 virtual void SAL_CALL acquire() throw () 00223 { BaseClass::acquire(); } 00224 virtual void SAL_CALL release() throw () 00225 { BaseClass::release(); } 00226 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00227 { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } 00228 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00229 { return ImplHelper_getImplementationId( cd::get() ); } 00230 }; 00248 template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 > 00249 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE AggImplInheritanceHelper10 00250 : public BaseClass 00251 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10 00252 { 00253 struct cd : public rtl::StaticAggregate< class_data, ImplClassData10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, AggImplInheritanceHelper10<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10> > > {}; 00254 protected: 00255 template< typename T1 > 00256 explicit AggImplInheritanceHelper10(T1 const & arg1): BaseClass(arg1) {} 00257 template< typename T1, typename T2 > 00258 AggImplInheritanceHelper10(T1 const & arg1, T2 const & arg2): 00259 BaseClass(arg1, arg2) {} 00260 template< typename T1, typename T2, typename T3 > 00261 AggImplInheritanceHelper10( 00262 T1 const & arg1, T2 const & arg2, T3 const & arg3): 00263 BaseClass(arg1, arg2, arg3) {} 00264 template< typename T1, typename T2, typename T3, typename T4 > 00265 AggImplInheritanceHelper10( 00266 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): 00267 BaseClass(arg1, arg2, arg3, arg4) {} 00268 template< 00269 typename T1, typename T2, typename T3, typename T4, typename T5 > 00270 AggImplInheritanceHelper10( 00271 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00272 T5 const & arg5): 00273 BaseClass(arg1, arg2, arg3, arg4, arg5) {} 00274 template< 00275 typename T1, typename T2, typename T3, typename T4, typename T5, 00276 typename T6 > 00277 AggImplInheritanceHelper10( 00278 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00279 T5 const & arg5, T6 const & arg6): 00280 BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} 00281 public: 00282 AggImplInheritanceHelper10() {} 00283 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00284 { return BaseClass::queryInterface( rType ); } 00285 virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00286 { 00287 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); 00288 if (aRet.hasValue()) 00289 return aRet; 00290 return BaseClass::queryAggregation( rType ); 00291 } 00292 virtual void SAL_CALL acquire() throw () 00293 { BaseClass::acquire(); } 00294 virtual void SAL_CALL release() throw () 00295 { BaseClass::release(); } 00296 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00297 { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } 00298 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00299 { return ImplHelper_getImplementationId( cd::get() ); } 00300 }; 00301 } 00302 00303 #endif 00304 00305 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */