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_IMPLBASE7_HXX_ 00029 #define _CPPUHELPER_IMPLBASE7_HXX_ 00030 00031 #include <cppuhelper/implbase_ex.hxx> 00032 #include <rtl/instance.hxx> 00033 00034 namespace cppu 00035 { 00037 00038 struct class_data7 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[ 7 + 1 ]; 00045 }; 00046 00047 template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Ifc7, typename Impl > 00048 struct ImplClassData7 00049 { 00050 class_data* operator ()() 00051 { 00052 static class_data7 s_cd = 00053 { 00054 7 +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 { { com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } 00065 } 00066 }; 00067 return reinterpret_cast< class_data * >(&s_cd); 00068 } 00069 }; 00070 00072 00081 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 > 00082 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelper7 00083 : public com::sun::star::lang::XTypeProvider 00084 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7 00085 { 00086 struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, ImplHelper7<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {}; 00087 public: 00088 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00089 { return ImplHelper_query( rType, cd::get(), this ); } 00090 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00091 { return ImplHelper_getTypes( cd::get() ); } 00092 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00093 { return ImplHelper_getImplementationId( cd::get() ); } 00094 00095 #if !defined _MSC_VER // public -> protected changes mangled names there 00096 protected: 00097 #endif 00098 ~ImplHelper7() throw () {} 00099 }; 00108 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 > 00109 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper7 00110 : public OWeakObject 00111 , public com::sun::star::lang::XTypeProvider 00112 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7 00113 { 00114 struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, WeakImplHelper7<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {}; 00115 public: 00116 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00117 { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } 00118 virtual void SAL_CALL acquire() throw () 00119 { OWeakObject::acquire(); } 00120 virtual void SAL_CALL release() throw () 00121 { OWeakObject::release(); } 00122 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00123 { return WeakImplHelper_getTypes( cd::get() ); } 00124 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00125 { return ImplHelper_getImplementationId( cd::get() ); } 00126 }; 00140 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 > 00141 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggImplHelper7 00142 : public OWeakAggObject 00143 , public com::sun::star::lang::XTypeProvider 00144 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7 00145 { 00146 struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, WeakAggImplHelper7<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {}; 00147 public: 00148 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00149 { return OWeakAggObject::queryInterface( rType ); } 00150 virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00151 { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } 00152 virtual void SAL_CALL acquire() throw () 00153 { OWeakAggObject::acquire(); } 00154 virtual void SAL_CALL release() throw () 00155 { OWeakAggObject::release(); } 00156 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00157 { return WeakAggImplHelper_getTypes( cd::get() ); } 00158 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00159 { return ImplHelper_getImplementationId( cd::get() ); } 00160 }; 00177 template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 > 00178 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper7 00179 : public BaseClass 00180 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7 00181 { 00182 struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, ImplInheritanceHelper7<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {}; 00183 protected: 00184 template< typename T1 > 00185 explicit ImplInheritanceHelper7(T1 const & arg1): BaseClass(arg1) {} 00186 template< typename T1, typename T2 > 00187 ImplInheritanceHelper7(T1 const & arg1, T2 const & arg2): 00188 BaseClass(arg1, arg2) {} 00189 template< typename T1, typename T2, typename T3 > 00190 ImplInheritanceHelper7( 00191 T1 const & arg1, T2 const & arg2, T3 const & arg3): 00192 BaseClass(arg1, arg2, arg3) {} 00193 template< typename T1, typename T2, typename T3, typename T4 > 00194 ImplInheritanceHelper7( 00195 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): 00196 BaseClass(arg1, arg2, arg3, arg4) {} 00197 template< 00198 typename T1, typename T2, typename T3, typename T4, typename T5 > 00199 ImplInheritanceHelper7( 00200 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00201 T5 const & arg5): 00202 BaseClass(arg1, arg2, arg3, arg4, arg5) {} 00203 template< 00204 typename T1, typename T2, typename T3, typename T4, typename T5, 00205 typename T6 > 00206 ImplInheritanceHelper7( 00207 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00208 T5 const & arg5, T6 const & arg6): 00209 BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} 00210 public: 00211 ImplInheritanceHelper7() {} 00212 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00213 { 00214 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); 00215 if (aRet.hasValue()) 00216 return aRet; 00217 return BaseClass::queryInterface( rType ); 00218 } 00219 virtual void SAL_CALL acquire() throw () 00220 { BaseClass::acquire(); } 00221 virtual void SAL_CALL release() throw () 00222 { BaseClass::release(); } 00223 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00224 { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } 00225 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00226 { return ImplHelper_getImplementationId( cd::get() ); } 00227 }; 00245 template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 > 00246 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE AggImplInheritanceHelper7 00247 : public BaseClass 00248 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7 00249 { 00250 struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, AggImplInheritanceHelper7<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {}; 00251 protected: 00252 template< typename T1 > 00253 explicit AggImplInheritanceHelper7(T1 const & arg1): BaseClass(arg1) {} 00254 template< typename T1, typename T2 > 00255 AggImplInheritanceHelper7(T1 const & arg1, T2 const & arg2): 00256 BaseClass(arg1, arg2) {} 00257 template< typename T1, typename T2, typename T3 > 00258 AggImplInheritanceHelper7( 00259 T1 const & arg1, T2 const & arg2, T3 const & arg3): 00260 BaseClass(arg1, arg2, arg3) {} 00261 template< typename T1, typename T2, typename T3, typename T4 > 00262 AggImplInheritanceHelper7( 00263 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): 00264 BaseClass(arg1, arg2, arg3, arg4) {} 00265 template< 00266 typename T1, typename T2, typename T3, typename T4, typename T5 > 00267 AggImplInheritanceHelper7( 00268 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00269 T5 const & arg5): 00270 BaseClass(arg1, arg2, arg3, arg4, arg5) {} 00271 template< 00272 typename T1, typename T2, typename T3, typename T4, typename T5, 00273 typename T6 > 00274 AggImplInheritanceHelper7( 00275 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, 00276 T5 const & arg5, T6 const & arg6): 00277 BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} 00278 public: 00279 AggImplInheritanceHelper7() {} 00280 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00281 { return BaseClass::queryInterface( rType ); } 00282 virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException) 00283 { 00284 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); 00285 if (aRet.hasValue()) 00286 return aRet; 00287 return BaseClass::queryAggregation( rType ); 00288 } 00289 virtual void SAL_CALL acquire() throw () 00290 { BaseClass::acquire(); } 00291 virtual void SAL_CALL release() throw () 00292 { BaseClass::release(); } 00293 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException) 00294 { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } 00295 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException) 00296 { return ImplHelper_getImplementationId( cd::get() ); } 00297 }; 00298 } 00299 00300 #endif 00301 00302 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */