impl helper macros expanded and checked in
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: compbase.hxx,v $
|
||||
*
|
||||
* $Revision: 1.3 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
* last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $
|
||||
* 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
|
||||
@@ -73,6 +73,7 @@
|
||||
|
||||
#include <com/sun/star/lang/XComponent.hpp>
|
||||
|
||||
/* MACROS EXPANDED AND CHECKED IN
|
||||
|
||||
//==================================================================================================
|
||||
#define __DEF_COMPIMPLHELPER_A( N ) \
|
||||
@@ -93,7 +94,7 @@ public: \
|
||||
WeakComponentImplHelper##N( ::osl::Mutex & rMutex ) SAL_THROW( () ) \
|
||||
: rBHelper( rMutex ) \
|
||||
{} \
|
||||
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) \
|
||||
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, (ImplHelperBase##N< __IFC##N > *)this ) ); \
|
||||
if (aRet.hasValue()) \
|
||||
@@ -105,9 +106,9 @@ public: \
|
||||
} \
|
||||
return OWeakObject::queryInterface( rType ); \
|
||||
} \
|
||||
virtual void SAL_CALL acquire() throw() \
|
||||
virtual void SAL_CALL acquire() throw () \
|
||||
{ OWeakObject::acquire(); } \
|
||||
virtual void SAL_CALL release() throw() \
|
||||
virtual void SAL_CALL release() throw () \
|
||||
{ \
|
||||
if (1 == m_refCount && !rBHelper.bDisposed) \
|
||||
{ \
|
||||
@@ -133,11 +134,11 @@ public: \
|
||||
rBHelper.bInDispose = sal_False; \
|
||||
} \
|
||||
} \
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw(::com::sun::star::uno::RuntimeException) \
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException) \
|
||||
{ \
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener ); \
|
||||
} \
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw(::com::sun::star::uno::RuntimeException) \
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException) \
|
||||
{ \
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener ); \
|
||||
} \
|
||||
@@ -157,9 +158,9 @@ public: \
|
||||
WeakAggComponentImplHelper##N( ::osl::Mutex & rMutex ) SAL_THROW( () ) \
|
||||
: rBHelper( rMutex ) \
|
||||
{} \
|
||||
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) \
|
||||
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) \
|
||||
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, (ImplHelperBase##N< __IFC##N > *)this ) ); \
|
||||
if (aRet.hasValue()) \
|
||||
@@ -171,9 +172,9 @@ public: \
|
||||
} \
|
||||
return OWeakAggObject::queryAggregation( rType ); \
|
||||
} \
|
||||
virtual void SAL_CALL acquire() throw() \
|
||||
virtual void SAL_CALL acquire() throw () \
|
||||
{ OWeakAggObject::acquire(); } \
|
||||
virtual void SAL_CALL release() throw() \
|
||||
virtual void SAL_CALL release() throw () \
|
||||
{ \
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > x( xDelegator ); \
|
||||
if (!x.is() && 1 == m_refCount && !rBHelper.bDisposed) \
|
||||
@@ -198,11 +199,11 @@ public: \
|
||||
rBHelper.bInDispose = sal_False; \
|
||||
} \
|
||||
} \
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw(::com::sun::star::uno::RuntimeException) \
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException) \
|
||||
{ \
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener ); \
|
||||
} \
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw(::com::sun::star::uno::RuntimeException) \
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException) \
|
||||
{ \
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener ); \
|
||||
} \
|
||||
@@ -225,11 +226,13 @@ ClassData##N WeakAggComponentImplHelper##N< __IFC##N >::s_aCD = ClassData##N( 3
|
||||
#define __DEF_COMPIMPLHELPER( N ) \
|
||||
__DEF_COMPIMPLHELPER_A( N ) \
|
||||
__DEF_COMPIMPLHELPER_C( N )
|
||||
#else /* MACOSX */
|
||||
#else
|
||||
#define __DEF_COMPIMPLHELPER( N ) \
|
||||
__DEF_COMPIMPLHELPER_A( N ) \
|
||||
__DEF_COMPIMPLHELPER_B( N ) \
|
||||
__DEF_COMPIMPLHELPER_C( N )
|
||||
#endif /* MACOSX */
|
||||
#endif
|
||||
|
||||
MACROS EXPANDED AND CHECKED IN */
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: compbase1.hxx,v $
|
||||
*
|
||||
* $Revision: 1.1.1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2000-09-18 15:26:08 $
|
||||
* 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
|
||||
@@ -68,6 +68,149 @@
|
||||
#include <cppuhelper/compbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
__DEF_COMPIMPLHELPER( 1 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
template< class Ifc1 >
|
||||
class WeakComponentImplHelper1
|
||||
: public ::cppu::OWeakObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase1< Ifc1 >
|
||||
{
|
||||
static ClassData1 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakComponentImplHelper1( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase1< Ifc1 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakObject::queryInterface( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
if (1 == m_refCount && !rBHelper.bDisposed)
|
||||
{
|
||||
dispose();
|
||||
}
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
template< class Ifc1 >
|
||||
class WeakAggComponentImplHelper1
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase1< Ifc1 >
|
||||
{
|
||||
static ClassData1 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakAggComponentImplHelper1( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase1< Ifc1 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakAggObject::queryAggregation( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakAggObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > x( xDelegator );
|
||||
if (!x.is() && 1 == m_refCount && !rBHelper.bDisposed)
|
||||
dispose();
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef MACOSX
|
||||
template< class Ifc1 >
|
||||
ClassData1 WeakComponentImplHelper1< Ifc1 >::s_aCD = ClassData1( 4 );
|
||||
template< class Ifc1 >
|
||||
ClassData1 WeakAggComponentImplHelper1< Ifc1 >::s_aCD = ClassData1( 3 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: compbase10.hxx,v $
|
||||
*
|
||||
* $Revision: 1.1.1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2000-09-18 15:26:08 $
|
||||
* 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
|
||||
@@ -68,6 +68,149 @@
|
||||
#include <cppuhelper/compbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
__DEF_COMPIMPLHELPER( 10 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 >
|
||||
class WeakComponentImplHelper10
|
||||
: public ::cppu::OWeakObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >
|
||||
{
|
||||
static ClassData10 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakComponentImplHelper10( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakObject::queryInterface( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
if (1 == m_refCount && !rBHelper.bDisposed)
|
||||
{
|
||||
dispose();
|
||||
}
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 >
|
||||
class WeakAggComponentImplHelper10
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >
|
||||
{
|
||||
static ClassData10 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakAggComponentImplHelper10( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakAggObject::queryAggregation( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakAggObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > x( xDelegator );
|
||||
if (!x.is() && 1 == m_refCount && !rBHelper.bDisposed)
|
||||
dispose();
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef MACOSX
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 >
|
||||
ClassData10 WeakComponentImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >::s_aCD = ClassData10( 4 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 >
|
||||
ClassData10 WeakAggComponentImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >::s_aCD = ClassData10( 3 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: compbase11.hxx,v $
|
||||
*
|
||||
* $Revision: 1.1.1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2000-09-18 15:26:08 $
|
||||
* 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
|
||||
@@ -68,6 +68,149 @@
|
||||
#include <cppuhelper/compbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
__DEF_COMPIMPLHELPER( 11 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 >
|
||||
class WeakComponentImplHelper11
|
||||
: public ::cppu::OWeakObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >
|
||||
{
|
||||
static ClassData11 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakComponentImplHelper11( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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 ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakObject::queryInterface( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
if (1 == m_refCount && !rBHelper.bDisposed)
|
||||
{
|
||||
dispose();
|
||||
}
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 >
|
||||
class WeakAggComponentImplHelper11
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >
|
||||
{
|
||||
static ClassData11 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakAggComponentImplHelper11( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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 ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakAggObject::queryAggregation( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakAggObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > x( xDelegator );
|
||||
if (!x.is() && 1 == m_refCount && !rBHelper.bDisposed)
|
||||
dispose();
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
|
||||
#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 WeakComponentImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >::s_aCD = ClassData11( 4 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 >
|
||||
ClassData11 WeakAggComponentImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >::s_aCD = ClassData11( 3 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: compbase12.hxx,v $
|
||||
*
|
||||
* $Revision: 1.1.1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2000-09-18 15:26:08 $
|
||||
* 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
|
||||
@@ -68,6 +68,149 @@
|
||||
#include <cppuhelper/compbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
__DEF_COMPIMPLHELPER( 12 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 >
|
||||
class WeakComponentImplHelper12
|
||||
: public ::cppu::OWeakObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >
|
||||
{
|
||||
static ClassData12 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakComponentImplHelper12( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakObject::queryInterface( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
if (1 == m_refCount && !rBHelper.bDisposed)
|
||||
{
|
||||
dispose();
|
||||
}
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 >
|
||||
class WeakAggComponentImplHelper12
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >
|
||||
{
|
||||
static ClassData12 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakAggComponentImplHelper12( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakAggObject::queryAggregation( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakAggObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > x( xDelegator );
|
||||
if (!x.is() && 1 == m_refCount && !rBHelper.bDisposed)
|
||||
dispose();
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
|
||||
#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, class Ifc12 >
|
||||
ClassData12 WeakComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >::s_aCD = ClassData12( 4 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 >
|
||||
ClassData12 WeakAggComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >::s_aCD = ClassData12( 3 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: compbase2.hxx,v $
|
||||
*
|
||||
* $Revision: 1.1.1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2000-09-18 15:26:08 $
|
||||
* 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
|
||||
@@ -68,6 +68,150 @@
|
||||
#include <cppuhelper/compbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
__DEF_COMPIMPLHELPER( 2 )
|
||||
*/
|
||||
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
template< class Ifc1, class Ifc2 >
|
||||
class WeakComponentImplHelper2
|
||||
: public ::cppu::OWeakObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase2< Ifc1, Ifc2 >
|
||||
{
|
||||
static ClassData2 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakComponentImplHelper2( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase2< Ifc1, Ifc2 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakObject::queryInterface( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
if (1 == m_refCount && !rBHelper.bDisposed)
|
||||
{
|
||||
dispose();
|
||||
}
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2 >
|
||||
class WeakAggComponentImplHelper2
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase2< Ifc1, Ifc2 >
|
||||
{
|
||||
static ClassData2 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakAggComponentImplHelper2( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase2< Ifc1, Ifc2 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakAggObject::queryAggregation( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakAggObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > x( xDelegator );
|
||||
if (!x.is() && 1 == m_refCount && !rBHelper.bDisposed)
|
||||
dispose();
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef MACOSX
|
||||
template< class Ifc1, class Ifc2 >
|
||||
ClassData2 WeakComponentImplHelper2< Ifc1, Ifc2 >::s_aCD = ClassData2( 4 );
|
||||
template< class Ifc1, class Ifc2 >
|
||||
ClassData2 WeakAggComponentImplHelper2< Ifc1, Ifc2 >::s_aCD = ClassData2( 3 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: compbase3.hxx,v $
|
||||
*
|
||||
* $Revision: 1.1.1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2000-09-18 15:26:08 $
|
||||
* 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
|
||||
@@ -68,6 +68,149 @@
|
||||
#include <cppuhelper/compbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
__DEF_COMPIMPLHELPER( 3 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
template< class Ifc1, class Ifc2, class Ifc3 >
|
||||
class WeakComponentImplHelper3
|
||||
: public ::cppu::OWeakObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase3< Ifc1, Ifc2, Ifc3 >
|
||||
{
|
||||
static ClassData3 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakComponentImplHelper3( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase3< Ifc1, Ifc2, Ifc3 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakObject::queryInterface( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
if (1 == m_refCount && !rBHelper.bDisposed)
|
||||
{
|
||||
dispose();
|
||||
}
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3 >
|
||||
class WeakAggComponentImplHelper3
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase3< Ifc1, Ifc2, Ifc3 >
|
||||
{
|
||||
static ClassData3 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakAggComponentImplHelper3( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase3< Ifc1, Ifc2, Ifc3 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakAggObject::queryAggregation( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakAggObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > x( xDelegator );
|
||||
if (!x.is() && 1 == m_refCount && !rBHelper.bDisposed)
|
||||
dispose();
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef MACOSX
|
||||
template< class Ifc1, class Ifc2, class Ifc3 >
|
||||
ClassData3 WeakComponentImplHelper3< Ifc1, Ifc2, Ifc3 >::s_aCD = ClassData3( 4 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3 >
|
||||
ClassData3 WeakAggComponentImplHelper3< Ifc1, Ifc2, Ifc3 >::s_aCD = ClassData3( 3 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: compbase4.hxx,v $
|
||||
*
|
||||
* $Revision: 1.1.1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2000-09-18 15:26:08 $
|
||||
* 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
|
||||
@@ -68,6 +68,149 @@
|
||||
#include <cppuhelper/compbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
__DEF_COMPIMPLHELPER( 4 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 >
|
||||
class WeakComponentImplHelper4
|
||||
: public ::cppu::OWeakObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase4< Ifc1, Ifc2, Ifc3, Ifc4 >
|
||||
{
|
||||
static ClassData4 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakComponentImplHelper4( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase4< Ifc1, Ifc2, Ifc3, Ifc4 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakObject::queryInterface( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
if (1 == m_refCount && !rBHelper.bDisposed)
|
||||
{
|
||||
dispose();
|
||||
}
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 >
|
||||
class WeakAggComponentImplHelper4
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase4< Ifc1, Ifc2, Ifc3, Ifc4 >
|
||||
{
|
||||
static ClassData4 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakAggComponentImplHelper4( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase4< Ifc1, Ifc2, Ifc3, Ifc4 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakAggObject::queryAggregation( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakAggObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > x( xDelegator );
|
||||
if (!x.is() && 1 == m_refCount && !rBHelper.bDisposed)
|
||||
dispose();
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef MACOSX
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 >
|
||||
ClassData4 WeakComponentImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >::s_aCD = ClassData4( 4 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 >
|
||||
ClassData4 WeakAggComponentImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >::s_aCD = ClassData4( 3 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: compbase5.hxx,v $
|
||||
*
|
||||
* $Revision: 1.1.1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2000-09-18 15:26:08 $
|
||||
* 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
|
||||
@@ -68,6 +68,149 @@
|
||||
#include <cppuhelper/compbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
__DEF_COMPIMPLHELPER( 5 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 >
|
||||
class WeakComponentImplHelper5
|
||||
: public ::cppu::OWeakObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >
|
||||
{
|
||||
static ClassData5 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakComponentImplHelper5( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakObject::queryInterface( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
if (1 == m_refCount && !rBHelper.bDisposed)
|
||||
{
|
||||
dispose();
|
||||
}
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 >
|
||||
class WeakAggComponentImplHelper5
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >
|
||||
{
|
||||
static ClassData5 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakAggComponentImplHelper5( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakAggObject::queryAggregation( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakAggObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > x( xDelegator );
|
||||
if (!x.is() && 1 == m_refCount && !rBHelper.bDisposed)
|
||||
dispose();
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef MACOSX
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 >
|
||||
ClassData5 WeakComponentImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >::s_aCD = ClassData5( 4 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 >
|
||||
ClassData5 WeakAggComponentImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >::s_aCD = ClassData5( 3 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: compbase6.hxx,v $
|
||||
*
|
||||
* $Revision: 1.1.1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2000-09-18 15:26:08 $
|
||||
* 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
|
||||
@@ -68,6 +68,149 @@
|
||||
#include <cppuhelper/compbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
__DEF_COMPIMPLHELPER( 6 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
|
||||
class WeakComponentImplHelper6
|
||||
: public ::cppu::OWeakObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >
|
||||
{
|
||||
static ClassData6 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakComponentImplHelper6( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakObject::queryInterface( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
if (1 == m_refCount && !rBHelper.bDisposed)
|
||||
{
|
||||
dispose();
|
||||
}
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
|
||||
class WeakAggComponentImplHelper6
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >
|
||||
{
|
||||
static ClassData6 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakAggComponentImplHelper6( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakAggObject::queryAggregation( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakAggObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > x( xDelegator );
|
||||
if (!x.is() && 1 == m_refCount && !rBHelper.bDisposed)
|
||||
dispose();
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef MACOSX
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
|
||||
ClassData6 WeakComponentImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >::s_aCD = ClassData6( 4 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
|
||||
ClassData6 WeakAggComponentImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >::s_aCD = ClassData6( 3 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: compbase7.hxx,v $
|
||||
*
|
||||
* $Revision: 1.1.1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2000-09-18 15:26:08 $
|
||||
* 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
|
||||
@@ -68,6 +68,149 @@
|
||||
#include <cppuhelper/compbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
__DEF_COMPIMPLHELPER( 7 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 >
|
||||
class WeakComponentImplHelper7
|
||||
: public ::cppu::OWeakObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >
|
||||
{
|
||||
static ClassData7 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakComponentImplHelper7( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakObject::queryInterface( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
if (1 == m_refCount && !rBHelper.bDisposed)
|
||||
{
|
||||
dispose();
|
||||
}
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 >
|
||||
class WeakAggComponentImplHelper7
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >
|
||||
{
|
||||
static ClassData7 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakAggComponentImplHelper7( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakAggObject::queryAggregation( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakAggObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > x( xDelegator );
|
||||
if (!x.is() && 1 == m_refCount && !rBHelper.bDisposed)
|
||||
dispose();
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef MACOSX
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 >
|
||||
ClassData7 WeakComponentImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >::s_aCD = ClassData7( 4 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 >
|
||||
ClassData7 WeakAggComponentImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >::s_aCD = ClassData7( 3 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: compbase8.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
|
||||
@@ -68,6 +68,149 @@
|
||||
#include <cppuhelper/compbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
__DEF_COMPIMPLHELPER( 8 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 >
|
||||
class WeakComponentImplHelper8
|
||||
: public ::cppu::OWeakObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >
|
||||
{
|
||||
static ClassData8 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakComponentImplHelper8( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakObject::queryInterface( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
if (1 == m_refCount && !rBHelper.bDisposed)
|
||||
{
|
||||
dispose();
|
||||
}
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 >
|
||||
class WeakAggComponentImplHelper8
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >
|
||||
{
|
||||
static ClassData8 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakAggComponentImplHelper8( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakAggObject::queryAggregation( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakAggObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > x( xDelegator );
|
||||
if (!x.is() && 1 == m_refCount && !rBHelper.bDisposed)
|
||||
dispose();
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef MACOSX
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 >
|
||||
ClassData8 WeakComponentImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >::s_aCD = ClassData8( 4 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 >
|
||||
ClassData8 WeakAggComponentImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >::s_aCD = ClassData8( 3 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: compbase9.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
|
||||
@@ -68,6 +68,149 @@
|
||||
#include <cppuhelper/compbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
__DEF_COMPIMPLHELPER( 9 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
|
||||
class WeakComponentImplHelper9
|
||||
: public ::cppu::OWeakObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >
|
||||
{
|
||||
static ClassData9 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakComponentImplHelper9( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakObject::queryInterface( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
if (1 == m_refCount && !rBHelper.bDisposed)
|
||||
{
|
||||
dispose();
|
||||
}
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
|
||||
class WeakAggComponentImplHelper9
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ::com::sun::star::lang::XComponent
|
||||
, public ImplHelperBase9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >
|
||||
{
|
||||
static ClassData9 s_aCD;
|
||||
protected:
|
||||
::cppu::OBroadcastHelper rBHelper;
|
||||
virtual void SAL_CALL disposing()
|
||||
{}
|
||||
public:
|
||||
WeakAggComponentImplHelper9( ::osl::Mutex & rMutex ) SAL_THROW( () )
|
||||
: rBHelper( rMutex )
|
||||
{}
|
||||
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, (ImplHelperBase9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 > *)this ) );
|
||||
if (aRet.hasValue())
|
||||
return aRet;
|
||||
if (rType == ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > *)0 ))
|
||||
{
|
||||
void * p = static_cast< ::com::sun::star::lang::XComponent * >( this );
|
||||
return ::com::sun::star::uno::Any( &p, rType );
|
||||
}
|
||||
return OWeakAggObject::queryAggregation( rType );
|
||||
}
|
||||
virtual void SAL_CALL acquire() throw ()
|
||||
{ OWeakAggObject::acquire(); }
|
||||
virtual void SAL_CALL release() throw ()
|
||||
{
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > x( xDelegator );
|
||||
if (!x.is() && 1 == m_refCount && !rBHelper.bDisposed)
|
||||
dispose();
|
||||
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(); }
|
||||
virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
::osl::ClearableMutexGuard aGuard( rBHelper.rMutex );
|
||||
if (!rBHelper.bDisposed && !rBHelper.bInDispose)
|
||||
{
|
||||
rBHelper.bInDispose = sal_True;
|
||||
aGuard.clear();
|
||||
::com::sun::star::lang::EventObject aEvt( static_cast< ::cppu::OWeakObject * >( this ) );
|
||||
rBHelper.aLC.disposeAndClear( aEvt );
|
||||
disposing();
|
||||
rBHelper.bDisposed = sal_True;
|
||||
rBHelper.bInDispose = sal_False;
|
||||
}
|
||||
}
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.addListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
rBHelper.removeListener( ::getCppuType( &xListener ), xListener );
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef MACOSX
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
|
||||
ClassData9 WeakComponentImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >::s_aCD = ClassData9( 4 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
|
||||
ClassData9 WeakAggComponentImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >::s_aCD = ClassData9( 3 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: implbase.hxx,v $
|
||||
*
|
||||
* $Revision: 1.3 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
* last change: $Author: dbo $ $Date: 2001-03-09 12:15:26 $
|
||||
* 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
|
||||
@@ -117,6 +117,8 @@ struct ClassData : public ClassDataBase
|
||||
::osl::Mutex & SAL_CALL getImplHelperInitMutex(void) SAL_THROW( () );
|
||||
}
|
||||
|
||||
/* MACROS EXPANDED AND CHECKED IN
|
||||
|
||||
//
|
||||
// settle down beavis, here comes the macro template hell :]
|
||||
//
|
||||
@@ -134,7 +136,8 @@ struct ClassData##N : public ClassDataBase \
|
||||
}; \
|
||||
template< __CLASS_IFC##N > \
|
||||
class ImplHelperBase##N \
|
||||
: public ::com::sun::star::lang::XTypeProvider, __PUBLIC_IFC##N \
|
||||
: public ::com::sun::star::lang::XTypeProvider \
|
||||
, __PUBLIC_IFC##N \
|
||||
{ \
|
||||
protected: \
|
||||
ClassData & SAL_CALL getClassData( ClassDataBase & s_aCD ) SAL_THROW( () ) \
|
||||
@@ -178,14 +181,14 @@ class WeakImplHelper##N \
|
||||
{ \
|
||||
static ClassData##N 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) \
|
||||
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, (ImplHelperBase##N< __IFC##N > *)this ) ); \
|
||||
return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType )); \
|
||||
} \
|
||||
virtual void SAL_CALL acquire() throw() \
|
||||
virtual void SAL_CALL acquire() throw () \
|
||||
{ OWeakObject::acquire(); } \
|
||||
virtual void SAL_CALL release() throw() \
|
||||
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(); } \
|
||||
@@ -199,16 +202,16 @@ class WeakAggImplHelper##N \
|
||||
{ \
|
||||
static ClassData##N 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) \
|
||||
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) \
|
||||
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, (ImplHelperBase##N< __IFC##N > *)this ) ); \
|
||||
return (aRet.hasValue() ? aRet : OWeakAggObject::queryAggregation( rType )); \
|
||||
} \
|
||||
virtual void SAL_CALL acquire() throw() \
|
||||
virtual void SAL_CALL acquire() throw () \
|
||||
{ OWeakAggObject::acquire(); } \
|
||||
virtual void SAL_CALL release() throw() \
|
||||
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(); } \
|
||||
@@ -235,11 +238,13 @@ ClassData##N WeakAggImplHelper##N< __IFC##N >::s_aCD = ClassData##N( 2 );
|
||||
#define __DEF_IMPLHELPER_POST( N ) \
|
||||
__DEF_IMPLHELPER_POST_A( N ) \
|
||||
__DEF_IMPLHELPER_POST_C( N )
|
||||
#else /* MACOSX */
|
||||
#else
|
||||
#define __DEF_IMPLHELPER_POST( N ) \
|
||||
__DEF_IMPLHELPER_POST_A( N ) \
|
||||
__DEF_IMPLHELPER_POST_B( N ) \
|
||||
__DEF_IMPLHELPER_POST_C( N )
|
||||
#endif /* MACOSX */
|
||||
#endif
|
||||
|
||||
MACROS EXPANDED AND CHECKED IN */
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: implbase1.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,11 +65,114 @@
|
||||
#include <cppuhelper/implbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
#define __IFC1 Ifc1
|
||||
#define __CLASS_IFC1 class Ifc1
|
||||
#define __PUBLIC_IFC1 public Ifc1
|
||||
__DEF_IMPLHELPER_PRE( 1 )
|
||||
__IFC_WRITEOFFSET( 1 )
|
||||
__DEF_IMPLHELPER_POST( 1 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
struct ClassData1 : public ClassDataBase
|
||||
{
|
||||
Type_Offset arType2Offset[ 1 ];
|
||||
ClassData1( sal_Int32 nClassCode ) SAL_THROW( () )
|
||||
: ClassDataBase( nClassCode )
|
||||
{}
|
||||
};
|
||||
template< class Ifc1 >
|
||||
class ImplHelperBase1
|
||||
: public ::com::sun::star::lang::XTypeProvider
|
||||
, public Ifc1
|
||||
{
|
||||
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.bOffsetsInit = sal_True;
|
||||
}
|
||||
}
|
||||
return rCD;
|
||||
}
|
||||
};
|
||||
template< class Ifc1 >
|
||||
class ImplHelper1
|
||||
: public ImplHelperBase1< Ifc1 >
|
||||
{
|
||||
static ClassData1 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, (ImplHelperBase1< Ifc1 > *)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 WeakImplHelper1
|
||||
: public ::cppu::OWeakObject
|
||||
, public ImplHelperBase1< Ifc1 >
|
||||
{
|
||||
static ClassData1 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, (ImplHelperBase1< Ifc1 > *)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 WeakAggImplHelper1
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ImplHelperBase1< Ifc1 >
|
||||
{
|
||||
static ClassData1 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, (ImplHelperBase1< Ifc1 > *)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 >
|
||||
ClassData1 ImplHelper1< Ifc1 >::s_aCD = ClassData1( 0 );
|
||||
template< class Ifc1 >
|
||||
ClassData1 WeakImplHelper1< Ifc1 >::s_aCD = ClassData1( 1 );
|
||||
template< class Ifc1 >
|
||||
ClassData1 WeakAggImplHelper1< Ifc1 >::s_aCD = ClassData1( 2 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: implbase10.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 __IFC10 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10
|
||||
#define __CLASS_IFC10 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10
|
||||
#define __PUBLIC_IFC10 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10
|
||||
@@ -73,5 +74,125 @@ __DEF_IMPLHELPER_PRE( 10 )
|
||||
__IFC_WRITEOFFSET( 5 ) __IFC_WRITEOFFSET( 6 ) __IFC_WRITEOFFSET( 7 ) __IFC_WRITEOFFSET( 8 )
|
||||
__IFC_WRITEOFFSET( 9 ) __IFC_WRITEOFFSET( 10 )
|
||||
__DEF_IMPLHELPER_POST( 10 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
struct ClassData10 : public ClassDataBase
|
||||
{
|
||||
Type_Offset arType2Offset[ 10 ];
|
||||
ClassData10( 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 ImplHelperBase10
|
||||
: 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
|
||||
{
|
||||
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.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 ImplHelper10
|
||||
: public ImplHelperBase10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >
|
||||
{
|
||||
static ClassData10 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, (ImplHelperBase10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 > *)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 WeakImplHelper10
|
||||
: public ::cppu::OWeakObject
|
||||
, public ImplHelperBase10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >
|
||||
{
|
||||
static ClassData10 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, (ImplHelperBase10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 > *)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 WeakAggImplHelper10
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ImplHelperBase10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >
|
||||
{
|
||||
static ClassData10 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, (ImplHelperBase10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 > *)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 >
|
||||
ClassData10 ImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >::s_aCD = ClassData10( 0 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 >
|
||||
ClassData10 WeakImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >::s_aCD = ClassData10( 1 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 >
|
||||
ClassData10 WeakAggImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >::s_aCD = ClassData10( 2 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -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
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: implbase12.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 __IFC12 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12
|
||||
#define __CLASS_IFC12 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12
|
||||
#define __PUBLIC_IFC12 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
|
||||
@@ -73,5 +74,129 @@ __DEF_IMPLHELPER_PRE( 12 )
|
||||
__IFC_WRITEOFFSET( 5 ) __IFC_WRITEOFFSET( 6 ) __IFC_WRITEOFFSET( 7 ) __IFC_WRITEOFFSET( 8 )
|
||||
__IFC_WRITEOFFSET( 9 ) __IFC_WRITEOFFSET( 10 ) __IFC_WRITEOFFSET( 11 ) __IFC_WRITEOFFSET( 12 )
|
||||
__DEF_IMPLHELPER_POST( 12 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
struct ClassData12 : public ClassDataBase
|
||||
{
|
||||
Type_Offset arType2Offset[ 12 ];
|
||||
ClassData12( 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 Ifc12 >
|
||||
class ImplHelperBase12
|
||||
: 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, public Ifc12
|
||||
{
|
||||
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.writeTypeOffset( ::getCppuType( (const ::com::sun::star::uno::Reference< Ifc12 > *)0 ),
|
||||
(char *)(Ifc12 *)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 Ifc12 >
|
||||
class ImplHelper12
|
||||
: public ImplHelperBase12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >
|
||||
{
|
||||
static ClassData12 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, (ImplHelperBase12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *)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 Ifc12 >
|
||||
class WeakImplHelper12
|
||||
: public ::cppu::OWeakObject
|
||||
, public ImplHelperBase12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >
|
||||
{
|
||||
static ClassData12 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, (ImplHelperBase12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *)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 Ifc12 >
|
||||
class WeakAggImplHelper12
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ImplHelperBase12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >
|
||||
{
|
||||
static ClassData12 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, (ImplHelperBase12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *)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, class Ifc12 >
|
||||
ClassData12 ImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >::s_aCD = ClassData12( 0 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 >
|
||||
ClassData12 WeakImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >::s_aCD = ClassData12( 1 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 >
|
||||
ClassData12 WeakAggImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >::s_aCD = ClassData12( 2 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: implbase2.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,11 +65,117 @@
|
||||
#include <cppuhelper/implbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
#define __IFC2 Ifc1, Ifc2
|
||||
#define __CLASS_IFC2 class Ifc1, class Ifc2
|
||||
#define __PUBLIC_IFC2 public Ifc1, public Ifc2
|
||||
__DEF_IMPLHELPER_PRE( 2 )
|
||||
__IFC_WRITEOFFSET( 1 ) __IFC_WRITEOFFSET( 2 )
|
||||
__DEF_IMPLHELPER_POST( 2 )
|
||||
*/
|
||||
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
struct ClassData2 : public ClassDataBase
|
||||
{
|
||||
Type_Offset arType2Offset[ 2 ];
|
||||
ClassData2( sal_Int32 nClassCode ) SAL_THROW( () )
|
||||
: ClassDataBase( nClassCode )
|
||||
{}
|
||||
};
|
||||
template< class Ifc1, class Ifc2 >
|
||||
class ImplHelperBase2
|
||||
: public ::com::sun::star::lang::XTypeProvider
|
||||
, public Ifc1, public Ifc2
|
||||
{
|
||||
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.bOffsetsInit = sal_True;
|
||||
}
|
||||
}
|
||||
return rCD;
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2 >
|
||||
class ImplHelper2
|
||||
: public ImplHelperBase2< Ifc1, Ifc2 >
|
||||
{
|
||||
static ClassData2 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, (ImplHelperBase2< Ifc1, Ifc2 > *)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 WeakImplHelper2
|
||||
: public ::cppu::OWeakObject
|
||||
, public ImplHelperBase2< Ifc1, Ifc2 >
|
||||
{
|
||||
static ClassData2 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, (ImplHelperBase2< Ifc1, Ifc2 > *)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 WeakAggImplHelper2
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ImplHelperBase2< Ifc1, Ifc2 >
|
||||
{
|
||||
static ClassData2 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, (ImplHelperBase2< Ifc1, Ifc2 > *)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 >
|
||||
ClassData2 ImplHelper2< Ifc1, Ifc2 >::s_aCD = ClassData2( 0 );
|
||||
template< class Ifc1, class Ifc2 >
|
||||
ClassData2 WeakImplHelper2< Ifc1, Ifc2 >::s_aCD = ClassData2( 1 );
|
||||
template< class Ifc1, class Ifc2 >
|
||||
ClassData2 WeakAggImplHelper2< Ifc1, Ifc2 >::s_aCD = ClassData2( 2 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: implbase3.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,11 +65,118 @@
|
||||
#include <cppuhelper/implbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
#define __IFC3 Ifc1, Ifc2, Ifc3
|
||||
#define __CLASS_IFC3 class Ifc1, class Ifc2, class Ifc3
|
||||
#define __PUBLIC_IFC3 public Ifc1, public Ifc2, public Ifc3
|
||||
__DEF_IMPLHELPER_PRE( 3 )
|
||||
__IFC_WRITEOFFSET( 1 ) __IFC_WRITEOFFSET( 2 ) __IFC_WRITEOFFSET( 3 )
|
||||
__DEF_IMPLHELPER_POST( 3 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
struct ClassData3 : public ClassDataBase
|
||||
{
|
||||
Type_Offset arType2Offset[ 3 ];
|
||||
ClassData3( sal_Int32 nClassCode ) SAL_THROW( () )
|
||||
: ClassDataBase( nClassCode )
|
||||
{}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3 >
|
||||
class ImplHelperBase3
|
||||
: public ::com::sun::star::lang::XTypeProvider
|
||||
, public Ifc1, public Ifc2, public Ifc3
|
||||
{
|
||||
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.bOffsetsInit = sal_True;
|
||||
}
|
||||
}
|
||||
return rCD;
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3 >
|
||||
class ImplHelper3
|
||||
: public ImplHelperBase3< Ifc1, Ifc2, Ifc3 >
|
||||
{
|
||||
static ClassData3 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, (ImplHelperBase3< Ifc1, Ifc2, Ifc3 > *)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 WeakImplHelper3
|
||||
: public ::cppu::OWeakObject
|
||||
, public ImplHelperBase3< Ifc1, Ifc2, Ifc3 >
|
||||
{
|
||||
static ClassData3 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, (ImplHelperBase3< Ifc1, Ifc2, Ifc3 > *)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 WeakAggImplHelper3
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ImplHelperBase3< Ifc1, Ifc2, Ifc3 >
|
||||
{
|
||||
static ClassData3 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, (ImplHelperBase3< Ifc1, Ifc2, Ifc3 > *)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 >
|
||||
ClassData3 ImplHelper3< Ifc1, Ifc2, Ifc3 >::s_aCD = ClassData3( 0 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3 >
|
||||
ClassData3 WeakImplHelper3< Ifc1, Ifc2, Ifc3 >::s_aCD = ClassData3( 1 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3 >
|
||||
ClassData3 WeakAggImplHelper3< Ifc1, Ifc2, Ifc3 >::s_aCD = ClassData3( 2 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: implbase4.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,11 +65,120 @@
|
||||
#include <cppuhelper/implbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
#define __IFC4 Ifc1, Ifc2, Ifc3, Ifc4
|
||||
#define __CLASS_IFC4 class Ifc1, class Ifc2, class Ifc3, class Ifc4
|
||||
#define __PUBLIC_IFC4 public Ifc1, public Ifc2, public Ifc3, public Ifc4
|
||||
__DEF_IMPLHELPER_PRE( 4 )
|
||||
__IFC_WRITEOFFSET( 1 ) __IFC_WRITEOFFSET( 2 ) __IFC_WRITEOFFSET( 3 ) __IFC_WRITEOFFSET( 4 )
|
||||
__DEF_IMPLHELPER_POST( 4 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
struct ClassData4 : public ClassDataBase
|
||||
{
|
||||
Type_Offset arType2Offset[ 4 ];
|
||||
ClassData4( sal_Int32 nClassCode ) SAL_THROW( () )
|
||||
: ClassDataBase( nClassCode )
|
||||
{}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 >
|
||||
class ImplHelperBase4
|
||||
: public ::com::sun::star::lang::XTypeProvider
|
||||
, public Ifc1, public Ifc2, public Ifc3, public Ifc4
|
||||
{
|
||||
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.bOffsetsInit = sal_True;
|
||||
}
|
||||
}
|
||||
return rCD;
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 >
|
||||
class ImplHelper4
|
||||
: public ImplHelperBase4< Ifc1, Ifc2, Ifc3, Ifc4 >
|
||||
{
|
||||
static ClassData4 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, (ImplHelperBase4< Ifc1, Ifc2, Ifc3, Ifc4 > *)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 WeakImplHelper4
|
||||
: public ::cppu::OWeakObject
|
||||
, public ImplHelperBase4< Ifc1, Ifc2, Ifc3, Ifc4 >
|
||||
{
|
||||
static ClassData4 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, (ImplHelperBase4< Ifc1, Ifc2, Ifc3, Ifc4 > *)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 WeakAggImplHelper4
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ImplHelperBase4< Ifc1, Ifc2, Ifc3, Ifc4 >
|
||||
{
|
||||
static ClassData4 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, (ImplHelperBase4< Ifc1, Ifc2, Ifc3, Ifc4 > *)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 >
|
||||
ClassData4 ImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >::s_aCD = ClassData4( 0 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 >
|
||||
ClassData4 WeakImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >::s_aCD = ClassData4( 1 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 >
|
||||
ClassData4 WeakAggImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >::s_aCD = ClassData4( 2 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: implbase5.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 __IFC5 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5
|
||||
#define __CLASS_IFC5 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5
|
||||
#define __PUBLIC_IFC5 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5
|
||||
@@ -72,5 +73,115 @@ __DEF_IMPLHELPER_PRE( 5 )
|
||||
__IFC_WRITEOFFSET( 1 ) __IFC_WRITEOFFSET( 2 ) __IFC_WRITEOFFSET( 3 ) __IFC_WRITEOFFSET( 4 )
|
||||
__IFC_WRITEOFFSET( 5 )
|
||||
__DEF_IMPLHELPER_POST( 5 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
struct ClassData5 : public ClassDataBase
|
||||
{
|
||||
Type_Offset arType2Offset[ 5 ];
|
||||
ClassData5( sal_Int32 nClassCode ) SAL_THROW( () )
|
||||
: ClassDataBase( nClassCode )
|
||||
{}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 >
|
||||
class ImplHelperBase5
|
||||
: public ::com::sun::star::lang::XTypeProvider
|
||||
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5
|
||||
{
|
||||
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.bOffsetsInit = sal_True;
|
||||
}
|
||||
}
|
||||
return rCD;
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 >
|
||||
class ImplHelper5
|
||||
: public ImplHelperBase5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >
|
||||
{
|
||||
static ClassData5 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, (ImplHelperBase5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *)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 WeakImplHelper5
|
||||
: public ::cppu::OWeakObject
|
||||
, public ImplHelperBase5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >
|
||||
{
|
||||
static ClassData5 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, (ImplHelperBase5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *)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 WeakAggImplHelper5
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ImplHelperBase5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >
|
||||
{
|
||||
static ClassData5 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, (ImplHelperBase5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *)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 >
|
||||
ClassData5 ImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >::s_aCD = ClassData5( 0 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 >
|
||||
ClassData5 WeakImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >::s_aCD = ClassData5( 1 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 >
|
||||
ClassData5 WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >::s_aCD = ClassData5( 2 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: implbase6.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 __IFC6 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6
|
||||
#define __CLASS_IFC6 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6
|
||||
#define __PUBLIC_IFC6 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
|
||||
@@ -72,5 +73,117 @@ __DEF_IMPLHELPER_PRE( 6 )
|
||||
__IFC_WRITEOFFSET( 1 ) __IFC_WRITEOFFSET( 2 ) __IFC_WRITEOFFSET( 3 ) __IFC_WRITEOFFSET( 4 )
|
||||
__IFC_WRITEOFFSET( 5 ) __IFC_WRITEOFFSET( 6 )
|
||||
__DEF_IMPLHELPER_POST( 6 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
struct ClassData6 : public ClassDataBase
|
||||
{
|
||||
Type_Offset arType2Offset[ 6 ];
|
||||
ClassData6( sal_Int32 nClassCode ) SAL_THROW( () )
|
||||
: ClassDataBase( nClassCode )
|
||||
{}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
|
||||
class ImplHelperBase6
|
||||
: public ::com::sun::star::lang::XTypeProvider
|
||||
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
|
||||
{
|
||||
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.bOffsetsInit = sal_True;
|
||||
}
|
||||
}
|
||||
return rCD;
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
|
||||
class ImplHelper6
|
||||
: public ImplHelperBase6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >
|
||||
{
|
||||
static ClassData6 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, (ImplHelperBase6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *)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 WeakImplHelper6
|
||||
: public ::cppu::OWeakObject
|
||||
, public ImplHelperBase6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >
|
||||
{
|
||||
static ClassData6 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, (ImplHelperBase6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *)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 WeakAggImplHelper6
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ImplHelperBase6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >
|
||||
{
|
||||
static ClassData6 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, (ImplHelperBase6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *)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 >
|
||||
ClassData6 ImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >::s_aCD = ClassData6( 0 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
|
||||
ClassData6 WeakImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >::s_aCD = ClassData6( 1 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
|
||||
ClassData6 WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >::s_aCD = ClassData6( 2 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: implbase7.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 __IFC7 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7
|
||||
#define __CLASS_IFC7 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7
|
||||
#define __PUBLIC_IFC7 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7
|
||||
@@ -72,5 +73,119 @@ __DEF_IMPLHELPER_PRE( 7 )
|
||||
__IFC_WRITEOFFSET( 1 ) __IFC_WRITEOFFSET( 2 ) __IFC_WRITEOFFSET( 3 ) __IFC_WRITEOFFSET( 4 )
|
||||
__IFC_WRITEOFFSET( 5 ) __IFC_WRITEOFFSET( 6 ) __IFC_WRITEOFFSET( 7 )
|
||||
__DEF_IMPLHELPER_POST( 7 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
struct ClassData7 : public ClassDataBase
|
||||
{
|
||||
Type_Offset arType2Offset[ 7 ];
|
||||
ClassData7( sal_Int32 nClassCode ) SAL_THROW( () )
|
||||
: ClassDataBase( nClassCode )
|
||||
{}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 >
|
||||
class ImplHelperBase7
|
||||
: public ::com::sun::star::lang::XTypeProvider
|
||||
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7
|
||||
{
|
||||
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.bOffsetsInit = sal_True;
|
||||
}
|
||||
}
|
||||
return rCD;
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 >
|
||||
class ImplHelper7
|
||||
: public ImplHelperBase7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >
|
||||
{
|
||||
static ClassData7 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, (ImplHelperBase7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *)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 WeakImplHelper7
|
||||
: public ::cppu::OWeakObject
|
||||
, public ImplHelperBase7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >
|
||||
{
|
||||
static ClassData7 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, (ImplHelperBase7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *)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 WeakAggImplHelper7
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ImplHelperBase7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >
|
||||
{
|
||||
static ClassData7 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, (ImplHelperBase7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *)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 >
|
||||
ClassData7 ImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >::s_aCD = ClassData7( 0 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 >
|
||||
ClassData7 WeakImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >::s_aCD = ClassData7( 1 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 >
|
||||
ClassData7 WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >::s_aCD = ClassData7( 2 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: implbase8.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 __IFC8 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8
|
||||
#define __CLASS_IFC8 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8
|
||||
#define __PUBLIC_IFC8 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8
|
||||
@@ -72,5 +73,121 @@ __DEF_IMPLHELPER_PRE( 8 )
|
||||
__IFC_WRITEOFFSET( 1 ) __IFC_WRITEOFFSET( 2 ) __IFC_WRITEOFFSET( 3 ) __IFC_WRITEOFFSET( 4 )
|
||||
__IFC_WRITEOFFSET( 5 ) __IFC_WRITEOFFSET( 6 ) __IFC_WRITEOFFSET( 7 ) __IFC_WRITEOFFSET( 8 )
|
||||
__DEF_IMPLHELPER_POST( 8 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
struct ClassData8 : public ClassDataBase
|
||||
{
|
||||
Type_Offset arType2Offset[ 8 ];
|
||||
ClassData8( 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 ImplHelperBase8
|
||||
: public ::com::sun::star::lang::XTypeProvider
|
||||
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8
|
||||
{
|
||||
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.bOffsetsInit = sal_True;
|
||||
}
|
||||
}
|
||||
return rCD;
|
||||
}
|
||||
};
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 >
|
||||
class ImplHelper8
|
||||
: public ImplHelperBase8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >
|
||||
{
|
||||
static ClassData8 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, (ImplHelperBase8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 > *)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 WeakImplHelper8
|
||||
: public ::cppu::OWeakObject
|
||||
, public ImplHelperBase8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >
|
||||
{
|
||||
static ClassData8 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, (ImplHelperBase8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 > *)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 WeakAggImplHelper8
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ImplHelperBase8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >
|
||||
{
|
||||
static ClassData8 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, (ImplHelperBase8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 > *)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 >
|
||||
ClassData8 ImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >::s_aCD = ClassData8( 0 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 >
|
||||
ClassData8 WeakImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >::s_aCD = ClassData8( 1 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 >
|
||||
ClassData8 WeakAggImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >::s_aCD = ClassData8( 2 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: implbase9.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
|
||||
@@ -66,6 +66,7 @@
|
||||
#include <cppuhelper/implbase.hxx>
|
||||
#endif
|
||||
|
||||
/*
|
||||
#define __IFC9 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9
|
||||
#define __CLASS_IFC9 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9
|
||||
#define __PUBLIC_IFC9 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
|
||||
@@ -74,5 +75,123 @@ __DEF_IMPLHELPER_PRE( 9 )
|
||||
__IFC_WRITEOFFSET( 5 ) __IFC_WRITEOFFSET( 6 ) __IFC_WRITEOFFSET( 7 ) __IFC_WRITEOFFSET( 8 )
|
||||
__IFC_WRITEOFFSET( 9 )
|
||||
__DEF_IMPLHELPER_POST( 9 )
|
||||
*/
|
||||
|
||||
namespace cppu
|
||||
{
|
||||
struct ClassData9 : public ClassDataBase
|
||||
{
|
||||
Type_Offset arType2Offset[ 9 ];
|
||||
ClassData9( 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 ImplHelperBase9
|
||||
: public ::com::sun::star::lang::XTypeProvider
|
||||
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
|
||||
{
|
||||
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.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 ImplHelper9
|
||||
: public ImplHelperBase9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >
|
||||
{
|
||||
static ClassData9 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, (ImplHelperBase9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 > *)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 WeakImplHelper9
|
||||
: public ::cppu::OWeakObject
|
||||
, public ImplHelperBase9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >
|
||||
{
|
||||
static ClassData9 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, (ImplHelperBase9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 > *)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 WeakAggImplHelper9
|
||||
: public ::cppu::OWeakAggObject
|
||||
, public ImplHelperBase9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >
|
||||
{
|
||||
static ClassData9 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, (ImplHelperBase9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 > *)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 >
|
||||
ClassData9 ImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >::s_aCD = ClassData9( 0 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
|
||||
ClassData9 WeakImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >::s_aCD = ClassData9( 1 );
|
||||
template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
|
||||
ClassData9 WeakAggImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >::s_aCD = ClassData9( 2 );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user