summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorHans-Joachim Lankenau <hjs@openoffice.org>2004-06-25 16:36:32 +0000
committerHans-Joachim Lankenau <hjs@openoffice.org>2004-06-25 16:36:32 +0000
commit22760d8f32b9171e4afcd44b65039102f710ef05 (patch)
treedf3add8539397a8af676f0364880978820133122 /cppuhelper
parent6e2896d5e1d60e947d48f7deadf3a95753fb8cc2 (diff)
INTEGRATION: CWS tune04 (1.9.28); FILE MERGED
2004/06/15 08:53:09 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/implbase2.hxx129
-rw-r--r--cppuhelper/inc/cppuhelper/implbase3.hxx136
-rw-r--r--cppuhelper/inc/cppuhelper/implbase4.hxx143
-rw-r--r--cppuhelper/inc/cppuhelper/implbase5.hxx150
-rw-r--r--cppuhelper/inc/cppuhelper/implbase6.hxx156
-rw-r--r--cppuhelper/inc/cppuhelper/implbase7.hxx128
6 files changed, 284 insertions, 558 deletions
diff --git a/cppuhelper/inc/cppuhelper/implbase2.hxx b/cppuhelper/inc/cppuhelper/implbase2.hxx
index 39ae5f7fbdc6..027df73fd762 100644
--- a/cppuhelper/inc/cppuhelper/implbase2.hxx
+++ b/cppuhelper/inc/cppuhelper/implbase2.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: implbase2.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: hr $ $Date: 2004-02-02 23:12:15 $
+ * last change: $Author: hjs $ $Date: 2004-06-25 17:35:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,13 +64,9 @@
#ifndef _CPPUHELPER_IMPLBASE_EX_HXX_
#include <cppuhelper/implbase_ex.hxx>
#endif
-/*
-#include <cppuhelper/implbase_ex_pre.hxx>
-#define __IFC_EX_TYPE_INIT2( class_cast ) \
- __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 )
-#include <cppuhelper/implbase_ex_post.hxx>
-__DEF_IMPLHELPER_EX( 2 )
-*/
+#ifndef INCLUDED_RTL_INSTANCE_HXX
+#include <rtl/instance.hxx>
+#endif
namespace cppu
{
@@ -83,6 +79,26 @@ namespace cppu
sal_Int8 m_id[ 16 ];
type_entry m_typeEntries[ 2 + 1 ];
};
+
+ /** @internal */
+ template< typename Ifc1, typename Ifc2, typename Impl > struct ImplClassData2
+ {
+ class_data* operator ()()
+ {
+ static class_data2 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 *) (Impl *) 16) - 16 },
+ { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (Impl *) 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 *) (Impl *) 16) - 16 }
+ }
+ };
+ return reinterpret_cast< class_data * >(&s_cd);
+ }
+ };
+
/** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider
and queryInterface(), but no reference counting.
@@ -97,25 +113,14 @@ namespace cppu
, public Ifc1, public Ifc2
{
/** @internal */
- static class_data2 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, ImplHelper2<Ifc1, Ifc2> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_query( rType, (class_data *)&s_cd, this ); }
+ { return ImplHelper_query( rType, cd::get(), this ); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return ImplHelper_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 ImplHelper2< 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 *) (ImplHelper2< 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 *) (ImplHelper2< 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 *) (ImplHelper2< Ifc1, Ifc2 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly
@@ -132,29 +137,18 @@ namespace cppu
, public Ifc1, public Ifc2
{
/** @internal */
- static class_data2 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, WeakImplHelper2<Ifc1, Ifc2> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return WeakImplHelper_query( rType, (class_data *)&s_cd, this, (OWeakObject *)this ); }
+ { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
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 WeakImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakImplHelper_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 WeakImplHelper2< 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 *) (WeakImplHelper2< 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 *) (WeakImplHelper2< 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 *) (WeakImplHelper2< Ifc1, Ifc2 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly
@@ -176,31 +170,20 @@ namespace cppu
, public Ifc1, public Ifc2
{
/** @internal */
- static class_data2 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, WeakAggImplHelper2<Ifc1, Ifc2> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{ return OWeakAggObject::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 WeakAggImplHelper_queryAgg( rType, (class_data *)&s_cd, this, (OWeakAggObject *)this ); }
+ { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
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 WeakAggImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakAggImplHelper_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 WeakAggImplHelper2< 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 *) (WeakAggImplHelper2< 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 *) (WeakAggImplHelper2< 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 *) (WeakAggImplHelper2< Ifc1, Ifc2 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface inherting from a BaseClass.
@@ -223,11 +206,11 @@ namespace cppu
, public Ifc1, public Ifc2
{
/** @internal */
- static class_data2 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, ImplInheritanceHelper2<BaseClass, Ifc1, Ifc2> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{
- ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, (class_data *)&s_cd, this ) );
+ ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
if (aRet.hasValue())
return aRet;
return BaseClass::queryInterface( rType );
@@ -237,20 +220,9 @@ namespace cppu
virtual void SAL_CALL release() throw ()
{ BaseClass::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplInhHelper_getTypes( (class_data *)&s_cd, BaseClass::getTypes() ); }
+ { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
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 BaseClass, class Ifc1, class Ifc2 >
- class_data2 ImplInheritanceHelper2< BaseClass, 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 *) (ImplInheritanceHelper2< BaseClass, 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 *) (ImplInheritanceHelper2< BaseClass, 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 *) (ImplInheritanceHelper2< BaseClass, Ifc1, Ifc2 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface inherting from a BaseClass.
@@ -273,13 +245,13 @@ namespace cppu
, public Ifc1, public Ifc2
{
/** @internal */
- static class_data2 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, AggImplInheritanceHelper2<BaseClass, Ifc1, Ifc2> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{ return BaseClass::queryInterface( rType ); }
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{
- ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, (class_data *)&s_cd, this ) );
+ ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
if (aRet.hasValue())
return aRet;
return BaseClass::queryAggregation( rType );
@@ -289,20 +261,9 @@ namespace cppu
virtual void SAL_CALL release() throw ()
{ BaseClass::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplInhHelper_getTypes( (class_data *)&s_cd, BaseClass::getTypes() ); }
+ { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
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 BaseClass, class Ifc1, class Ifc2 >
- class_data2 AggImplInheritanceHelper2< BaseClass, 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 *) (AggImplInheritanceHelper2< BaseClass, 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 *) (AggImplInheritanceHelper2< BaseClass, 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 *) (AggImplInheritanceHelper2< BaseClass, Ifc1, Ifc2 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
}
diff --git a/cppuhelper/inc/cppuhelper/implbase3.hxx b/cppuhelper/inc/cppuhelper/implbase3.hxx
index 96578da79dcf..2429db5051cd 100644
--- a/cppuhelper/inc/cppuhelper/implbase3.hxx
+++ b/cppuhelper/inc/cppuhelper/implbase3.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: implbase3.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: hr $ $Date: 2004-02-02 23:12:32 $
+ * last change: $Author: hjs $ $Date: 2004-06-25 17:35:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,14 +64,9 @@
#ifndef _CPPUHELPER_IMPLBASE_EX_HXX_
#include <cppuhelper/implbase_ex.hxx>
#endif
-/*
-#include <cppuhelper/implbase_ex_pre.hxx>
-#define __IFC_EX_TYPE_INIT3( class_cast ) \
- __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \
- __IFC_EX_TYPE_INIT( class_cast, 3 )
-#include <cppuhelper/implbase_ex_post.hxx>
-__DEF_IMPLHELPER_EX( 3 )
-*/
+#ifndef INCLUDED_RTL_INSTANCE_HXX
+#include <rtl/instance.hxx>
+#endif
namespace cppu
{
@@ -84,6 +79,27 @@ namespace cppu
sal_Int8 m_id[ 16 ];
type_entry m_typeEntries[ 3 + 1 ];
};
+
+ /** @internal */
+ template< typename Ifc1, typename Ifc2, typename Ifc3, typename Impl > struct ImplClassData3
+ {
+ class_data* operator ()()
+ {
+ static class_data3 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 *) (Impl *) 16) - 16 },
+ { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (Impl *) 16) - 16 },
+ { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (Impl *) 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 *) (Impl *) 16) - 16 }
+ }
+ };
+ return reinterpret_cast< class_data * >(&s_cd);
+ }
+ };
+
/** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider
and method XInterface::queryInterface(), but no reference counting.
@@ -98,26 +114,14 @@ 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, ImplHelper3<Ifc1, Ifc2, Ifc3> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_query( rType, (class_data *)&s_cd, this ); }
+ { return ImplHelper_query( rType, cd::get(), this ); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return ImplHelper_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 ImplHelper3< 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 *) (ImplHelper3< 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 *) (ImplHelper3< 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 *) (ImplHelper3< 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 *) (ImplHelper3< Ifc1, Ifc2, Ifc3 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly
@@ -134,30 +138,18 @@ 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, WeakImplHelper3<Ifc1, Ifc2, Ifc3> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return WeakImplHelper_query( rType, (class_data *)&s_cd, this, (OWeakObject *)this ); }
+ { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
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 WeakImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakImplHelper_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 WeakImplHelper3< 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 *) (WeakImplHelper3< 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 *) (WeakImplHelper3< 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 *) (WeakImplHelper3< 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 *) (WeakImplHelper3< Ifc1, Ifc2, Ifc3 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly
@@ -179,32 +171,20 @@ 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, WeakAggImplHelper3<Ifc1, Ifc2, Ifc3> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{ return OWeakAggObject::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 WeakAggImplHelper_queryAgg( rType, (class_data *)&s_cd, this, (OWeakAggObject *)this ); }
+ { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
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 WeakAggImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakAggImplHelper_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 WeakAggImplHelper3< 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 *) (WeakAggImplHelper3< 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 *) (WeakAggImplHelper3< 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 *) (WeakAggImplHelper3< 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 *) (WeakAggImplHelper3< Ifc1, Ifc2, Ifc3 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface inherting from a BaseClass.
@@ -227,11 +207,11 @@ 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, ImplInheritanceHelper3<BaseClass, Ifc1, Ifc2, Ifc3> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{
- ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, (class_data *)&s_cd, this ) );
+ ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
if (aRet.hasValue())
return aRet;
return BaseClass::queryInterface( rType );
@@ -241,21 +221,9 @@ namespace cppu
virtual void SAL_CALL release() throw ()
{ BaseClass::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplInhHelper_getTypes( (class_data *)&s_cd, BaseClass::getTypes() ); }
+ { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
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 BaseClass, class Ifc1, class Ifc2, class Ifc3 >
- class_data3 ImplInheritanceHelper3< BaseClass, 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 *) (ImplInheritanceHelper3< BaseClass, 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 *) (ImplInheritanceHelper3< BaseClass, 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 *) (ImplInheritanceHelper3< BaseClass, 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 *) (ImplInheritanceHelper3< BaseClass, Ifc1, Ifc2, Ifc3 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface inherting from a BaseClass.
@@ -278,13 +246,13 @@ 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, AggImplInheritanceHelper3<BaseClass, Ifc1, Ifc2, Ifc3> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{ return BaseClass::queryInterface( rType ); }
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{
- ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, (class_data *)&s_cd, this ) );
+ ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
if (aRet.hasValue())
return aRet;
return BaseClass::queryAggregation( rType );
@@ -294,21 +262,9 @@ namespace cppu
virtual void SAL_CALL release() throw ()
{ BaseClass::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplInhHelper_getTypes( (class_data *)&s_cd, BaseClass::getTypes() ); }
+ { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
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 BaseClass, class Ifc1, class Ifc2, class Ifc3 >
- class_data3 AggImplInheritanceHelper3< BaseClass, 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 *) (AggImplInheritanceHelper3< BaseClass, 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 *) (AggImplInheritanceHelper3< BaseClass, 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 *) (AggImplInheritanceHelper3< BaseClass, 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 *) (AggImplInheritanceHelper3< BaseClass, Ifc1, Ifc2, Ifc3 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
}
diff --git a/cppuhelper/inc/cppuhelper/implbase4.hxx b/cppuhelper/inc/cppuhelper/implbase4.hxx
index 59351d922bda..6d013630dfa5 100644
--- a/cppuhelper/inc/cppuhelper/implbase4.hxx
+++ b/cppuhelper/inc/cppuhelper/implbase4.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: implbase4.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: hr $ $Date: 2004-02-02 23:12:48 $
+ * last change: $Author: hjs $ $Date: 2004-06-25 17:35:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,14 +64,9 @@
#ifndef _CPPUHELPER_IMPLBASE_EX_HXX_
#include <cppuhelper/implbase_ex.hxx>
#endif
-/*
-#include <cppuhelper/implbase_ex_pre.hxx>
-#define __IFC_EX_TYPE_INIT4( class_cast ) \
- __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \
- __IFC_EX_TYPE_INIT( class_cast, 3 ), __IFC_EX_TYPE_INIT( class_cast, 4 )
-#include <cppuhelper/implbase_ex_post.hxx>
-__DEF_IMPLHELPER_EX( 4 )
-*/
+#ifndef INCLUDED_RTL_INSTANCE_HXX
+#include <rtl/instance.hxx>
+#endif
namespace cppu
{
@@ -84,6 +79,29 @@ namespace cppu
sal_Int8 m_id[ 16 ];
type_entry m_typeEntries[ 4 + 1 ];
};
+
+ /** @internal */
+ template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Impl >
+ struct ImplClassData4
+ {
+ class_data* operator ()()
+ {
+ static class_data4 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 *) (Impl *) 16) - 16 },
+ { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (Impl *) 16) - 16 },
+ { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (Impl *) 16) - 16 },
+ { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (Impl *) 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 *) (Impl *) 16) - 16 }
+ }
+ };
+ return reinterpret_cast< class_data * >(&s_cd);
+ }
+ };
+
/** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider
and method XInterface::queryInterface(), but no reference counting.
@@ -98,27 +116,14 @@ 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, ImplHelper4<Ifc1, Ifc2, Ifc3, Ifc4> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_query( rType, (class_data *)&s_cd, this ); }
+ { return ImplHelper_query( rType, cd::get(), this ); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return ImplHelper_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 ImplHelper4< 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 *) (ImplHelper4< 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 *) (ImplHelper4< 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 *) (ImplHelper4< 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 *) (ImplHelper4< 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 *) (ImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly
@@ -135,31 +140,18 @@ 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, WeakImplHelper4<Ifc1, Ifc2, Ifc3, Ifc4> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return WeakImplHelper_query( rType, (class_data *)&s_cd, this, (OWeakObject *)this ); }
+ { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
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 WeakImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakImplHelper_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 WeakImplHelper4< 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 *) (WeakImplHelper4< 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 *) (WeakImplHelper4< 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 *) (WeakImplHelper4< 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 *) (WeakImplHelper4< 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 *) (WeakImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly
@@ -181,33 +173,20 @@ 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, WeakAggImplHelper4<Ifc1, Ifc2, Ifc3, Ifc4> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{ return OWeakAggObject::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 WeakAggImplHelper_queryAgg( rType, (class_data *)&s_cd, this, (OWeakAggObject *)this ); }
+ { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
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 WeakAggImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakAggImplHelper_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 WeakAggImplHelper4< 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 *) (WeakAggImplHelper4< 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 *) (WeakAggImplHelper4< 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 *) (WeakAggImplHelper4< 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 *) (WeakAggImplHelper4< 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 *) (WeakAggImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface inherting from a BaseClass.
@@ -230,11 +209,11 @@ 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, ImplInheritanceHelper4<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{
- ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, (class_data *)&s_cd, this ) );
+ ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
if (aRet.hasValue())
return aRet;
return BaseClass::queryInterface( rType );
@@ -244,22 +223,9 @@ namespace cppu
virtual void SAL_CALL release() throw ()
{ BaseClass::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplInhHelper_getTypes( (class_data *)&s_cd, BaseClass::getTypes() ); }
+ { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
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 BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4 >
- class_data4 ImplInheritanceHelper4< BaseClass, 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 *) (ImplInheritanceHelper4< BaseClass, 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 *) (ImplInheritanceHelper4< BaseClass, 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 *) (ImplInheritanceHelper4< BaseClass, 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 *) (ImplInheritanceHelper4< BaseClass, 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 *) (ImplInheritanceHelper4< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface inherting from a BaseClass.
@@ -282,13 +248,13 @@ 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, AggImplInheritanceHelper4<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{ return BaseClass::queryInterface( rType ); }
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{
- ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, (class_data *)&s_cd, this ) );
+ ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
if (aRet.hasValue())
return aRet;
return BaseClass::queryAggregation( rType );
@@ -298,22 +264,9 @@ namespace cppu
virtual void SAL_CALL release() throw ()
{ BaseClass::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplInhHelper_getTypes( (class_data *)&s_cd, BaseClass::getTypes() ); }
+ { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
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 BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4 >
- class_data4 AggImplInheritanceHelper4< BaseClass, 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 *) (AggImplInheritanceHelper4< BaseClass, 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 *) (AggImplInheritanceHelper4< BaseClass, 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 *) (AggImplInheritanceHelper4< BaseClass, 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 *) (AggImplInheritanceHelper4< BaseClass, 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 *) (AggImplInheritanceHelper4< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
}
diff --git a/cppuhelper/inc/cppuhelper/implbase5.hxx b/cppuhelper/inc/cppuhelper/implbase5.hxx
index 87b3dacc825e..15796e7b3fd8 100644
--- a/cppuhelper/inc/cppuhelper/implbase5.hxx
+++ b/cppuhelper/inc/cppuhelper/implbase5.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: implbase5.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: hr $ $Date: 2004-02-02 23:13:03 $
+ * last change: $Author: hjs $ $Date: 2004-06-25 17:36:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,15 +64,9 @@
#ifndef _CPPUHELPER_IMPLBASE_EX_HXX_
#include <cppuhelper/implbase_ex.hxx>
#endif
-/*
-#include <cppuhelper/implbase_ex_pre.hxx>
-#define __IFC_EX_TYPE_INIT5( class_cast ) \
- __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \
- __IFC_EX_TYPE_INIT( class_cast, 3 ), __IFC_EX_TYPE_INIT( class_cast, 4 ), \
- __IFC_EX_TYPE_INIT( class_cast, 5 )
-#include <cppuhelper/implbase_ex_post.hxx>
-__DEF_IMPLHELPER_EX( 5 )
-*/
+#ifndef INCLUDED_RTL_INSTANCE_HXX
+#include <rtl/instance.hxx>
+#endif
namespace cppu
{
@@ -85,6 +79,30 @@ namespace cppu
sal_Int8 m_id[ 16 ];
type_entry m_typeEntries[ 5 + 1 ];
};
+
+ /** @internal */
+ template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Impl >
+ struct ImplClassData5
+ {
+ class_data* operator ()()
+ {
+ static class_data5 s_cd =
+ {
+ 5 +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 *) (Impl *) 16) - 16 },
+ { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (Impl *) 16) - 16 },
+ { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (Impl *) 16) - 16 },
+ { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (Impl *) 16) - 16 },
+ { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (Impl *) 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 *) (Impl *) 16) - 16 }
+ }
+ };
+ return reinterpret_cast< class_data * >(&s_cd);
+ }
+ };
+
/** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider
and method XInterface::queryInterface(), but no reference counting.
@@ -99,28 +117,14 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5
{
/** @internal */
- static class_data5 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, ImplHelper5<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_query( rType, (class_data *)&s_cd, this ); }
+ { return ImplHelper_query( rType, cd::get(), this ); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return ImplHelper_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_data5 ImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >::s_cd =
- {
- 5 +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 *) (ImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (ImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (ImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (ImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (ImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 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 *) (ImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly
@@ -137,32 +141,18 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5
{
/** @internal */
- static class_data5 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, WeakImplHelper5<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return WeakImplHelper_query( rType, (class_data *)&s_cd, this, (OWeakObject *)this ); }
+ { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
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 WeakImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakImplHelper_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_data5 WeakImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >::s_cd =
- {
- 5 +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 *) (WeakImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (WeakImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (WeakImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (WeakImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (WeakImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 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 *) (WeakImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly
@@ -184,34 +174,20 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5
{
/** @internal */
- static class_data5 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, WeakAggImplHelper5<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{ return OWeakAggObject::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 WeakAggImplHelper_queryAgg( rType, (class_data *)&s_cd, this, (OWeakAggObject *)this ); }
+ { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
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 WeakAggImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakAggImplHelper_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_data5 WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >::s_cd =
- {
- 5 +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 *) (WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 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 *) (WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface inherting from a BaseClass.
@@ -234,11 +210,11 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5
{
/** @internal */
- static class_data5 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, ImplInheritanceHelper5<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{
- ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, (class_data *)&s_cd, this ) );
+ ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
if (aRet.hasValue())
return aRet;
return BaseClass::queryInterface( rType );
@@ -248,23 +224,9 @@ namespace cppu
virtual void SAL_CALL release() throw ()
{ BaseClass::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplInhHelper_getTypes( (class_data *)&s_cd, BaseClass::getTypes() ); }
+ { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
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 BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 >
- class_data5 ImplInheritanceHelper5< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >::s_cd =
- {
- 5 +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 *) (ImplInheritanceHelper5< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (ImplInheritanceHelper5< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (ImplInheritanceHelper5< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (ImplInheritanceHelper5< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (ImplInheritanceHelper5< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 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 *) (ImplInheritanceHelper5< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface inherting from a BaseClass.
@@ -287,13 +249,13 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5
{
/** @internal */
- static class_data5 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, AggImplInheritanceHelper5<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{ return BaseClass::queryInterface( rType ); }
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{
- ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, (class_data *)&s_cd, this ) );
+ ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
if (aRet.hasValue())
return aRet;
return BaseClass::queryAggregation( rType );
@@ -303,23 +265,9 @@ namespace cppu
virtual void SAL_CALL release() throw ()
{ BaseClass::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplInhHelper_getTypes( (class_data *)&s_cd, BaseClass::getTypes() ); }
+ { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
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 BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 >
- class_data5 AggImplInheritanceHelper5< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >::s_cd =
- {
- 5 +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 *) (AggImplInheritanceHelper5< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (AggImplInheritanceHelper5< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (AggImplInheritanceHelper5< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (AggImplInheritanceHelper5< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (AggImplInheritanceHelper5< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 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 *) (AggImplInheritanceHelper5< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
}
diff --git a/cppuhelper/inc/cppuhelper/implbase6.hxx b/cppuhelper/inc/cppuhelper/implbase6.hxx
index 572f17990555..b360a5231ce6 100644
--- a/cppuhelper/inc/cppuhelper/implbase6.hxx
+++ b/cppuhelper/inc/cppuhelper/implbase6.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: implbase6.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: hr $ $Date: 2004-02-02 23:13:20 $
+ * last change: $Author: hjs $ $Date: 2004-06-25 17:36:20 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,15 +64,9 @@
#ifndef _CPPUHELPER_IMPLBASE_EX_HXX_
#include <cppuhelper/implbase_ex.hxx>
#endif
-/*
-#include <cppuhelper/implbase_ex_pre.hxx>
-#define __IFC_EX_TYPE_INIT6( class_cast ) \
- __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \
- __IFC_EX_TYPE_INIT( class_cast, 3 ), __IFC_EX_TYPE_INIT( class_cast, 4 ), \
- __IFC_EX_TYPE_INIT( class_cast, 5 ), __IFC_EX_TYPE_INIT( class_cast, 6 )
-#include <cppuhelper/implbase_ex_post.hxx>
-__DEF_IMPLHELPER_EX( 6 )
-*/
+#ifndef INCLUDED_RTL_INSTANCE_HXX
+#include <rtl/instance.hxx>
+#endif
namespace cppu
{
@@ -85,6 +79,31 @@ namespace cppu
sal_Int8 m_id[ 16 ];
type_entry m_typeEntries[ 6 + 1 ];
};
+
+ /** @internal */
+ template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Impl >
+ struct ImplClassData6
+ {
+ class_data* operator ()()
+ {
+ static class_data6 s_cd =
+ {
+ 6 +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 *) (Impl *) 16) - 16 },
+ { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (Impl *) 16) - 16 },
+ { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (Impl *) 16) - 16 },
+ { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (Impl *) 16) - 16 },
+ { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (Impl *) 16) - 16 },
+ { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc6 > const * ))&getCppuType, ((sal_Int32)(Ifc6 *) (Impl *) 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 *) (Impl *) 16) - 16 }
+ }
+ };
+ return reinterpret_cast< class_data * >(&s_cd);
+ }
+ };
+
/** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider
and method XInterface::queryInterface(), but no reference counting.
@@ -99,29 +118,14 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
{
/** @internal */
- static class_data6 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, ImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_query( rType, (class_data *)&s_cd, this ); }
+ { return ImplHelper_query( rType, cd::get(), this ); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return ImplHelper_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_data6 ImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >::s_cd =
- {
- 6 +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 *) (ImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (ImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (ImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (ImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (ImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc6 > const * ))&getCppuType, ((sal_Int32)(Ifc6 *) (ImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 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 *) (ImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly
@@ -138,33 +142,18 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
{
/** @internal */
- static class_data6 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, WeakImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return WeakImplHelper_query( rType, (class_data *)&s_cd, this, (OWeakObject *)this ); }
+ { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
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 WeakImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakImplHelper_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_data6 WeakImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >::s_cd =
- {
- 6 +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 *) (WeakImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (WeakImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (WeakImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (WeakImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (WeakImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc6 > const * ))&getCppuType, ((sal_Int32)(Ifc6 *) (WeakImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 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 *) (WeakImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly
@@ -186,35 +175,20 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
{
/** @internal */
- static class_data6 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, WeakAggImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{ return OWeakAggObject::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 WeakAggImplHelper_queryAgg( rType, (class_data *)&s_cd, this, (OWeakAggObject *)this ); }
+ { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
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 WeakAggImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakAggImplHelper_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_data6 WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >::s_cd =
- {
- 6 +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 *) (WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc6 > const * ))&getCppuType, ((sal_Int32)(Ifc6 *) (WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 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 *) (WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface inherting from a BaseClass.
@@ -237,11 +211,11 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
{
/** @internal */
- static class_data6 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, ImplInheritanceHelper6<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{
- ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, (class_data *)&s_cd, this ) );
+ ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
if (aRet.hasValue())
return aRet;
return BaseClass::queryInterface( rType );
@@ -251,24 +225,9 @@ namespace cppu
virtual void SAL_CALL release() throw ()
{ BaseClass::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplInhHelper_getTypes( (class_data *)&s_cd, BaseClass::getTypes() ); }
+ { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
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 BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
- class_data6 ImplInheritanceHelper6< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >::s_cd =
- {
- 6 +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 *) (ImplInheritanceHelper6< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (ImplInheritanceHelper6< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (ImplInheritanceHelper6< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (ImplInheritanceHelper6< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (ImplInheritanceHelper6< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc6 > const * ))&getCppuType, ((sal_Int32)(Ifc6 *) (ImplInheritanceHelper6< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 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 *) (ImplInheritanceHelper6< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface inherting from a BaseClass.
@@ -291,13 +250,13 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
{
/** @internal */
- static class_data6 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, AggImplInheritanceHelper6<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{ return BaseClass::queryInterface( rType ); }
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{
- ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, (class_data *)&s_cd, this ) );
+ ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
if (aRet.hasValue())
return aRet;
return BaseClass::queryAggregation( rType );
@@ -307,24 +266,9 @@ namespace cppu
virtual void SAL_CALL release() throw ()
{ BaseClass::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplInhHelper_getTypes( (class_data *)&s_cd, BaseClass::getTypes() ); }
+ { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
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 BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
- class_data6 AggImplInheritanceHelper6< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >::s_cd =
- {
- 6 +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 *) (AggImplInheritanceHelper6< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (AggImplInheritanceHelper6< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (AggImplInheritanceHelper6< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (AggImplInheritanceHelper6< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (AggImplInheritanceHelper6< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 },
- { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc6 > const * ))&getCppuType, ((sal_Int32)(Ifc6 *) (AggImplInheritanceHelper6< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 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 *) (AggImplInheritanceHelper6< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
}
diff --git a/cppuhelper/inc/cppuhelper/implbase7.hxx b/cppuhelper/inc/cppuhelper/implbase7.hxx
index a28056682368..86c9a17db851 100644
--- a/cppuhelper/inc/cppuhelper/implbase7.hxx
+++ b/cppuhelper/inc/cppuhelper/implbase7.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: implbase7.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: hr $ $Date: 2004-02-02 23:13:35 $
+ * last change: $Author: hjs $ $Date: 2004-06-25 17:36:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -64,16 +64,9 @@
#ifndef _CPPUHELPER_IMPLBASE_EX_HXX_
#include <cppuhelper/implbase_ex.hxx>
#endif
-/*
-#include <cppuhelper/implbase_ex_pre.hxx>
-#define __IFC_EX_TYPE_INIT7( class_cast ) \
- __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \
- __IFC_EX_TYPE_INIT( class_cast, 3 ), __IFC_EX_TYPE_INIT( class_cast, 4 ), \
- __IFC_EX_TYPE_INIT( class_cast, 5 ), __IFC_EX_TYPE_INIT( class_cast, 6 ), \
- __IFC_EX_TYPE_INIT( class_cast, 7 )
-#include <cppuhelper/implbase_ex_post.hxx>
-__DEF_IMPLHELPER_EX( 7 )
-*/
+#ifndef INCLUDED_RTL_INSTANCE_HXX
+#include <rtl/instance.hxx>
+#endif
namespace cppu
{
@@ -86,6 +79,27 @@ namespace cppu
sal_Int8 m_id[ 16 ];
type_entry m_typeEntries[ 7 + 1 ];
};
+
+ /** @internal */
+ template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Ifc7, typename Impl >
+ struct ImplClassData7
+ {
+ class_data* operator ()()
+ {
+ static class_data7 s_cd =
+ {
+ 7 +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 *) (Impl *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (Impl *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (Impl *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (Impl *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (Impl *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc6 > const * ))&getCppuType, ((sal_Int32)(Ifc6 *) (Impl *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc7 > const * ))&getCppuType, ((sal_Int32)(Ifc7 *) (Impl *) 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 *) (Impl *) 16) - 16 }
+ }
+ };
+ return reinterpret_cast< class_data * >(&s_cd);
+ }
+ };
+
+
/** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider
and method XInterface::queryInterface(), but no reference counting.
@@ -100,24 +114,14 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7
{
/** @internal */
- static class_data7 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, ImplHelper7<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_query( rType, (class_data *)&s_cd, this ); }
+ { return ImplHelper_query( rType, cd::get(), this ); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return ImplHelper_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_data7 ImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >::s_cd =
- {
- 7 +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 *) (ImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (ImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (ImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (ImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (ImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc6 > const * ))&getCppuType, ((sal_Int32)(Ifc6 *) (ImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc7 > const * ))&getCppuType, ((sal_Int32)(Ifc7 *) (ImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 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 *) (ImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly
@@ -134,28 +138,18 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7
{
/** @internal */
- static class_data7 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, WeakImplHelper7<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
- { return WeakImplHelper_query( rType, (class_data *)&s_cd, this, (OWeakObject *)this ); }
+ { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
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 WeakImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakImplHelper_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_data7 WeakImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >::s_cd =
- {
- 7 +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 *) (WeakImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (WeakImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (WeakImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (WeakImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (WeakImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc6 > const * ))&getCppuType, ((sal_Int32)(Ifc6 *) (WeakImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc7 > const * ))&getCppuType, ((sal_Int32)(Ifc7 *) (WeakImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 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 *) (WeakImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly
@@ -177,30 +171,20 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7
{
/** @internal */
- static class_data7 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, WeakAggImplHelper7<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{ return OWeakAggObject::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 WeakAggImplHelper_queryAgg( rType, (class_data *)&s_cd, this, (OWeakAggObject *)this ); }
+ { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
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 WeakAggImplHelper_getTypes( (class_data *)&s_cd ); }
+ { return WeakAggImplHelper_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_data7 WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >::s_cd =
- {
- 7 +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 *) (WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc6 > const * ))&getCppuType, ((sal_Int32)(Ifc6 *) (WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc7 > const * ))&getCppuType, ((sal_Int32)(Ifc7 *) (WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 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 *) (WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface inherting from a BaseClass.
@@ -223,11 +207,11 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7
{
/** @internal */
- static class_data7 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, ImplInheritanceHelper7<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{
- ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, (class_data *)&s_cd, this ) );
+ ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
if (aRet.hasValue())
return aRet;
return BaseClass::queryInterface( rType );
@@ -237,19 +221,9 @@ namespace cppu
virtual void SAL_CALL release() throw ()
{ BaseClass::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplInhHelper_getTypes( (class_data *)&s_cd, BaseClass::getTypes() ); }
+ { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
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 BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 >
- class_data7 ImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >::s_cd =
- {
- 7 +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 *) (ImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (ImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (ImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (ImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (ImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc6 > const * ))&getCppuType, ((sal_Int32)(Ifc6 *) (ImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc7 > const * ))&getCppuType, ((sal_Int32)(Ifc7 *) (ImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 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 *) (ImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
/** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
::com::sun::star::uno::XInterface inherting from a BaseClass.
@@ -272,13 +246,13 @@ namespace cppu
, public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7
{
/** @internal */
- static class_data7 s_cd;
+ struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, AggImplInheritanceHelper7<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {};
public:
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{ return BaseClass::queryInterface( rType ); }
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{
- ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, (class_data *)&s_cd, this ) );
+ ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
if (aRet.hasValue())
return aRet;
return BaseClass::queryAggregation( rType );
@@ -288,19 +262,9 @@ namespace cppu
virtual void SAL_CALL release() throw ()
{ BaseClass::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
- { return ImplInhHelper_getTypes( (class_data *)&s_cd, BaseClass::getTypes() ); }
+ { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
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 BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 >
- class_data7 AggImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >::s_cd =
- {
- 7 +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 *) (AggImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc2 > const * ))&getCppuType, ((sal_Int32)(Ifc2 *) (AggImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc3 > const * ))&getCppuType, ((sal_Int32)(Ifc3 *) (AggImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc4 > const * ))&getCppuType, ((sal_Int32)(Ifc4 *) (AggImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc5 > const * ))&getCppuType, ((sal_Int32)(Ifc5 *) (AggImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc6 > const * ))&getCppuType, ((sal_Int32)(Ifc6 *) (AggImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }, { (::cppu::fptr_getCppuType)(::com::sun::star::uno::Type const & (SAL_CALL *)( ::com::sun::star::uno::Reference< Ifc7 > const * ))&getCppuType, ((sal_Int32)(Ifc7 *) (AggImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 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 *) (AggImplInheritanceHelper7< BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 > *) 16) - 16 }
- }
+ { return ImplHelper_getImplementationId( cd::get() ); }
};
}