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_COMPBASE_HXX_ 00029 #define _CPPUHELPER_COMPBASE_HXX_ 00030 00031 #include <cppuhelper/compbase_ex.hxx> 00032 #include <cppuhelper/implbase.hxx> 00033 00034 /* This header should not be used anymore. 00035 @deprecated 00036 */ 00037 00039 00040 #define __DEF_COMPIMPLHELPER_A( N ) \ 00041 namespace cppu \ 00042 { \ 00043 template< __CLASS_IFC##N > \ 00044 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakComponentImplHelper##N \ 00045 : public ::cppu::WeakComponentImplHelperBase \ 00046 , public ImplHelperBase##N< __IFC##N > \ 00047 { \ 00048 static ClassData##N s_aCD; \ 00049 public: \ 00050 WeakComponentImplHelper##N( ::osl::Mutex & rMutex ) SAL_THROW(()) \ 00051 : WeakComponentImplHelperBase( rMutex ) \ 00052 {} \ 00053 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ 00054 { \ 00055 ::com::sun::star::uno::Any aRet( getClassData( s_aCD ).query( rType, (ImplHelperBase##N< __IFC##N > *)this ) ); \ 00056 if (aRet.hasValue()) \ 00057 return aRet; \ 00058 return WeakComponentImplHelperBase::queryInterface( rType ); \ 00059 } \ 00060 virtual void SAL_CALL acquire() throw () \ 00061 { WeakComponentImplHelperBase::acquire(); } \ 00062 virtual void SAL_CALL release() throw () \ 00063 { WeakComponentImplHelperBase::release(); } \ 00064 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \ 00065 { return getClassData( s_aCD ).getTypes(); } \ 00066 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \ 00067 { return getClassData( s_aCD ).getImplementationId(); } \ 00068 }; \ 00069 template< __CLASS_IFC##N > \ 00070 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggComponentImplHelper##N \ 00071 : public ::cppu::WeakAggComponentImplHelperBase \ 00072 , public ImplHelperBase##N< __IFC##N > \ 00073 { \ 00074 static ClassData##N s_aCD; \ 00075 public: \ 00076 WeakAggComponentImplHelper##N( ::osl::Mutex & rMutex ) SAL_THROW(()) \ 00077 : WeakAggComponentImplHelperBase( rMutex ) \ 00078 {} \ 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 WeakAggComponentImplHelperBase::queryInterface( rType ); } \ 00081 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ 00082 { \ 00083 ::com::sun::star::uno::Any aRet( getClassData( s_aCD ).query( rType, (ImplHelperBase##N< __IFC##N > *)this ) ); \ 00084 if (aRet.hasValue()) \ 00085 return aRet; \ 00086 return WeakAggComponentImplHelperBase::queryAggregation( rType ); \ 00087 } \ 00088 virtual void SAL_CALL acquire() throw () \ 00089 { WeakAggComponentImplHelperBase::acquire(); } \ 00090 virtual void SAL_CALL release() throw () \ 00091 { WeakAggComponentImplHelperBase::release(); } \ 00092 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \ 00093 { return getClassData( s_aCD ).getTypes(); } \ 00094 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \ 00095 { return getClassData( s_aCD ).getImplementationId(); } \ 00096 }; 00097 00098 #define __DEF_COMPIMPLHELPER_B( N ) \ 00099 template< __CLASS_IFC##N > \ 00100 ClassData##N WeakComponentImplHelper##N< __IFC##N >::s_aCD = ClassData##N( 4 ); \ 00101 template< __CLASS_IFC##N > \ 00102 ClassData##N WeakAggComponentImplHelper##N< __IFC##N >::s_aCD = ClassData##N( 3 ); 00103 00104 #define __DEF_COMPIMPLHELPER_C( N ) \ 00105 } 00106 00107 #define __DEF_COMPIMPLHELPER( N ) \ 00108 __DEF_COMPIMPLHELPER_A( N ) \ 00109 __DEF_COMPIMPLHELPER_B( N ) \ 00110 __DEF_COMPIMPLHELPER_C( N ) 00111 00113 00114 #endif 00115 00116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */