diff options
author | Daniel Boelzle <dbo@openoffice.org> | 2001-03-15 14:47:29 +0000 |
---|---|---|
committer | Daniel Boelzle <dbo@openoffice.org> | 2001-03-15 14:47:29 +0000 |
commit | 3c0774aba77edb5903b1c489a8b6e02a67ff667e (patch) | |
tree | fc343816045279fb695d62d188c7c67a57bf81bc /cppuhelper/inc/cppuhelper/implbase11.hxx | |
parent | 0528321f6afab45ca32154c7049dc4392d025c6a (diff) |
impl helper macros expanded and checked in
Diffstat (limited to 'cppuhelper/inc/cppuhelper/implbase11.hxx')
-rw-r--r-- | cppuhelper/inc/cppuhelper/implbase11.hxx | 127 |
1 files changed, 125 insertions, 2 deletions
diff --git a/cppuhelper/inc/cppuhelper/implbase11.hxx b/cppuhelper/inc/cppuhelper/implbase11.hxx index 7524160f6912..37289279bd8b 100644 --- a/cppuhelper/inc/cppuhelper/implbase11.hxx +++ b/cppuhelper/inc/cppuhelper/implbase11.hxx @@ -2,9 +2,9 @@ * * $RCSfile: implbase11.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:26:09 $ + * last change: $Author: dbo $ $Date: 2001-03-15 15:47:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,6 +65,7 @@ #include <cppuhelper/implbase.hxx> #endif +/* #define __IFC11 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 #define __CLASS_IFC11 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 #define __PUBLIC_IFC11 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11 @@ -73,5 +74,127 @@ __DEF_IMPLHELPER_PRE( 11 ) __IFC_WRITEOFFSET( 5 ) __IFC_WRITEOFFSET( 6 ) __IFC_WRITEOFFSET( 7 ) __IFC_WRITEOFFSET( 8 ) __IFC_WRITEOFFSET( 9 ) __IFC_WRITEOFFSET( 10 ) __IFC_WRITEOFFSET( 11 ) __DEF_IMPLHELPER_POST( 11 ) +*/ + +namespace cppu +{ + struct ClassData11 : public ClassDataBase + { + Type_Offset arType2Offset[ 11 ]; + ClassData11( sal_Int32 nClassCode ) SAL_THROW( () ) + : ClassDataBase( nClassCode ) + {} + }; + template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > + class ImplHelperBase11 + : public ::com::sun::star::lang::XTypeProvider + , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11 + { + protected: + ClassData & SAL_CALL getClassData( ClassDataBase & s_aCD ) SAL_THROW( () ) + { + ClassData & rCD = * static_cast< ClassData * >( &s_aCD ); + if (! rCD.bOffsetsInit) + { + ::osl::MutexGuard aGuard( getImplHelperInitMutex() ); + if (! rCD.bOffsetsInit) + { + char * pBase = (char *)this; + rCD.writeTypeOffset( ::getCppuType( (const ::com::sun::star::uno::Reference< Ifc1 > *)0 ), + (char *)(Ifc1 *)this - pBase ); + rCD.writeTypeOffset( ::getCppuType( (const ::com::sun::star::uno::Reference< Ifc2 > *)0 ), + (char *)(Ifc2 *)this - pBase ); + rCD.writeTypeOffset( ::getCppuType( (const ::com::sun::star::uno::Reference< Ifc3 > *)0 ), + (char *)(Ifc3 *)this - pBase ); + rCD.writeTypeOffset( ::getCppuType( (const ::com::sun::star::uno::Reference< Ifc4 > *)0 ), + (char *)(Ifc4 *)this - pBase ); + rCD.writeTypeOffset( ::getCppuType( (const ::com::sun::star::uno::Reference< Ifc5 > *)0 ), + (char *)(Ifc5 *)this - pBase ); + rCD.writeTypeOffset( ::getCppuType( (const ::com::sun::star::uno::Reference< Ifc6 > *)0 ), + (char *)(Ifc6 *)this - pBase ); + rCD.writeTypeOffset( ::getCppuType( (const ::com::sun::star::uno::Reference< Ifc7 > *)0 ), + (char *)(Ifc7 *)this - pBase ); + rCD.writeTypeOffset( ::getCppuType( (const ::com::sun::star::uno::Reference< Ifc8 > *)0 ), + (char *)(Ifc8 *)this - pBase ); + rCD.writeTypeOffset( ::getCppuType( (const ::com::sun::star::uno::Reference< Ifc9 > *)0 ), + (char *)(Ifc9 *)this - pBase ); + rCD.writeTypeOffset( ::getCppuType( (const ::com::sun::star::uno::Reference< Ifc10 > *)0 ), + (char *)(Ifc10 *)this - pBase ); + rCD.writeTypeOffset( ::getCppuType( (const ::com::sun::star::uno::Reference< Ifc11 > *)0 ), + (char *)(Ifc11 *)this - pBase ); + rCD.bOffsetsInit = sal_True; + } + } + return rCD; + } + }; + template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > + class ImplHelper11 + : public ImplHelperBase11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 > + { + static ClassData11 s_aCD; + public: + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw (::com::sun::star::uno::RuntimeException) + { return getClassData( s_aCD ).query( rType, (ImplHelperBase11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 > *)this ); } + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) + { return getClassData( s_aCD ).getTypes(); } + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) + { return getClassData( s_aCD ).getImplementationId(); } + }; + template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > + class WeakImplHelper11 + : public ::cppu::OWeakObject + , public ImplHelperBase11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 > + { + static ClassData11 s_aCD; + public: + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw (::com::sun::star::uno::RuntimeException) + { + ::com::sun::star::uno::Any aRet( getClassData( s_aCD ).query( rType, (ImplHelperBase11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 > *)this ) ); + return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType )); + } + virtual void SAL_CALL acquire() throw () + { OWeakObject::acquire(); } + virtual void SAL_CALL release() throw () + { OWeakObject::release(); } + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) + { return getClassData( s_aCD ).getTypes(); } + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) + { return getClassData( s_aCD ).getImplementationId(); } + }; + template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > + class WeakAggImplHelper11 + : public ::cppu::OWeakAggObject + , public ImplHelperBase11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 > + { + static ClassData11 s_aCD; + public: + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw (::com::sun::star::uno::RuntimeException) + { return OWeakAggObject::queryInterface( rType ); } + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw (::com::sun::star::uno::RuntimeException) + { + ::com::sun::star::uno::Any aRet( getClassData( s_aCD ).query( rType, (ImplHelperBase11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 > *)this ) ); + return (aRet.hasValue() ? aRet : OWeakAggObject::queryAggregation( rType )); + } + virtual void SAL_CALL acquire() throw () + { OWeakAggObject::acquire(); } + virtual void SAL_CALL release() throw () + { OWeakAggObject::release(); } + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) + { return getClassData( s_aCD ).getTypes(); } + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) + { return getClassData( s_aCD ).getImplementationId(); } + }; + +#ifndef MACOSX + template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > + ClassData11 ImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >::s_aCD = ClassData11( 0 ); + template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > + ClassData11 WeakImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >::s_aCD = ClassData11( 1 ); + template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > + ClassData11 WeakAggImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >::s_aCD = ClassData11( 2 ); +#endif + +} #endif |