diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-03-28 11:02:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-03-28 14:31:14 +0100 |
commit | 8a3a56507a2165714602bf4a462dfbac6d2192bf (patch) | |
tree | c55338778f4a6069d5894143e24e552a2a936693 /cppuhelper/inc | |
parent | ac4c98e868c6e7b946cc54636b740d22eca51dc8 (diff) |
add PartialWeakComponentImplHelperX for overloaded-virtual
Diffstat (limited to 'cppuhelper/inc')
-rw-r--r-- | cppuhelper/inc/cppuhelper/compbase1.hxx | 33 | ||||
-rw-r--r-- | cppuhelper/inc/cppuhelper/compbase10.hxx | 33 | ||||
-rw-r--r-- | cppuhelper/inc/cppuhelper/compbase11.hxx | 33 | ||||
-rw-r--r-- | cppuhelper/inc/cppuhelper/compbase12.hxx | 33 | ||||
-rw-r--r-- | cppuhelper/inc/cppuhelper/compbase2.hxx | 34 | ||||
-rw-r--r-- | cppuhelper/inc/cppuhelper/compbase3.hxx | 33 | ||||
-rw-r--r-- | cppuhelper/inc/cppuhelper/compbase4.hxx | 33 | ||||
-rw-r--r-- | cppuhelper/inc/cppuhelper/compbase5.hxx | 33 | ||||
-rw-r--r-- | cppuhelper/inc/cppuhelper/compbase6.hxx | 33 | ||||
-rw-r--r-- | cppuhelper/inc/cppuhelper/compbase7.hxx | 33 | ||||
-rw-r--r-- | cppuhelper/inc/cppuhelper/compbase8.hxx | 33 | ||||
-rw-r--r-- | cppuhelper/inc/cppuhelper/compbase9.hxx | 33 |
12 files changed, 397 insertions, 0 deletions
diff --git a/cppuhelper/inc/cppuhelper/compbase1.hxx b/cppuhelper/inc/cppuhelper/compbase1.hxx index b968c3278eb1..ea657298d093 100644 --- a/cppuhelper/inc/cppuhelper/compbase1.hxx +++ b/cppuhelper/inc/cppuhelper/compbase1.hxx @@ -91,6 +91,39 @@ namespace cppu #pragma enable_warn #endif + /** Same as WeakComponentImplHelper1, except doesn't implement + addEventListener, removeEventListener and dispose. + + This requires derived classes to implement those three methods. + This makes it possible to implement classes which are required to + implement methods from multiple bases which have different + addEventListener/removeEventListener signatures without triggering + the g++ overloaded-virtual warning + */ + template< class Ifc1 > + class SAL_NO_VTABLE PartialWeakComponentImplHelper1 + : public WeakComponentImplHelperBase + , public ::com::sun::star::lang::XTypeProvider + , public Ifc1 + { + /** @internal */ + struct cd : public rtl::StaticAggregate< class_data, ImplClassData1< Ifc1, PartialWeakComponentImplHelper1< Ifc1 > > > {}; + public: + inline PartialWeakComponentImplHelper1( ::osl::Mutex & rMutex ) throw () + : WeakComponentImplHelperBase( rMutex ) + {} + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } + virtual void SAL_CALL acquire() throw () + { WeakComponentImplHelperBase::acquire(); } + virtual void SAL_CALL release() throw () + { WeakComponentImplHelperBase::release(); } + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_getTypes( cd::get() ); } + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) + { return ImplHelper_getImplementationId( cd::get() ); } + }; + /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and ::com::sun::star::lang::XComponent. diff --git a/cppuhelper/inc/cppuhelper/compbase10.hxx b/cppuhelper/inc/cppuhelper/compbase10.hxx index 0dd725b35a16..ea7c2733677e 100644 --- a/cppuhelper/inc/cppuhelper/compbase10.hxx +++ b/cppuhelper/inc/cppuhelper/compbase10.hxx @@ -91,6 +91,39 @@ namespace cppu #pragma enable_warn #endif + /** Same as WeakComponentImplHelper10, except doesn't implement + addEventListener, removeEventListener and dispose. + + This requires derived classes to implement those three methods. + This makes it possible to implement classes which are required to + implement methods from multiple bases which have different + addEventListener/removeEventListener signatures without triggering + the g++ overloaded-virtual warning + */ + template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 > + class SAL_NO_VTABLE PartialWeakComponentImplHelper10 + : public WeakComponentImplHelperBase + , public ::com::sun::star::lang::XTypeProvider + , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10 + { + /** @internal */ + struct cd : public rtl::StaticAggregate< class_data, ImplClassData10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, PartialWeakComponentImplHelper10<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10> > > {}; + public: + inline PartialWeakComponentImplHelper10( ::osl::Mutex & rMutex ) throw () + : WeakComponentImplHelperBase( rMutex ) + {} + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } + virtual void SAL_CALL acquire() throw () + { WeakComponentImplHelperBase::acquire(); } + virtual void SAL_CALL release() throw () + { WeakComponentImplHelperBase::release(); } + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_getTypes( cd::get() ); } + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) + { return ImplHelper_getImplementationId( cd::get() ); } + }; + /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and ::com::sun::star::lang::XComponent. diff --git a/cppuhelper/inc/cppuhelper/compbase11.hxx b/cppuhelper/inc/cppuhelper/compbase11.hxx index 5b88983ac6fd..6f7c383a3045 100644 --- a/cppuhelper/inc/cppuhelper/compbase11.hxx +++ b/cppuhelper/inc/cppuhelper/compbase11.hxx @@ -91,6 +91,39 @@ namespace cppu #pragma enable_warn #endif + /** Same as WeakComponentImplHelper11, except doesn't implement + addEventListener, removeEventListener and dispose. + + This requires derived classes to implement those three methods. + This makes it possible to implement classes which are required to + implement methods from multiple bases which have different + addEventListener/removeEventListener signatures without triggering + the g++ overloaded-virtual warning + */ + template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > + class SAL_NO_VTABLE PartialWeakComponentImplHelper11 + : public WeakComponentImplHelperBase + , public ::com::sun::star::lang::XTypeProvider + , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11 + { + /** @internal */ + struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, PartialWeakComponentImplHelper11<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {}; + public: + inline PartialWeakComponentImplHelper11( ::osl::Mutex & rMutex ) throw () + : WeakComponentImplHelperBase( rMutex ) + {} + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } + virtual void SAL_CALL acquire() throw () + { WeakComponentImplHelperBase::acquire(); } + virtual void SAL_CALL release() throw () + { WeakComponentImplHelperBase::release(); } + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_getTypes( cd::get() ); } + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) + { return ImplHelper_getImplementationId( cd::get() ); } + }; + /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and ::com::sun::star::lang::XComponent. diff --git a/cppuhelper/inc/cppuhelper/compbase12.hxx b/cppuhelper/inc/cppuhelper/compbase12.hxx index f79af5223571..c965a7ae59b9 100644 --- a/cppuhelper/inc/cppuhelper/compbase12.hxx +++ b/cppuhelper/inc/cppuhelper/compbase12.hxx @@ -91,6 +91,39 @@ namespace cppu #pragma enable_warn #endif + /** Same as WeakComponentImplHelper12, except doesn't implement + addEventListener, removeEventListener and dispose. + + This requires derived classes to implement those three methods. + This makes it possible to implement classes which are required to + implement methods from multiple bases which have different + addEventListener/removeEventListener signatures without triggering + the g++ overloaded-virtual warning + */ + template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 > + class SAL_NO_VTABLE PartialWeakComponentImplHelper12 + : public WeakComponentImplHelperBase + , public ::com::sun::star::lang::XTypeProvider + , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12 + { + /** @internal */ + struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, PartialWeakComponentImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {}; + public: + inline PartialWeakComponentImplHelper12( ::osl::Mutex & rMutex ) throw () + : WeakComponentImplHelperBase( rMutex ) + {} + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } + virtual void SAL_CALL acquire() throw () + { WeakComponentImplHelperBase::acquire(); } + virtual void SAL_CALL release() throw () + { WeakComponentImplHelperBase::release(); } + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_getTypes( cd::get() ); } + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) + { return ImplHelper_getImplementationId( cd::get() ); } + }; + /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and ::com::sun::star::lang::XComponent. diff --git a/cppuhelper/inc/cppuhelper/compbase2.hxx b/cppuhelper/inc/cppuhelper/compbase2.hxx index 9518c01f85fd..ea755ca448ee 100644 --- a/cppuhelper/inc/cppuhelper/compbase2.hxx +++ b/cppuhelper/inc/cppuhelper/compbase2.hxx @@ -91,6 +91,40 @@ namespace cppu #pragma enable_warn #endif + /** Same as WeakComponentImplHelper2, except doesn't implement + addEventListener, removeEventListener and dispose. + + This requires derived classes to implement those three methods. + This makes it possible to implement classes which are required to + implement methods from multiple bases which have different + addEventListener/removeEventListener signatures without triggering + the g++ overloaded-virtual warning + */ + template< class Ifc1, class Ifc2 > + class SAL_NO_VTABLE PartialWeakComponentImplHelper2 + : public WeakComponentImplHelperBase + , public ::com::sun::star::lang::XTypeProvider + , public Ifc1, public Ifc2 + { + /** @internal */ + struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, PartialWeakComponentImplHelper2<Ifc1, Ifc2> > > {}; + public: + inline PartialWeakComponentImplHelper2( ::osl::Mutex & rMutex ) throw () + : WeakComponentImplHelperBase( rMutex ) + {} + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } + virtual void SAL_CALL acquire() throw () + { WeakComponentImplHelperBase::acquire(); } + virtual void SAL_CALL release() throw () + { WeakComponentImplHelperBase::release(); } + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_getTypes( cd::get() ); } + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) + { return ImplHelper_getImplementationId( cd::get() ); } + }; + + /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and ::com::sun::star::lang::XComponent. diff --git a/cppuhelper/inc/cppuhelper/compbase3.hxx b/cppuhelper/inc/cppuhelper/compbase3.hxx index 04bac81f9e2a..425101f1c1eb 100644 --- a/cppuhelper/inc/cppuhelper/compbase3.hxx +++ b/cppuhelper/inc/cppuhelper/compbase3.hxx @@ -91,6 +91,39 @@ namespace cppu #pragma enable_warn #endif + /** Same as WeakComponentImplHelper3, except doesn't implement + addEventListener, removeEventListener and dispose. + + This requires derived classes to implement those three methods. + This makes it possible to implement classes which are required to + implement methods from multiple bases which have different + addEventListener/removeEventListener signatures without triggering + the g++ overloaded-virtual warning + */ + template< class Ifc1, class Ifc2, class Ifc3 > + class SAL_NO_VTABLE PartialWeakComponentImplHelper3 + : public WeakComponentImplHelperBase + , public ::com::sun::star::lang::XTypeProvider + , public Ifc1, public Ifc2, public Ifc3 + { + /** @internal */ + struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, PartialWeakComponentImplHelper3<Ifc1, Ifc2, Ifc3> > > {}; + public: + inline PartialWeakComponentImplHelper3( ::osl::Mutex & rMutex ) throw () + : WeakComponentImplHelperBase( rMutex ) + {} + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } + virtual void SAL_CALL acquire() throw () + { WeakComponentImplHelperBase::acquire(); } + virtual void SAL_CALL release() throw () + { WeakComponentImplHelperBase::release(); } + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_getTypes( cd::get() ); } + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) + { return ImplHelper_getImplementationId( cd::get() ); } + }; + /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and ::com::sun::star::lang::XComponent. diff --git a/cppuhelper/inc/cppuhelper/compbase4.hxx b/cppuhelper/inc/cppuhelper/compbase4.hxx index a482e4bf0be7..438f041b986b 100644 --- a/cppuhelper/inc/cppuhelper/compbase4.hxx +++ b/cppuhelper/inc/cppuhelper/compbase4.hxx @@ -91,6 +91,39 @@ namespace cppu #pragma enable_warn #endif + /** Same as WeakComponentImplHelper4, except doesn't implement + addEventListener, removeEventListener and dispose. + + This requires derived classes to implement those three methods. + This makes it possible to implement classes which are required to + implement methods from multiple bases which have different + addEventListener/removeEventListener signatures without triggering + the g++ overloaded-virtual warning + */ + template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 > + class SAL_NO_VTABLE PartialWeakComponentImplHelper4 + : public WeakComponentImplHelperBase + , public ::com::sun::star::lang::XTypeProvider + , public Ifc1, public Ifc2, public Ifc3, public Ifc4 + { + /** @internal */ + struct cd : public rtl::StaticAggregate< class_data, ImplClassData4 < Ifc1, Ifc2, Ifc3, Ifc4, PartialWeakComponentImplHelper4<Ifc1, Ifc2, Ifc3, Ifc4> > > {}; + public: + inline PartialWeakComponentImplHelper4( ::osl::Mutex & rMutex ) throw () + : WeakComponentImplHelperBase( rMutex ) + {} + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } + virtual void SAL_CALL acquire() throw () + { WeakComponentImplHelperBase::acquire(); } + virtual void SAL_CALL release() throw () + { WeakComponentImplHelperBase::release(); } + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_getTypes( cd::get() ); } + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) + { return ImplHelper_getImplementationId( cd::get() ); } + }; + /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and ::com::sun::star::lang::XComponent. diff --git a/cppuhelper/inc/cppuhelper/compbase5.hxx b/cppuhelper/inc/cppuhelper/compbase5.hxx index 2fdaf471aa73..a010253d6811 100644 --- a/cppuhelper/inc/cppuhelper/compbase5.hxx +++ b/cppuhelper/inc/cppuhelper/compbase5.hxx @@ -91,6 +91,39 @@ namespace cppu #pragma enable_warn #endif + /** Same as WeakComponentImplHelper5, except doesn't implement + addEventListener, removeEventListener and dispose. + + This requires derived classes to implement those three methods. + This makes it possible to implement classes which are required to + implement methods from multiple bases which have different + addEventListener/removeEventListener signatures without triggering + the g++ overloaded-virtual warning + */ + template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 > + class SAL_NO_VTABLE PartialWeakComponentImplHelper5 + : public WeakComponentImplHelperBase + , public ::com::sun::star::lang::XTypeProvider + , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5 + { + /** @internal */ + struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, PartialWeakComponentImplHelper5<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {}; + public: + inline PartialWeakComponentImplHelper5( ::osl::Mutex & rMutex ) throw () + : WeakComponentImplHelperBase( rMutex ) + {} + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } + virtual void SAL_CALL acquire() throw () + { WeakComponentImplHelperBase::acquire(); } + virtual void SAL_CALL release() throw () + { WeakComponentImplHelperBase::release(); } + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_getTypes( cd::get() ); } + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) + { return ImplHelper_getImplementationId( cd::get() ); } + }; + /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and ::com::sun::star::lang::XComponent. diff --git a/cppuhelper/inc/cppuhelper/compbase6.hxx b/cppuhelper/inc/cppuhelper/compbase6.hxx index 3c80d59169fe..ee168e0374eb 100644 --- a/cppuhelper/inc/cppuhelper/compbase6.hxx +++ b/cppuhelper/inc/cppuhelper/compbase6.hxx @@ -91,6 +91,39 @@ namespace cppu #pragma enable_warn #endif + /** Same as WeakComponentImplHelper6, except doesn't implement + addEventListener, removeEventListener and dispose. + + This requires derived classes to implement those three methods. + This makes it possible to implement classes which are required to + implement methods from multiple bases which have different + addEventListener/removeEventListener signatures without triggering + the g++ overloaded-virtual warning + */ + template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 > + class SAL_NO_VTABLE PartialWeakComponentImplHelper6 + : public WeakComponentImplHelperBase + , public ::com::sun::star::lang::XTypeProvider + , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6 + { + /** @internal */ + struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, PartialWeakComponentImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {}; + public: + inline PartialWeakComponentImplHelper6( ::osl::Mutex & rMutex ) throw () + : WeakComponentImplHelperBase( rMutex ) + {} + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } + virtual void SAL_CALL acquire() throw () + { WeakComponentImplHelperBase::acquire(); } + virtual void SAL_CALL release() throw () + { WeakComponentImplHelperBase::release(); } + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_getTypes( cd::get() ); } + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) + { return ImplHelper_getImplementationId( cd::get() ); } + }; + /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and ::com::sun::star::lang::XComponent. diff --git a/cppuhelper/inc/cppuhelper/compbase7.hxx b/cppuhelper/inc/cppuhelper/compbase7.hxx index 43d4de7d787a..f7ef3e143a3c 100644 --- a/cppuhelper/inc/cppuhelper/compbase7.hxx +++ b/cppuhelper/inc/cppuhelper/compbase7.hxx @@ -91,6 +91,39 @@ namespace cppu #pragma enable_warn #endif + /** Same as WeakComponentImplHelper7, except doesn't implement + addEventListener, removeEventListener and dispose. + + This requires derived classes to implement those three methods. + This makes it possible to implement classes which are required to + implement methods from multiple bases which have different + addEventListener/removeEventListener signatures without triggering + the g++ overloaded-virtual warning + */ + template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 > + class SAL_NO_VTABLE PartialWeakComponentImplHelper7 + : public WeakComponentImplHelperBase + , public ::com::sun::star::lang::XTypeProvider + , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7 + { + /** @internal */ + struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, PartialWeakComponentImplHelper7<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {}; + public: + inline PartialWeakComponentImplHelper7( ::osl::Mutex & rMutex ) throw () + : WeakComponentImplHelperBase( rMutex ) + {} + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } + virtual void SAL_CALL acquire() throw () + { WeakComponentImplHelperBase::acquire(); } + virtual void SAL_CALL release() throw () + { WeakComponentImplHelperBase::release(); } + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_getTypes( cd::get() ); } + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) + { return ImplHelper_getImplementationId( cd::get() ); } + }; + /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and ::com::sun::star::lang::XComponent. diff --git a/cppuhelper/inc/cppuhelper/compbase8.hxx b/cppuhelper/inc/cppuhelper/compbase8.hxx index 8df9b4fb5eff..aa7e6837c44b 100644 --- a/cppuhelper/inc/cppuhelper/compbase8.hxx +++ b/cppuhelper/inc/cppuhelper/compbase8.hxx @@ -91,6 +91,39 @@ namespace cppu #pragma enable_warn #endif + /** Same as WeakComponentImplHelper8, except doesn't implement + addEventListener, removeEventListener and dispose. + + This requires derived classes to implement those three methods. + This makes it possible to implement classes which are required to + implement methods from multiple bases which have different + addEventListener/removeEventListener signatures without triggering + the g++ overloaded-virtual warning + */ + template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 > + class SAL_NO_VTABLE PartialWeakComponentImplHelper8 + : public WeakComponentImplHelperBase + , public ::com::sun::star::lang::XTypeProvider + , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8 + { + /** @internal */ + struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, PartialWeakComponentImplHelper8<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {}; + public: + inline PartialWeakComponentImplHelper8( ::osl::Mutex & rMutex ) throw () + : WeakComponentImplHelperBase( rMutex ) + {} + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } + virtual void SAL_CALL acquire() throw () + { WeakComponentImplHelperBase::acquire(); } + virtual void SAL_CALL release() throw () + { WeakComponentImplHelperBase::release(); } + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_getTypes( cd::get() ); } + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) + { return ImplHelper_getImplementationId( cd::get() ); } + }; + /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and ::com::sun::star::lang::XComponent. diff --git a/cppuhelper/inc/cppuhelper/compbase9.hxx b/cppuhelper/inc/cppuhelper/compbase9.hxx index a2f90b45dae6..42f68df8e30f 100644 --- a/cppuhelper/inc/cppuhelper/compbase9.hxx +++ b/cppuhelper/inc/cppuhelper/compbase9.hxx @@ -91,6 +91,39 @@ namespace cppu #pragma enable_warn #endif + /** Same as WeakComponentImplHelper9, except doesn't implement + addEventListener, removeEventListener and dispose. + + This requires derived classes to implement those three methods. + This makes it possible to implement classes which are required to + implement methods from multiple bases which have different + addEventListener/removeEventListener signatures without triggering + the g++ overloaded-virtual warning + */ + template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 > + class SAL_NO_VTABLE PartialWeakComponentImplHelper9 + : public WeakComponentImplHelperBase + , public ::com::sun::star::lang::XTypeProvider + , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9 + { + /** @internal */ + struct cd : public rtl::StaticAggregate< class_data, ImplClassData9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, PartialWeakComponentImplHelper9<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9> > > {}; + public: + inline PartialWeakComponentImplHelper9( ::osl::Mutex & rMutex ) throw () + : WeakComponentImplHelperBase( rMutex ) + {} + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } + virtual void SAL_CALL acquire() throw () + { WeakComponentImplHelperBase::acquire(); } + virtual void SAL_CALL release() throw () + { WeakComponentImplHelperBase::release(); } + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) + { return WeakComponentImplHelper_getTypes( cd::get() ); } + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) + { return ImplHelper_getImplementationId( cd::get() ); } + } + /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and ::com::sun::star::lang::XComponent. Upon disposing objects of this class, sub-classes receive a disposing() |