xref: /AOO41X/main/cppuhelper/inc/cppuhelper/implbase12.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef _CPPUHELPER_IMPLBASE12_HXX_
28*cdf0e10cSrcweir #define _CPPUHELPER_IMPLBASE12_HXX_
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir #include <cppuhelper/implbase_ex.hxx>
31*cdf0e10cSrcweir #include <rtl/instance.hxx>
32*cdf0e10cSrcweir 
33*cdf0e10cSrcweir namespace cppu
34*cdf0e10cSrcweir {
35*cdf0e10cSrcweir     /** @internal */
36*cdf0e10cSrcweir     struct class_data12
37*cdf0e10cSrcweir     {
38*cdf0e10cSrcweir         sal_Int16 m_nTypes;
39*cdf0e10cSrcweir         sal_Bool m_storedTypeRefs;
40*cdf0e10cSrcweir         sal_Bool m_storedId;
41*cdf0e10cSrcweir         sal_Int8 m_id[ 16 ];
42*cdf0e10cSrcweir         type_entry m_typeEntries[ 12 + 1 ];
43*cdf0e10cSrcweir     };
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir     /** @internal */
46*cdf0e10cSrcweir     template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Ifc7, typename Ifc8, typename Ifc9, typename Ifc10, typename Ifc11, typename Ifc12, typename Impl >
47*cdf0e10cSrcweir 	struct ImplClassData12
48*cdf0e10cSrcweir     {
49*cdf0e10cSrcweir         class_data* operator ()()
50*cdf0e10cSrcweir         {
51*cdf0e10cSrcweir             static class_data12 s_cd =
52*cdf0e10cSrcweir             {
53*cdf0e10cSrcweir                 12 +1, sal_False, sal_False,
54*cdf0e10cSrcweir 				{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
55*cdf0e10cSrcweir 				{
56*cdf0e10cSrcweir 					{ { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 },
57*cdf0e10cSrcweir 					{ { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 },
58*cdf0e10cSrcweir 					{ { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 },
59*cdf0e10cSrcweir 					{ { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 },
60*cdf0e10cSrcweir 					{ { Ifc5::static_type }, ((sal_IntPtr)(Ifc5 *) (Impl *) 16) - 16 },
61*cdf0e10cSrcweir 					{ { Ifc6::static_type }, ((sal_IntPtr)(Ifc6 *) (Impl *) 16) - 16 },
62*cdf0e10cSrcweir 					{ { Ifc7::static_type }, ((sal_IntPtr)(Ifc7 *) (Impl *) 16) - 16 },
63*cdf0e10cSrcweir 					{ { Ifc8::static_type }, ((sal_IntPtr)(Ifc8 *) (Impl *) 16) - 16 },
64*cdf0e10cSrcweir 					{ { Ifc9::static_type }, ((sal_IntPtr)(Ifc9 *) (Impl *) 16) - 16 },
65*cdf0e10cSrcweir 					{ { Ifc10::static_type }, ((sal_IntPtr)(Ifc10 *) (Impl *) 16) - 16 },
66*cdf0e10cSrcweir 					{ { Ifc11::static_type }, ((sal_IntPtr)(Ifc11 *) (Impl *) 16) - 16 },
67*cdf0e10cSrcweir 					{ { Ifc12::static_type }, ((sal_IntPtr)(Ifc12 *) (Impl *) 16) - 16 },
68*cdf0e10cSrcweir                     { { ::com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(::com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 }
69*cdf0e10cSrcweir 				}
70*cdf0e10cSrcweir             };
71*cdf0e10cSrcweir             return reinterpret_cast< class_data * >(&s_cd);
72*cdf0e10cSrcweir         }
73*cdf0e10cSrcweir     };
74*cdf0e10cSrcweir 
75*cdf0e10cSrcweir     /** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider
76*cdf0e10cSrcweir         and method XInterface::queryInterface(), but no reference counting.
77*cdf0e10cSrcweir 
78*cdf0e10cSrcweir         @derive
79*cdf0e10cSrcweir         Inherit from this class giving your interface(s) to be implemented as template argument(s).
80*cdf0e10cSrcweir         Your sub class defines method implementations for these interface(s) including acquire()/
81*cdf0e10cSrcweir         release() and delegates incoming queryInterface() calls to this base class.
82*cdf0e10cSrcweir     */
83*cdf0e10cSrcweir     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 >
84*cdf0e10cSrcweir     class SAL_NO_VTABLE ImplHelper12
85*cdf0e10cSrcweir         : public ::com::sun::star::lang::XTypeProvider
86*cdf0e10cSrcweir         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
87*cdf0e10cSrcweir     {
88*cdf0e10cSrcweir         /** @internal */
89*cdf0e10cSrcweir         struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, ImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {};
90*cdf0e10cSrcweir     public:
91*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
92*cdf0e10cSrcweir             { return ImplHelper_query( rType, cd::get(), this ); }
93*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
94*cdf0e10cSrcweir             { return ImplHelper_getTypes( cd::get() ); }
95*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
96*cdf0e10cSrcweir             { return ImplHelper_getImplementationId( cd::get() ); }
97*cdf0e10cSrcweir     };
98*cdf0e10cSrcweir     /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
99*cdf0e10cSrcweir         ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly
100*cdf0e10cSrcweir         (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakObject).
101*cdf0e10cSrcweir 
102*cdf0e10cSrcweir         @derive
103*cdf0e10cSrcweir         Inherit from this class giving your interface(s) to be implemented as template argument(s).
104*cdf0e10cSrcweir         Your sub class defines method implementations for these interface(s).
105*cdf0e10cSrcweir     */
106*cdf0e10cSrcweir     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 >
107*cdf0e10cSrcweir     class SAL_NO_VTABLE WeakImplHelper12
108*cdf0e10cSrcweir         : public OWeakObject
109*cdf0e10cSrcweir         , public ::com::sun::star::lang::XTypeProvider
110*cdf0e10cSrcweir         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
111*cdf0e10cSrcweir     {
112*cdf0e10cSrcweir         /** @internal */
113*cdf0e10cSrcweir         struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, WeakImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {};
114*cdf0e10cSrcweir     public:
115*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
116*cdf0e10cSrcweir             { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
117*cdf0e10cSrcweir         virtual void SAL_CALL acquire() throw ()
118*cdf0e10cSrcweir             { OWeakObject::acquire(); }
119*cdf0e10cSrcweir         virtual void SAL_CALL release() throw ()
120*cdf0e10cSrcweir             { OWeakObject::release(); }
121*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
122*cdf0e10cSrcweir             { return WeakImplHelper_getTypes( cd::get() ); }
123*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
124*cdf0e10cSrcweir             { return ImplHelper_getImplementationId( cd::get() ); }
125*cdf0e10cSrcweir     };
126*cdf0e10cSrcweir     /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
127*cdf0e10cSrcweir         ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly
128*cdf0e10cSrcweir         (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakAggObject).
129*cdf0e10cSrcweir         In addition, it supports also aggregation meaning object of this class can be aggregated
130*cdf0e10cSrcweir         (::com::sun::star::uno::XAggregation thru ::cppu::OWeakAggObject).
131*cdf0e10cSrcweir         If a delegator is set (this object is aggregated), then incoming queryInterface()
132*cdf0e10cSrcweir         calls are delegated to the delegator object. If the delegator does not support the
133*cdf0e10cSrcweir         demanded interface, it calls queryAggregation() on its aggregated objects.
134*cdf0e10cSrcweir 
135*cdf0e10cSrcweir         @derive
136*cdf0e10cSrcweir         Inherit from this class giving your interface(s) to be implemented as template argument(s).
137*cdf0e10cSrcweir         Your sub class defines method implementations for these interface(s).
138*cdf0e10cSrcweir     */
139*cdf0e10cSrcweir     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 >
140*cdf0e10cSrcweir     class SAL_NO_VTABLE WeakAggImplHelper12
141*cdf0e10cSrcweir         : public OWeakAggObject
142*cdf0e10cSrcweir         , public ::com::sun::star::lang::XTypeProvider
143*cdf0e10cSrcweir         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
144*cdf0e10cSrcweir     {
145*cdf0e10cSrcweir         /** @internal */
146*cdf0e10cSrcweir         struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, WeakAggImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {};
147*cdf0e10cSrcweir     public:
148*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
149*cdf0e10cSrcweir             { return OWeakAggObject::queryInterface( rType ); }
150*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
151*cdf0e10cSrcweir             { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
152*cdf0e10cSrcweir         virtual void SAL_CALL acquire() throw ()
153*cdf0e10cSrcweir             { OWeakAggObject::acquire(); }
154*cdf0e10cSrcweir         virtual void SAL_CALL release() throw ()
155*cdf0e10cSrcweir             { OWeakAggObject::release(); }
156*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
157*cdf0e10cSrcweir             { return WeakAggImplHelper_getTypes( cd::get() ); }
158*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
159*cdf0e10cSrcweir             { return ImplHelper_getImplementationId( cd::get() ); }
160*cdf0e10cSrcweir     };
161*cdf0e10cSrcweir     /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
162*cdf0e10cSrcweir         ::com::sun::star::uno::XInterface inherting from a BaseClass.
163*cdf0e10cSrcweir         All acquire() and release() calls are delegated to the BaseClass. Upon queryInterface(),
164*cdf0e10cSrcweir         if a demanded interface is not supported by this class directly, the request is
165*cdf0e10cSrcweir         delegated to the BaseClass.
166*cdf0e10cSrcweir 
167*cdf0e10cSrcweir         @attention
168*cdf0e10cSrcweir         The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface
169*cdf0e10cSrcweir         and ::com::sun::star::lang::XTypeProvider are implemented properly.  The
170*cdf0e10cSrcweir         BaseClass must have at least one ctor that can be called with six or
171*cdf0e10cSrcweir         fewer arguments, of which none is of non-const reference type.
172*cdf0e10cSrcweir 
173*cdf0e10cSrcweir         @derive
174*cdf0e10cSrcweir         Inherit from this class giving your additional interface(s) to be implemented as
175*cdf0e10cSrcweir         template argument(s). Your sub class defines method implementations for these interface(s).
176*cdf0e10cSrcweir     */
177*cdf0e10cSrcweir     template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 >
178*cdf0e10cSrcweir     class SAL_NO_VTABLE ImplInheritanceHelper12
179*cdf0e10cSrcweir         : public BaseClass
180*cdf0e10cSrcweir         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
181*cdf0e10cSrcweir     {
182*cdf0e10cSrcweir         /** @internal */
183*cdf0e10cSrcweir         struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, ImplInheritanceHelper12<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {};
184*cdf0e10cSrcweir     protected:
185*cdf0e10cSrcweir         template< typename T1 >
186*cdf0e10cSrcweir         explicit ImplInheritanceHelper12(T1 const & arg1): BaseClass(arg1) {}
187*cdf0e10cSrcweir         template< typename T1, typename T2 >
188*cdf0e10cSrcweir         ImplInheritanceHelper12(T1 const & arg1, T2 const & arg2):
189*cdf0e10cSrcweir             BaseClass(arg1, arg2) {}
190*cdf0e10cSrcweir         template< typename T1, typename T2, typename T3 >
191*cdf0e10cSrcweir         ImplInheritanceHelper12(
192*cdf0e10cSrcweir             T1 const & arg1, T2 const & arg2, T3 const & arg3):
193*cdf0e10cSrcweir             BaseClass(arg1, arg2, arg3) {}
194*cdf0e10cSrcweir         template< typename T1, typename T2, typename T3, typename T4 >
195*cdf0e10cSrcweir         ImplInheritanceHelper12(
196*cdf0e10cSrcweir             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
197*cdf0e10cSrcweir             BaseClass(arg1, arg2, arg3, arg4) {}
198*cdf0e10cSrcweir         template<
199*cdf0e10cSrcweir             typename T1, typename T2, typename T3, typename T4, typename T5 >
200*cdf0e10cSrcweir         ImplInheritanceHelper12(
201*cdf0e10cSrcweir             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
202*cdf0e10cSrcweir             T5 const & arg5):
203*cdf0e10cSrcweir             BaseClass(arg1, arg2, arg3, arg4, arg5) {}
204*cdf0e10cSrcweir         template<
205*cdf0e10cSrcweir             typename T1, typename T2, typename T3, typename T4, typename T5,
206*cdf0e10cSrcweir             typename T6 >
207*cdf0e10cSrcweir         ImplInheritanceHelper12(
208*cdf0e10cSrcweir             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
209*cdf0e10cSrcweir             T5 const & arg5, T6 const & arg6):
210*cdf0e10cSrcweir             BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
211*cdf0e10cSrcweir     public:
212*cdf0e10cSrcweir         ImplInheritanceHelper12() {}
213*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
214*cdf0e10cSrcweir             {
215*cdf0e10cSrcweir                 ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
216*cdf0e10cSrcweir                 if (aRet.hasValue())
217*cdf0e10cSrcweir                     return aRet;
218*cdf0e10cSrcweir                 return BaseClass::queryInterface( rType );
219*cdf0e10cSrcweir             }
220*cdf0e10cSrcweir         virtual void SAL_CALL acquire() throw ()
221*cdf0e10cSrcweir             { BaseClass::acquire(); }
222*cdf0e10cSrcweir         virtual void SAL_CALL release() throw ()
223*cdf0e10cSrcweir             { BaseClass::release(); }
224*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
225*cdf0e10cSrcweir             { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
226*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
227*cdf0e10cSrcweir             { return ImplHelper_getImplementationId( cd::get() ); }
228*cdf0e10cSrcweir     };
229*cdf0e10cSrcweir     /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and
230*cdf0e10cSrcweir         ::com::sun::star::uno::XInterface inherting from a BaseClass.
231*cdf0e10cSrcweir         All acquire(),  release() and queryInterface() calls are delegated to the BaseClass.
232*cdf0e10cSrcweir         Upon queryAggregation(), if a demanded interface is not supported by this class directly,
233*cdf0e10cSrcweir         the request is delegated to the BaseClass.
234*cdf0e10cSrcweir 
235*cdf0e10cSrcweir         @attention
236*cdf0e10cSrcweir         The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface,
237*cdf0e10cSrcweir         ::com::sun::star::uno::XAggregation and ::com::sun::star::lang::XTypeProvider
238*cdf0e10cSrcweir         are implemented properly.  The BaseClass must have at least one ctor
239*cdf0e10cSrcweir         that can be called with six or fewer arguments, of which none is of
240*cdf0e10cSrcweir         non-const reference type.
241*cdf0e10cSrcweir 
242*cdf0e10cSrcweir         @derive
243*cdf0e10cSrcweir         Inherit from this class giving your additional interface(s) to be implemented as
244*cdf0e10cSrcweir         template argument(s). Your sub class defines method implementations for these interface(s).
245*cdf0e10cSrcweir     */
246*cdf0e10cSrcweir     template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 >
247*cdf0e10cSrcweir     class SAL_NO_VTABLE AggImplInheritanceHelper12
248*cdf0e10cSrcweir         : public BaseClass
249*cdf0e10cSrcweir         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
250*cdf0e10cSrcweir     {
251*cdf0e10cSrcweir         /** @internal */
252*cdf0e10cSrcweir         struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, AggImplInheritanceHelper12<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {};
253*cdf0e10cSrcweir     protected:
254*cdf0e10cSrcweir         template< typename T1 >
255*cdf0e10cSrcweir         explicit AggImplInheritanceHelper12(T1 const & arg1): BaseClass(arg1) {}
256*cdf0e10cSrcweir         template< typename T1, typename T2 >
257*cdf0e10cSrcweir         AggImplInheritanceHelper12(T1 const & arg1, T2 const & arg2):
258*cdf0e10cSrcweir             BaseClass(arg1, arg2) {}
259*cdf0e10cSrcweir         template< typename T1, typename T2, typename T3 >
260*cdf0e10cSrcweir         AggImplInheritanceHelper12(
261*cdf0e10cSrcweir             T1 const & arg1, T2 const & arg2, T3 const & arg3):
262*cdf0e10cSrcweir             BaseClass(arg1, arg2, arg3) {}
263*cdf0e10cSrcweir         template< typename T1, typename T2, typename T3, typename T4 >
264*cdf0e10cSrcweir         AggImplInheritanceHelper12(
265*cdf0e10cSrcweir             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
266*cdf0e10cSrcweir             BaseClass(arg1, arg2, arg3, arg4) {}
267*cdf0e10cSrcweir         template<
268*cdf0e10cSrcweir             typename T1, typename T2, typename T3, typename T4, typename T5 >
269*cdf0e10cSrcweir         AggImplInheritanceHelper12(
270*cdf0e10cSrcweir             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
271*cdf0e10cSrcweir             T5 const & arg5):
272*cdf0e10cSrcweir             BaseClass(arg1, arg2, arg3, arg4, arg5) {}
273*cdf0e10cSrcweir         template<
274*cdf0e10cSrcweir             typename T1, typename T2, typename T3, typename T4, typename T5,
275*cdf0e10cSrcweir             typename T6 >
276*cdf0e10cSrcweir         AggImplInheritanceHelper12(
277*cdf0e10cSrcweir             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
278*cdf0e10cSrcweir             T5 const & arg5, T6 const & arg6):
279*cdf0e10cSrcweir             BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
280*cdf0e10cSrcweir     public:
281*cdf0e10cSrcweir         AggImplInheritanceHelper12() {}
282*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
283*cdf0e10cSrcweir             { return BaseClass::queryInterface( rType ); }
284*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
285*cdf0e10cSrcweir             {
286*cdf0e10cSrcweir                 ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
287*cdf0e10cSrcweir                 if (aRet.hasValue())
288*cdf0e10cSrcweir                     return aRet;
289*cdf0e10cSrcweir                 return BaseClass::queryAggregation( rType );
290*cdf0e10cSrcweir             }
291*cdf0e10cSrcweir         virtual void SAL_CALL acquire() throw ()
292*cdf0e10cSrcweir             { BaseClass::acquire(); }
293*cdf0e10cSrcweir         virtual void SAL_CALL release() throw ()
294*cdf0e10cSrcweir             { BaseClass::release(); }
295*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
296*cdf0e10cSrcweir             { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
297*cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
298*cdf0e10cSrcweir             { return ImplHelper_getImplementationId( cd::get() ); }
299*cdf0e10cSrcweir     };
300*cdf0e10cSrcweir }
301*cdf0e10cSrcweir 
302*cdf0e10cSrcweir #endif
303