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_COMPBASE2_HXX_ 00029 #define _CPPUHELPER_COMPBASE2_HXX_ 00030 00031 #include <cppuhelper/implbase2.hxx> 00032 #include <cppuhelper/compbase_ex.hxx> 00033 /* 00034 __DEF_COMPIMPLHELPER_EX( 2 ) 00035 */ 00036 00037 namespace cppu 00038 { 00039 00040 // Suppress warnings about hidden functions in case any of the IfcN has 00041 // functions named dispose, addEventListener, or removeEventListener: 00042 #if defined __SUNPRO_CC 00043 #pragma disable_warn 00044 #endif 00045 00060 template< class Ifc1, class Ifc2 > 00061 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakComponentImplHelper2 00062 : public WeakComponentImplHelperBase 00063 , public ::com::sun::star::lang::XTypeProvider 00064 , public Ifc1, public Ifc2 00065 { 00066 struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, WeakComponentImplHelper2<Ifc1, Ifc2> > > {}; 00067 public: 00068 inline WeakComponentImplHelper2( ::osl::Mutex & rMutex ) throw () 00069 : WeakComponentImplHelperBase( rMutex ) 00070 {} 00071 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) 00072 { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } 00073 virtual void SAL_CALL acquire() throw () 00074 { WeakComponentImplHelperBase::acquire(); } 00075 virtual void SAL_CALL release() throw () 00076 { WeakComponentImplHelperBase::release(); } 00077 virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException) 00078 { WeakComponentImplHelperBase::dispose(); } 00079 virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) 00080 { WeakComponentImplHelperBase::addEventListener(xListener); } 00081 virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) 00082 { WeakComponentImplHelperBase::removeEventListener(xListener); } 00083 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) 00084 { return WeakComponentImplHelper_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 00089 #if defined __SUNPRO_CC 00090 #pragma enable_warn 00091 #endif 00092 00102 template< class Ifc1, class Ifc2 > 00103 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE PartialWeakComponentImplHelper2 00104 : public WeakComponentImplHelperBase 00105 , public ::com::sun::star::lang::XTypeProvider 00106 , public Ifc1, public Ifc2 00107 { 00108 struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, PartialWeakComponentImplHelper2<Ifc1, Ifc2> > > {}; 00109 public: 00110 inline PartialWeakComponentImplHelper2( ::osl::Mutex & rMutex ) throw () 00111 : WeakComponentImplHelperBase( rMutex ) 00112 {} 00113 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) 00114 { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } 00115 virtual void SAL_CALL acquire() throw () 00116 { WeakComponentImplHelperBase::acquire(); } 00117 virtual void SAL_CALL release() throw () 00118 { WeakComponentImplHelperBase::release(); } 00119 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) 00120 { return WeakComponentImplHelper_getTypes( cd::get() ); } 00121 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) 00122 { return ImplHelper_getImplementationId( cd::get() ); } 00123 }; 00124 00125 00143 template< class Ifc1, class Ifc2 > 00144 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggComponentImplHelper2 00145 : public WeakAggComponentImplHelperBase 00146 , public ::com::sun::star::lang::XTypeProvider 00147 , public Ifc1, public Ifc2 00148 { 00149 struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, WeakAggComponentImplHelper2<Ifc1, Ifc2> > > {}; 00150 public: 00151 inline WeakAggComponentImplHelper2( ::osl::Mutex & rMutex ) throw () 00152 : WeakAggComponentImplHelperBase( rMutex ) 00153 {} 00154 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) 00155 { return WeakAggComponentImplHelperBase::queryInterface( rType ); } 00156 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) 00157 { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); } 00158 virtual void SAL_CALL acquire() throw () 00159 { WeakAggComponentImplHelperBase::acquire(); } 00160 virtual void SAL_CALL release() throw () 00161 { WeakAggComponentImplHelperBase::release(); } 00162 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) 00163 { return WeakAggComponentImplHelper_getTypes( cd::get() ); } 00164 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) 00165 { return ImplHelper_getImplementationId( cd::get() ); } 00166 }; 00167 } 00168 00169 #endif 00170 00171 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */