UDK 3.2.7 C/C++ API Reference
cppuhelper/implbase12.hxx
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /*************************************************************************
00003  *
00004  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
00005  *
00006  * Copyright 2000, 2010 Oracle and/or its affiliates.
00007  *
00008  * OpenOffice.org - a multi-platform office productivity suite
00009  *
00010  * This file is part of OpenOffice.org.
00011  *
00012  * OpenOffice.org is free software: you can redistribute it and/or modify
00013  * it under the terms of the GNU Lesser General Public License version 3
00014  * only, as published by the Free Software Foundation.
00015  *
00016  * OpenOffice.org is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU Lesser General Public License version 3 for more details
00020  * (a copy is included in the LICENSE file that accompanied this code).
00021  *
00022  * You should have received a copy of the GNU Lesser General Public License
00023  * version 3 along with OpenOffice.org.  If not, see
00024  * <http://www.openoffice.org/license.html>
00025  * for a copy of the LGPLv3 License.
00026  *
00027  ************************************************************************/
00028 #ifndef _CPPUHELPER_IMPLBASE12_HXX_
00029 #define _CPPUHELPER_IMPLBASE12_HXX_
00030 
00031 #include <cppuhelper/implbase_ex.hxx>
00032 #include <rtl/instance.hxx>
00033 
00034 namespace cppu
00035 {
00037 
00038     struct class_data12
00039     {
00040         sal_Int16 m_nTypes;
00041         sal_Bool m_storedTypeRefs;
00042         sal_Bool m_storedId;
00043         sal_Int8 m_id[ 16 ];
00044         type_entry m_typeEntries[ 12 + 1 ];
00045     };
00046 
00047     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 >
00048     struct ImplClassData12
00049     {
00050         class_data* operator ()()
00051         {
00052             static class_data12 s_cd =
00053             {
00054                 12 +1, sal_False, sal_False,
00055                 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
00056                 {
00057                     { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 },
00058                     { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 },
00059                     { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 },
00060                     { { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 },
00061                     { { Ifc5::static_type }, ((sal_IntPtr)(Ifc5 *) (Impl *) 16) - 16 },
00062                     { { Ifc6::static_type }, ((sal_IntPtr)(Ifc6 *) (Impl *) 16) - 16 },
00063                     { { Ifc7::static_type }, ((sal_IntPtr)(Ifc7 *) (Impl *) 16) - 16 },
00064                     { { Ifc8::static_type }, ((sal_IntPtr)(Ifc8 *) (Impl *) 16) - 16 },
00065                     { { Ifc9::static_type }, ((sal_IntPtr)(Ifc9 *) (Impl *) 16) - 16 },
00066                     { { Ifc10::static_type }, ((sal_IntPtr)(Ifc10 *) (Impl *) 16) - 16 },
00067                     { { Ifc11::static_type }, ((sal_IntPtr)(Ifc11 *) (Impl *) 16) - 16 },
00068                     { { Ifc12::static_type }, ((sal_IntPtr)(Ifc12 *) (Impl *) 16) - 16 },
00069                     { { com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 }
00070                 }
00071             };
00072             return reinterpret_cast< class_data * >(&s_cd);
00073         }
00074     };
00075 
00077 
00086     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 >
00087     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelper12
00088         : public com::sun::star::lang::XTypeProvider
00089         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
00090     {
00091         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> > > {};
00092     public:
00093         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00094             { return ImplHelper_query( rType, cd::get(), this ); }
00095         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00096             { return ImplHelper_getTypes( cd::get() ); }
00097         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00098             { return ImplHelper_getImplementationId( cd::get() ); }
00099 
00100 #if !defined _MSC_VER // public -> protected changes mangled names there
00101     protected:
00102 #endif
00103         ~ImplHelper12() throw () {}
00104     };
00113     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 >
00114     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper12
00115         : public OWeakObject
00116         , public com::sun::star::lang::XTypeProvider
00117         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
00118     {
00119         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> > > {};
00120     public:
00121         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00122             { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
00123         virtual void SAL_CALL acquire() throw ()
00124             { OWeakObject::acquire(); }
00125         virtual void SAL_CALL release() throw ()
00126             { OWeakObject::release(); }
00127         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00128             { return WeakImplHelper_getTypes( cd::get() ); }
00129         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00130             { return ImplHelper_getImplementationId( cd::get() ); }
00131     };
00145     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 >
00146     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggImplHelper12
00147         : public OWeakAggObject
00148         , public com::sun::star::lang::XTypeProvider
00149         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
00150     {
00151         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> > > {};
00152     public:
00153         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00154             { return OWeakAggObject::queryInterface( rType ); }
00155         virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00156             { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
00157         virtual void SAL_CALL acquire() throw ()
00158             { OWeakAggObject::acquire(); }
00159         virtual void SAL_CALL release() throw ()
00160             { OWeakAggObject::release(); }
00161         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00162             { return WeakAggImplHelper_getTypes( cd::get() ); }
00163         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00164             { return ImplHelper_getImplementationId( cd::get() ); }
00165     };
00182     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 >
00183     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper12
00184         : public BaseClass
00185         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
00186     {
00187         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> > > {};
00188     protected:
00189         template< typename T1 >
00190         explicit ImplInheritanceHelper12(T1 const & arg1): BaseClass(arg1) {}
00191         template< typename T1, typename T2 >
00192         ImplInheritanceHelper12(T1 const & arg1, T2 const & arg2):
00193             BaseClass(arg1, arg2) {}
00194         template< typename T1, typename T2, typename T3 >
00195         ImplInheritanceHelper12(
00196             T1 const & arg1, T2 const & arg2, T3 const & arg3):
00197             BaseClass(arg1, arg2, arg3) {}
00198         template< typename T1, typename T2, typename T3, typename T4 >
00199         ImplInheritanceHelper12(
00200             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
00201             BaseClass(arg1, arg2, arg3, arg4) {}
00202         template<
00203             typename T1, typename T2, typename T3, typename T4, typename T5 >
00204         ImplInheritanceHelper12(
00205             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
00206             T5 const & arg5):
00207             BaseClass(arg1, arg2, arg3, arg4, arg5) {}
00208         template<
00209             typename T1, typename T2, typename T3, typename T4, typename T5,
00210             typename T6 >
00211         ImplInheritanceHelper12(
00212             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
00213             T5 const & arg5, T6 const & arg6):
00214             BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
00215     public:
00216         ImplInheritanceHelper12() {}
00217         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00218             {
00219                 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
00220                 if (aRet.hasValue())
00221                     return aRet;
00222                 return BaseClass::queryInterface( rType );
00223             }
00224         virtual void SAL_CALL acquire() throw ()
00225             { BaseClass::acquire(); }
00226         virtual void SAL_CALL release() throw ()
00227             { BaseClass::release(); }
00228         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00229             { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
00230         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00231             { return ImplHelper_getImplementationId( cd::get() ); }
00232     };
00250     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 >
00251     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE AggImplInheritanceHelper12
00252         : public BaseClass
00253         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12
00254     {
00255         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> > > {};
00256     protected:
00257         template< typename T1 >
00258         explicit AggImplInheritanceHelper12(T1 const & arg1): BaseClass(arg1) {}
00259         template< typename T1, typename T2 >
00260         AggImplInheritanceHelper12(T1 const & arg1, T2 const & arg2):
00261             BaseClass(arg1, arg2) {}
00262         template< typename T1, typename T2, typename T3 >
00263         AggImplInheritanceHelper12(
00264             T1 const & arg1, T2 const & arg2, T3 const & arg3):
00265             BaseClass(arg1, arg2, arg3) {}
00266         template< typename T1, typename T2, typename T3, typename T4 >
00267         AggImplInheritanceHelper12(
00268             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
00269             BaseClass(arg1, arg2, arg3, arg4) {}
00270         template<
00271             typename T1, typename T2, typename T3, typename T4, typename T5 >
00272         AggImplInheritanceHelper12(
00273             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
00274             T5 const & arg5):
00275             BaseClass(arg1, arg2, arg3, arg4, arg5) {}
00276         template<
00277             typename T1, typename T2, typename T3, typename T4, typename T5,
00278             typename T6 >
00279         AggImplInheritanceHelper12(
00280             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
00281             T5 const & arg5, T6 const & arg6):
00282             BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
00283     public:
00284         AggImplInheritanceHelper12() {}
00285         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00286             { return BaseClass::queryInterface( rType ); }
00287         virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00288             {
00289                 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
00290                 if (aRet.hasValue())
00291                     return aRet;
00292                 return BaseClass::queryAggregation( rType );
00293             }
00294         virtual void SAL_CALL acquire() throw ()
00295             { BaseClass::acquire(); }
00296         virtual void SAL_CALL release() throw ()
00297             { BaseClass::release(); }
00298         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00299             { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
00300         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00301             { return ImplHelper_getImplementationId( cd::get() ); }
00302     };
00303 }
00304 
00305 #endif
00306 
00307 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines