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