UDK 3.2.7 C/C++ API Reference
cppuhelper/implbase9.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_IMPLBASE9_HXX_
00029 #define _CPPUHELPER_IMPLBASE9_HXX_
00030 
00031 #include <cppuhelper/implbase_ex.hxx>
00032 #include <rtl/instance.hxx>
00033 
00034 namespace cppu
00035 {
00037 
00038     struct class_data9
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[ 9 + 1 ];
00045     };
00046 
00047     template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Ifc7, typename Ifc8, typename Ifc9, typename Impl >
00048     struct ImplClassData9
00049     {
00050         class_data* operator ()()
00051         {
00052             static class_data9 s_cd =
00053             {
00054                 9 +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                     { { com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 }
00067                 }
00068             };
00069             return reinterpret_cast< class_data * >(&s_cd);
00070         }
00071     };
00072 
00074 
00083     template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
00084     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelper9
00085         : public com::sun::star::lang::XTypeProvider
00086         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
00087     {
00088         struct cd : public rtl::StaticAggregate< class_data, ImplClassData9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, ImplHelper9<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9> > > {};
00089     public:
00090         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00091             { return ImplHelper_query( rType, cd::get(), this ); }
00092         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00093             { return ImplHelper_getTypes( cd::get() ); }
00094         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00095             { return ImplHelper_getImplementationId( cd::get() ); }
00096 
00097 #if !defined _MSC_VER // public -> protected changes mangled names there
00098     protected:
00099 #endif
00100         ~ImplHelper9() throw () {}
00101     };
00110     template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
00111     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper9
00112         : public OWeakObject
00113         , public com::sun::star::lang::XTypeProvider
00114         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
00115     {
00116         struct cd : public rtl::StaticAggregate< class_data, ImplClassData9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, WeakImplHelper9<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9> > > {};
00117     public:
00118         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00119             { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
00120         virtual void SAL_CALL acquire() throw ()
00121             { OWeakObject::acquire(); }
00122         virtual void SAL_CALL release() throw ()
00123             { OWeakObject::release(); }
00124         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00125             { return WeakImplHelper_getTypes( cd::get() ); }
00126         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00127             { return ImplHelper_getImplementationId( cd::get() ); }
00128     };
00142     template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
00143     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggImplHelper9
00144         : public OWeakAggObject
00145         , public com::sun::star::lang::XTypeProvider
00146         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
00147     {
00148         struct cd : public rtl::StaticAggregate< class_data, ImplClassData9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, WeakAggImplHelper9<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9> > > {};
00149     public:
00150         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00151             { return OWeakAggObject::queryInterface( rType ); }
00152         virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00153             { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
00154         virtual void SAL_CALL acquire() throw ()
00155             { OWeakAggObject::acquire(); }
00156         virtual void SAL_CALL release() throw ()
00157             { OWeakAggObject::release(); }
00158         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00159             { return WeakAggImplHelper_getTypes( cd::get() ); }
00160         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00161             { return ImplHelper_getImplementationId( cd::get() ); }
00162     };
00179     template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
00180     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper9
00181         : public BaseClass
00182         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
00183     {
00184         struct cd : public rtl::StaticAggregate< class_data, ImplClassData9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, ImplInheritanceHelper9<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9> > > {};
00185     protected:
00186         template< typename T1 >
00187         explicit ImplInheritanceHelper9(T1 const & arg1): BaseClass(arg1) {}
00188         template< typename T1, typename T2 >
00189         ImplInheritanceHelper9(T1 const & arg1, T2 const & arg2):
00190             BaseClass(arg1, arg2) {}
00191         template< typename T1, typename T2, typename T3 >
00192         ImplInheritanceHelper9(
00193             T1 const & arg1, T2 const & arg2, T3 const & arg3):
00194             BaseClass(arg1, arg2, arg3) {}
00195         template< typename T1, typename T2, typename T3, typename T4 >
00196         ImplInheritanceHelper9(
00197             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
00198             BaseClass(arg1, arg2, arg3, arg4) {}
00199         template<
00200             typename T1, typename T2, typename T3, typename T4, typename T5 >
00201         ImplInheritanceHelper9(
00202             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
00203             T5 const & arg5):
00204             BaseClass(arg1, arg2, arg3, arg4, arg5) {}
00205         template<
00206             typename T1, typename T2, typename T3, typename T4, typename T5,
00207             typename T6 >
00208         ImplInheritanceHelper9(
00209             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
00210             T5 const & arg5, T6 const & arg6):
00211             BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
00212     public:
00213         ImplInheritanceHelper9() {}
00214         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00215             {
00216                 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
00217                 if (aRet.hasValue())
00218                     return aRet;
00219                 return BaseClass::queryInterface( rType );
00220             }
00221         virtual void SAL_CALL acquire() throw ()
00222             { BaseClass::acquire(); }
00223         virtual void SAL_CALL release() throw ()
00224             { BaseClass::release(); }
00225         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00226             { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
00227         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00228             { return ImplHelper_getImplementationId( cd::get() ); }
00229     };
00247     template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
00248     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE AggImplInheritanceHelper9
00249         : public BaseClass
00250         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
00251     {
00252         struct cd : public rtl::StaticAggregate< class_data, ImplClassData9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, AggImplInheritanceHelper9<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9> > > {};
00253     protected:
00254         template< typename T1 >
00255         explicit AggImplInheritanceHelper9(T1 const & arg1): BaseClass(arg1) {}
00256         template< typename T1, typename T2 >
00257         AggImplInheritanceHelper9(T1 const & arg1, T2 const & arg2):
00258             BaseClass(arg1, arg2) {}
00259         template< typename T1, typename T2, typename T3 >
00260         AggImplInheritanceHelper9(
00261             T1 const & arg1, T2 const & arg2, T3 const & arg3):
00262             BaseClass(arg1, arg2, arg3) {}
00263         template< typename T1, typename T2, typename T3, typename T4 >
00264         AggImplInheritanceHelper9(
00265             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
00266             BaseClass(arg1, arg2, arg3, arg4) {}
00267         template<
00268             typename T1, typename T2, typename T3, typename T4, typename T5 >
00269         AggImplInheritanceHelper9(
00270             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
00271             T5 const & arg5):
00272             BaseClass(arg1, arg2, arg3, arg4, arg5) {}
00273         template<
00274             typename T1, typename T2, typename T3, typename T4, typename T5,
00275             typename T6 >
00276         AggImplInheritanceHelper9(
00277             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
00278             T5 const & arg5, T6 const & arg6):
00279             BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
00280     public:
00281         AggImplInheritanceHelper9() {}
00282         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00283             { return BaseClass::queryInterface( rType ); }
00284         virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00285             {
00286                 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
00287                 if (aRet.hasValue())
00288                     return aRet;
00289                 return BaseClass::queryAggregation( rType );
00290             }
00291         virtual void SAL_CALL acquire() throw ()
00292             { BaseClass::acquire(); }
00293         virtual void SAL_CALL release() throw ()
00294             { BaseClass::release(); }
00295         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00296             { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
00297         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00298             { return ImplHelper_getImplementationId( cd::get() ); }
00299     };
00300 }
00301 
00302 #endif
00303 
00304 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines