|
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_IMPLBASE5_HXX_ 00020 #define _CPPUHELPER_IMPLBASE5_HXX_ 00021 00022 #include <cppuhelper/implbase_ex.hxx> 00023 #include <rtl/instance.hxx> 00024 00025 namespace cppu 00026 { 00028 00029 struct class_data5 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[ 5 + 1 ]; 00036 }; 00037 00038 template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Impl > 00039 struct ImplClassData5 00040 { 00041 class_data* operator ()() 00042 { 00043 static class_data5 s_cd = 00044 { 00045 5 +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 { { com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } 00054 } 00055 }; 00056 return reinterpret_cast< class_data * >(&s_cd); 00057 } 00058 }; 00059 00061 00070 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 > 00071 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelper5 00072 : public com::sun::star::lang::XTypeProvider 00073 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5 00074 { 00075 struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, ImplHelper5<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {}; 00076 public: 00077 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00078 { return ImplHelper_query( rType, cd::get(), this ); } 00079 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00080 { return ImplHelper_getTypes( cd::get() ); } 00081 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00082 { return ImplHelper_getImplementationId( cd::get() ); } 00083 00084 #if !defined _MSC_VER // public -> protected changes mangled names there 00085 protected: 00086 #endif 00087 ~ImplHelper5() throw () {} 00088 }; 00097 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 > 00098 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper5 00099 : public OWeakObject 00100 , public com::sun::star::lang::XTypeProvider 00101 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5 00102 { 00103 struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, WeakImplHelper5<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {}; 00104 public: 00105 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00106 { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } 00107 virtual void SAL_CALL acquire() throw () 00108 { OWeakObject::acquire(); } 00109 virtual void SAL_CALL release() throw () 00110 { OWeakObject::release(); } 00111 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00112 { return WeakImplHelper_getTypes( cd::get() ); } 00113 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00114 { return ImplHelper_getImplementationId( cd::get() ); } 00115 }; 00129 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 > 00130 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggImplHelper5 00131 : public OWeakAggObject 00132 , public com::sun::star::lang::XTypeProvider 00133 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5 00134 { 00135 struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, WeakAggImplHelper5<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {}; 00136 public: 00137 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00138 { return OWeakAggObject::queryInterface( rType ); } 00139 virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00140 { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } 00141 virtual void SAL_CALL acquire() throw () 00142 { OWeakAggObject::acquire(); } 00143 virtual void SAL_CALL release() throw () 00144 { OWeakAggObject::release(); } 00145 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00146 { return WeakAggImplHelper_getTypes( cd::get() ); } 00147 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00148 { return ImplHelper_getImplementationId( cd::get() ); } 00149 }; 00166 template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 > 00167 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper5 00168 : public BaseClass 00169 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5 00170 { 00171 struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, ImplInheritanceHelper5<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {}; 00172 protected: 00173 template< typename T1 > 00174 explicit ImplInheritanceHelper5(T1 const & arg1): BaseClass(arg1) {} 00175 template< typename T1, typename T2 > 00176 ImplInheritanceHelper5(T1 const & arg1, T2 const & arg2): 00177 BaseClass(arg1, arg2) {} 00178 template< typename T1, typename T2, typename T3 > 00179 ImplInheritanceHelper5( 00180 T1 const & arg1, T2 const & arg2, T3 const & arg3): 00181 BaseClass(arg1, arg2, arg3) {} 00182 template< typename T1, typename T2, typename T3, typename T4 > 00183 ImplInheritanceHelper5( 00184 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): 00185 BaseClass(arg1, arg2, arg3, arg4) {} 00186 template< 00187 typename T1, typename T2, typename T3, typename T4, typename T5 > 00188 ImplInheritanceHelper5( 00189 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00190 T5 const & arg5): 00191 BaseClass(arg1, arg2, arg3, arg4, arg5) {} 00192 template< 00193 typename T1, typename T2, typename T3, typename T4, typename T5, 00194 typename T6 > 00195 ImplInheritanceHelper5( 00196 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00197 T5 const & arg5, T6 const & arg6): 00198 BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} 00199 public: 00200 ImplInheritanceHelper5() {} 00201 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00202 { 00203 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); 00204 if (aRet.hasValue()) 00205 return aRet; 00206 return BaseClass::queryInterface( rType ); 00207 } 00208 virtual void SAL_CALL acquire() throw () 00209 { BaseClass::acquire(); } 00210 virtual void SAL_CALL release() throw () 00211 { BaseClass::release(); } 00212 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00213 { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } 00214 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00215 { return ImplHelper_getImplementationId( cd::get() ); } 00216 }; 00234 template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 > 00235 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE AggImplInheritanceHelper5 00236 : public BaseClass 00237 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5 00238 { 00239 struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, AggImplInheritanceHelper5<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {}; 00240 protected: 00241 template< typename T1 > 00242 explicit AggImplInheritanceHelper5(T1 const & arg1): BaseClass(arg1) {} 00243 template< typename T1, typename T2 > 00244 AggImplInheritanceHelper5(T1 const & arg1, T2 const & arg2): 00245 BaseClass(arg1, arg2) {} 00246 template< typename T1, typename T2, typename T3 > 00247 AggImplInheritanceHelper5( 00248 T1 const & arg1, T2 const & arg2, T3 const & arg3): 00249 BaseClass(arg1, arg2, arg3) {} 00250 template< typename T1, typename T2, typename T3, typename T4 > 00251 AggImplInheritanceHelper5( 00252 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): 00253 BaseClass(arg1, arg2, arg3, arg4) {} 00254 template< 00255 typename T1, typename T2, typename T3, typename T4, typename T5 > 00256 AggImplInheritanceHelper5( 00257 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00258 T5 const & arg5): 00259 BaseClass(arg1, arg2, arg3, arg4, arg5) {} 00260 template< 00261 typename T1, typename T2, typename T3, typename T4, typename T5, 00262 typename T6 > 00263 AggImplInheritanceHelper5( 00264 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00265 T5 const & arg5, T6 const & arg6): 00266 BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} 00267 public: 00268 AggImplInheritanceHelper5() {} 00269 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00270 { return BaseClass::queryInterface( rType ); } 00271 virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00272 { 00273 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); 00274 if (aRet.hasValue()) 00275 return aRet; 00276 return BaseClass::queryAggregation( rType ); 00277 } 00278 virtual void SAL_CALL acquire() throw () 00279 { BaseClass::acquire(); } 00280 virtual void SAL_CALL release() throw () 00281 { BaseClass::release(); } 00282 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00283 { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } 00284 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00285 { return ImplHelper_getImplementationId( cd::get() ); } 00286 }; 00287 } 00288 00289 #endif 00290 00291 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
1.7.3