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