summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorHans-Joachim Lankenau <hjs@openoffice.org>2004-06-25 16:33:14 +0000
committerHans-Joachim Lankenau <hjs@openoffice.org>2004-06-25 16:33:14 +0000
commit69817be1940b70504d12427b2eca6562e374d957 (patch)
tree73237e25e0021d4bb3c99e83a4ab52c9ebccc907 /cppuhelper
parent2b382a8c0d1cfdfad611f05921ebfdf5a9e185cb (diff)
INTEGRATION: CWS tune04 (1.9.28); FILE MERGED
2004/06/15 08:53:06 cmc 1.9.28.1: #i29636# turn global objects into local static data protected with swishy double-locked templated template
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/inc/cppuhelper/compbase12.hxx40
-rw-r--r--cppuhelper/inc/cppuhelper/compbase2.hxx42
-rw-r--r--cppuhelper/inc/cppuhelper/compbase3.hxx44
-rw-r--r--cppuhelper/inc/cppuhelper/compbase4.hxx46
4 files changed, 40 insertions, 132 deletions
diff --git a/cppuhelper/inc/cppuhelper/compbase12.hxx b/cppuhelper/inc/cppuhelper/compbase12.hxx
index 5d6ab6eb9c0c..fe454b691f49 100644
--- a/cppuhelper/inc/cppuhelper/compbase12.hxx
+++ b/cppuhelper/inc/cppuhelper/compbase12.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: compbase12.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: hr $ $Date: 2004-02-02 23:08:23 $
+ * last change: $Author: hjs $ $Date: 2004-06-25 17:32:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -93,31 +93,21 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
{
/** @internal */
- static class_data12 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, WeakComponentImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {};
public:
inline WeakComponentImplHelper12( ::osl::Mutex & rMutex ) throw ()
: WeakComponentImplHelperBase( rMutex )
{}
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return WeakComponentImplHelper_query( rType, (class_data *)&s_cd, this, (WeakComponentImplHelperBase *)this ); }
+ { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); }
virtual void SAL_CALL acquire() throw ()
{ WeakComponentImplHelperBase::acquire(); }
virtual void SAL_CALL release() throw ()
{ WeakComponentImplHelperBase::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return WeakComponentImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakComponentImplHelper_getTypes( cd::get() ); }
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_getImplementationId( (class_data *)&s_cd ); }
- };
- 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_data12 WeakComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >::s_cd =
- {
- 12 +1, sal_False, sal_False,
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- {
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc1 > const * ))&getCppuType, ((sal_Int32)(Ifc1 *) (WeakComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (WeakComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (WeakComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (WeakComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (WeakComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc6 > const * ))&getCppuType, ((sal_Int32)(Ifc6 *) (WeakComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc7 > const * ))&getCppuType, ((sal_Int32)(Ifc7 *) (WeakComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc8 > const * ))&getCppuType, ((sal_Int32)(Ifc8 *) (WeakComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc9 > const * ))&getCppuType, ((sal_Int32)(Ifc9 *) (WeakComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc10 > const * ))&getCppuType, ((sal_Int32)(Ifc10 *) (WeakComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc11 > const * ))&getCppuType, ((sal_Int32)(Ifc11 *) (WeakComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc12 > const * ))&getCppuType, ((sal_Int32)(Ifc12 *) (WeakComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider > const * ))&getCppuType, ((sal_Int32)(::com::sun::star::lang::XTypeProvider *) (WeakComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and
::com::sun::star::lang::XComponent. Upon disposing objects of this class, sub-classes
@@ -139,7 +129,7 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
{
/** @internal */
- static class_data12 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, WeakAggComponentImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {};
public:
inline WeakAggComponentImplHelper12( ::osl::Mutex & rMutex ) throw ()
: WeakAggComponentImplHelperBase( rMutex )
@@ -147,25 +137,15 @@ namespace cppu
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{ return WeakAggComponentImplHelperBase::queryInterface( rType ); }
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return WeakAggComponentImplHelper_queryAgg( rType, (class_data *)&s_cd, this, (WeakAggComponentImplHelperBase *)this ); }
+ { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); }
virtual void SAL_CALL acquire() throw ()
{ WeakAggComponentImplHelperBase::acquire(); }
virtual void SAL_CALL release() throw ()
{ WeakAggComponentImplHelperBase::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return WeakAggComponentImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakAggComponentImplHelper_getTypes( cd::get() ); }
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_getImplementationId( (class_data *)&s_cd ); }
- };
- 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_data12 WeakAggComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >::s_cd =
- {
- 12 +1, sal_False, sal_False,
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- {
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc1 > const * ))&getCppuType, ((sal_Int32)(Ifc1 *) (WeakAggComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (WeakAggComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (WeakAggComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (WeakAggComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (WeakAggComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc6 > const * ))&getCppuType, ((sal_Int32)(Ifc6 *) (WeakAggComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc7 > const * ))&getCppuType, ((sal_Int32)(Ifc7 *) (WeakAggComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc8 > const * ))&getCppuType, ((sal_Int32)(Ifc8 *) (WeakAggComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc9 > const * ))&getCppuType, ((sal_Int32)(Ifc9 *) (WeakAggComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc10 > const * ))&getCppuType, ((sal_Int32)(Ifc10 *) (WeakAggComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc11 > const * ))&getCppuType, ((sal_Int32)(Ifc11 *) (WeakAggComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc12 > const * ))&getCppuType, ((sal_Int32)(Ifc12 *) (WeakAggComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider > const * ))&getCppuType, ((sal_Int32)(::com::sun::star::lang::XTypeProvider *) (WeakAggComponentImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
}
diff --git a/cppuhelper/inc/cppuhelper/compbase2.hxx b/cppuhelper/inc/cppuhelper/compbase2.hxx
index 62ded28c5c0d..0bb079098ba1 100644
--- a/cppuhelper/inc/cppuhelper/compbase2.hxx
+++ b/cppuhelper/inc/cppuhelper/compbase2.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: compbase2.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: hr $ $Date: 2004-02-02 23:08:39 $
+ * last change: $Author: hjs $ $Date: 2004-06-25 17:32:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -93,32 +93,21 @@ namespace cppu
, public Ifc1, public Ifc2
{
/** @internal */
- static class_data2 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, WeakComponentImplHelper2<Ifc1, Ifc2> > > {};
public:
inline WeakComponentImplHelper2( ::osl::Mutex & rMutex ) throw ()
: WeakComponentImplHelperBase( rMutex )
{}
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return WeakComponentImplHelper_query( rType, (class_data *)&s_cd, this, (WeakComponentImplHelperBase *)this ); }
+ { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); }
virtual void SAL_CALL acquire() throw ()
{ WeakComponentImplHelperBase::acquire(); }
virtual void SAL_CALL release() throw ()
{ WeakComponentImplHelperBase::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return WeakComponentImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakComponentImplHelper_getTypes( cd::get() ); }
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_getImplementationId( (class_data *)&s_cd ); }
- };
- template< class Ifc1, class Ifc2 >
- class_data2 WeakComponentImplHelper2< Ifc1, Ifc2 >::s_cd =
- {
- 2 +1, sal_False, sal_False,
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- {
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc1 > const * ))&getCppuType, ((sal_Int32)(Ifc1 *) (WeakComponentImplHelper2< Ifc1, Ifc2 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (WeakComponentImplHelper2< Ifc1, Ifc2 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider > const * ))&getCppuType, ((sal_Int32)(::com::sun::star::lang::XTypeProvider *) (WeakComponentImplHelper2< Ifc1, Ifc2 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and
::com::sun::star::lang::XComponent. Upon disposing objects of this class, sub-classes
@@ -140,7 +129,7 @@ namespace cppu
, public Ifc1, public Ifc2
{
/** @internal */
- static class_data2 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, WeakAggComponentImplHelper2<Ifc1, Ifc2> > > {};
public:
inline WeakAggComponentImplHelper2( ::osl::Mutex & rMutex ) throw ()
: WeakAggComponentImplHelperBase( rMutex )
@@ -148,26 +137,15 @@ namespace cppu
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{ return WeakAggComponentImplHelperBase::queryInterface( rType ); }
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return WeakAggComponentImplHelper_queryAgg( rType, (class_data *)&s_cd, this, (WeakAggComponentImplHelperBase *)this ); }
+ { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); }
virtual void SAL_CALL acquire() throw ()
{ WeakAggComponentImplHelperBase::acquire(); }
virtual void SAL_CALL release() throw ()
{ WeakAggComponentImplHelperBase::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return WeakAggComponentImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakAggComponentImplHelper_getTypes( cd::get() ); }
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_getImplementationId( (class_data *)&s_cd ); }
- };
- template< class Ifc1, class Ifc2 >
- class_data2 WeakAggComponentImplHelper2< Ifc1, Ifc2 >::s_cd =
- {
- 2 +1, sal_False, sal_False,
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- {
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc1 > const * ))&getCppuType, ((sal_Int32)(Ifc1 *) (WeakAggComponentImplHelper2< Ifc1, Ifc2 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (WeakAggComponentImplHelper2< Ifc1, Ifc2 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider > const * ))&getCppuType, ((sal_Int32)(::com::sun::star::lang::XTypeProvider *) (WeakAggComponentImplHelper2< Ifc1, Ifc2 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
}
diff --git a/cppuhelper/inc/cppuhelper/compbase3.hxx b/cppuhelper/inc/cppuhelper/compbase3.hxx
index 40267fd0aff0..c73be14fe843 100644
--- a/cppuhelper/inc/cppuhelper/compbase3.hxx
+++ b/cppuhelper/inc/cppuhelper/compbase3.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: compbase3.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: hr $ $Date: 2004-02-02 23:08:55 $
+ * last change: $Author: hjs $ $Date: 2004-06-25 17:33:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -93,33 +93,21 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3
{
/** @internal */
- static class_data3 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, WeakComponentImplHelper3<Ifc1, Ifc2, Ifc3> > > {};
public:
inline WeakComponentImplHelper3( ::osl::Mutex & rMutex ) throw ()
: WeakComponentImplHelperBase( rMutex )
{}
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return WeakComponentImplHelper_query( rType, (class_data *)&s_cd, this, (WeakComponentImplHelperBase *)this ); }
+ { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); }
virtual void SAL_CALL acquire() throw ()
{ WeakComponentImplHelperBase::acquire(); }
virtual void SAL_CALL release() throw ()
{ WeakComponentImplHelperBase::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return WeakComponentImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakComponentImplHelper_getTypes( cd::get() ); }
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_getImplementationId( (class_data *)&s_cd ); }
- };
- template< class Ifc1, class Ifc2, class Ifc3 >
- class_data3 WeakComponentImplHelper3< Ifc1, Ifc2, Ifc3 >::s_cd =
- {
- 3 +1, sal_False, sal_False,
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- {
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc1 > const * ))&getCppuType, ((sal_Int32)(Ifc1 *) (WeakComponentImplHelper3< Ifc1, Ifc2, Ifc3 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (WeakComponentImplHelper3< Ifc1, Ifc2, Ifc3 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (WeakComponentImplHelper3< Ifc1, Ifc2, Ifc3 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider > const * ))&getCppuType, ((sal_Int32)(::com::sun::star::lang::XTypeProvider *) (WeakComponentImplHelper3< Ifc1, Ifc2, Ifc3 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and
::com::sun::star::lang::XComponent. Upon disposing objects of this class, sub-classes
@@ -141,7 +129,7 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3
{
/** @internal */
- static class_data3 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, WeakAggComponentImplHelper3<Ifc1, Ifc2, Ifc3> > > {};
public:
inline WeakAggComponentImplHelper3( ::osl::Mutex & rMutex ) throw ()
: WeakAggComponentImplHelperBase( rMutex )
@@ -149,27 +137,15 @@ namespace cppu
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{ return WeakAggComponentImplHelperBase::queryInterface( rType ); }
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return WeakAggComponentImplHelper_queryAgg( rType, (class_data *)&s_cd, this, (WeakAggComponentImplHelperBase *)this ); }
+ { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); }
virtual void SAL_CALL acquire() throw ()
{ WeakAggComponentImplHelperBase::acquire(); }
virtual void SAL_CALL release() throw ()
{ WeakAggComponentImplHelperBase::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return WeakAggComponentImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakAggComponentImplHelper_getTypes( cd::get() ); }
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_getImplementationId( (class_data *)&s_cd ); }
- };
- template< class Ifc1, class Ifc2, class Ifc3 >
- class_data3 WeakAggComponentImplHelper3< Ifc1, Ifc2, Ifc3 >::s_cd =
- {
- 3 +1, sal_False, sal_False,
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- {
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc1 > const * ))&getCppuType, ((sal_Int32)(Ifc1 *) (WeakAggComponentImplHelper3< Ifc1, Ifc2, Ifc3 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (WeakAggComponentImplHelper3< Ifc1, Ifc2, Ifc3 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (WeakAggComponentImplHelper3< Ifc1, Ifc2, Ifc3 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider > const * ))&getCppuType, ((sal_Int32)(::com::sun::star::lang::XTypeProvider *) (WeakAggComponentImplHelper3< Ifc1, Ifc2, Ifc3 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
}
diff --git a/cppuhelper/inc/cppuhelper/compbase4.hxx b/cppuhelper/inc/cppuhelper/compbase4.hxx
index a47ab56f7b3e..8ca064c6e72b 100644
--- a/cppuhelper/inc/cppuhelper/compbase4.hxx
+++ b/cppuhelper/inc/cppuhelper/compbase4.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: compbase4.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: hr $ $Date: 2004-02-02 23:09:15 $
+ * last change: $Author: hjs $ $Date: 2004-06-25 17:33:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -93,34 +93,21 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4
{
/** @internal */
- static class_data4 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData4 < Ifc1, Ifc2, Ifc3, Ifc4, WeakComponentImplHelper4<Ifc1, Ifc2, Ifc3, Ifc4> > > {};
public:
inline WeakComponentImplHelper4( ::osl::Mutex & rMutex ) throw ()
: WeakComponentImplHelperBase( rMutex )
{}
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return WeakComponentImplHelper_query( rType, (class_data *)&s_cd, this, (WeakComponentImplHelperBase *)this ); }
+ { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); }
virtual void SAL_CALL acquire() throw ()
{ WeakComponentImplHelperBase::acquire(); }
virtual void SAL_CALL release() throw ()
{ WeakComponentImplHelperBase::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return WeakComponentImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakComponentImplHelper_getTypes( cd::get() ); }
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_getImplementationId( (class_data *)&s_cd ); }
- };
- template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 >
- class_data4 WeakComponentImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >::s_cd =
- {
- 4 +1, sal_False, sal_False,
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- {
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc1 > const * ))&getCppuType, ((sal_Int32)(Ifc1 *) (WeakComponentImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (WeakComponentImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (WeakComponentImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (WeakComponentImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider > const * ))&getCppuType, ((sal_Int32)(::com::sun::star::lang::XTypeProvider *) (WeakComponentImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and
::com::sun::star::lang::XComponent. Upon disposing objects of this class, sub-classes
@@ -142,7 +129,7 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4
{
/** @internal */
- static class_data4 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData4 < Ifc1, Ifc2, Ifc3, Ifc4, WeakAggComponentImplHelper4<Ifc1, Ifc2, Ifc3, Ifc4> > > {};
public:
inline WeakAggComponentImplHelper4( ::osl::Mutex & rMutex ) throw ()
: WeakAggComponentImplHelperBase( rMutex )
@@ -150,28 +137,15 @@ namespace cppu
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{ return WeakAggComponentImplHelperBase::queryInterface( rType ); }
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return WeakAggComponentImplHelper_queryAgg( rType, (class_data *)&s_cd, this, (WeakAggComponentImplHelperBase *)this ); }
+ { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); }
virtual void SAL_CALL acquire() throw ()
{ WeakAggComponentImplHelperBase::acquire(); }
virtual void SAL_CALL release() throw ()
{ WeakAggComponentImplHelperBase::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return WeakAggComponentImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakAggComponentImplHelper_getTypes( cd::get() ); }
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_getImplementationId( (class_data *)&s_cd ); }
- };
- template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 >
- class_data4 WeakAggComponentImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >::s_cd =
- {
- 4 +1, sal_False, sal_False,
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- {
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc1 > const * ))&getCppuType, ((sal_Int32)(Ifc1 *) (WeakAggComponentImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (WeakAggComponentImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (WeakAggComponentImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (WeakAggComponentImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider > const * ))&getCppuType, ((sal_Int32)(::com::sun::star::lang::XTypeProvider *) (WeakAggComponentImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
}