UDK 3.2.7 C/C++ API Reference

cppuhelper/implbase6.hxx

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /*
00003  * This file is part of the LibreOffice project.
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  *
00009  * This file incorporates work covered by the following license notice:
00010  *
00011  *   Licensed to the Apache Software Foundation (ASF) under one or more
00012  *   contributor license agreements. See the NOTICE file distributed
00013  *   with this work for additional information regarding copyright
00014  *   ownership. The ASF licenses this file to you under the Apache
00015  *   License, Version 2.0 (the "License"); you may not use this file
00016  *   except in compliance with the License. You may obtain a copy of
00017  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
00018  */
00019 #ifndef _CPPUHELPER_IMPLBASE6_HXX_
00020 #define _CPPUHELPER_IMPLBASE6_HXX_
00021 
00022 #include <cppuhelper/implbase_ex.hxx>
00023 #include <rtl/instance.hxx>
00024 
00025 namespace cppu
00026 {
00028 
00029     struct class_data6
00030     {
00031         sal_Int16 m_nTypes;
00032         sal_Bool m_storedTypeRefs;
00033         sal_Bool m_storedId;
00034         sal_Int8 m_id[ 16 ];
00035         type_entry m_typeEntries[ 6 + 1 ];
00036     };
00037 
00038     template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Impl >
00039         struct ImplClassData6
00040     {
00041         class_data* operator ()()
00042         {
00043             static class_data6 s_cd =
00044             {
00045                 6 +1, sal_False, sal_False,
00046                 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
00047                 {
00048                     { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 },
00049                     { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 },
00050                     { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 },
00051                     { { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 },
00052                     { { Ifc5::static_type }, ((sal_IntPtr)(Ifc5 *) (Impl *) 16) - 16 },
00053                     { { Ifc6::static_type }, ((sal_IntPtr)(Ifc6 *) (Impl *) 16) - 16 },
00054                     { { com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 }
00055                 }
00056             };
00057             return reinterpret_cast< class_data * >(&s_cd);
00058         }
00059     };
00060 
00062 
00071     template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
00072     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelper6
00073         : public com::sun::star::lang::XTypeProvider
00074         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
00075     {
00076         struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, ImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {};
00077     public:
00078         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00079             { return ImplHelper_query( rType, cd::get(), this ); }
00080         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00081             { return ImplHelper_getTypes( cd::get() ); }
00082         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00083             { return ImplHelper_getImplementationId( cd::get() ); }
00084 
00085 #if !defined _MSC_VER // public -> protected changes mangled names there
00086     protected:
00087 #endif
00088         ~ImplHelper6() throw () {}
00089     };
00098     template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
00099     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper6
00100         : public OWeakObject
00101         , public com::sun::star::lang::XTypeProvider
00102         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
00103     {
00104         struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, WeakImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {};
00105     public:
00106         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00107             { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
00108         virtual void SAL_CALL acquire() throw ()
00109             { OWeakObject::acquire(); }
00110         virtual void SAL_CALL release() throw ()
00111             { OWeakObject::release(); }
00112         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00113             { return WeakImplHelper_getTypes( cd::get() ); }
00114         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00115             { return ImplHelper_getImplementationId( cd::get() ); }
00116     };
00130     template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
00131     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggImplHelper6
00132         : public OWeakAggObject
00133         , public com::sun::star::lang::XTypeProvider
00134         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
00135     {
00136         struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, WeakAggImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {};
00137     public:
00138         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00139             { return OWeakAggObject::queryInterface( rType ); }
00140         virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00141             { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
00142         virtual void SAL_CALL acquire() throw ()
00143             { OWeakAggObject::acquire(); }
00144         virtual void SAL_CALL release() throw ()
00145             { OWeakAggObject::release(); }
00146         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00147             { return WeakAggImplHelper_getTypes( cd::get() ); }
00148         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00149             { return ImplHelper_getImplementationId( cd::get() ); }
00150     };
00167     template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
00168     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper6
00169         : public BaseClass
00170         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
00171     {
00172         struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, ImplInheritanceHelper6<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {};
00173     protected:
00174         template< typename T1 >
00175         explicit ImplInheritanceHelper6(T1 const & arg1): BaseClass(arg1) {}
00176         template< typename T1, typename T2 >
00177         ImplInheritanceHelper6(T1 const & arg1, T2 const & arg2):
00178             BaseClass(arg1, arg2) {}
00179         template< typename T1, typename T2, typename T3 >
00180         ImplInheritanceHelper6(
00181             T1 const & arg1, T2 const & arg2, T3 const & arg3):
00182             BaseClass(arg1, arg2, arg3) {}
00183         template< typename T1, typename T2, typename T3, typename T4 >
00184         ImplInheritanceHelper6(
00185             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
00186             BaseClass(arg1, arg2, arg3, arg4) {}
00187         template<
00188             typename T1, typename T2, typename T3, typename T4, typename T5 >
00189         ImplInheritanceHelper6(
00190             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
00191             T5 const & arg5):
00192             BaseClass(arg1, arg2, arg3, arg4, arg5) {}
00193         template<
00194             typename T1, typename T2, typename T3, typename T4, typename T5,
00195             typename T6 >
00196         ImplInheritanceHelper6(
00197             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
00198             T5 const & arg5, T6 const & arg6):
00199             BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
00200     public:
00201         ImplInheritanceHelper6() {}
00202         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00203             {
00204                 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
00205                 if (aRet.hasValue())
00206                     return aRet;
00207                 return BaseClass::queryInterface( rType );
00208             }
00209         virtual void SAL_CALL acquire() throw ()
00210             { BaseClass::acquire(); }
00211         virtual void SAL_CALL release() throw ()
00212             { BaseClass::release(); }
00213         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00214             { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
00215         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00216             { return ImplHelper_getImplementationId( cd::get() ); }
00217     };
00235     template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 >
00236     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE AggImplInheritanceHelper6
00237         : public BaseClass
00238         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6
00239     {
00240         struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, AggImplInheritanceHelper6<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {};
00241     protected:
00242         template< typename T1 >
00243         explicit AggImplInheritanceHelper6(T1 const & arg1): BaseClass(arg1) {}
00244         template< typename T1, typename T2 >
00245         AggImplInheritanceHelper6(T1 const & arg1, T2 const & arg2):
00246             BaseClass(arg1, arg2) {}
00247         template< typename T1, typename T2, typename T3 >
00248         AggImplInheritanceHelper6(
00249             T1 const & arg1, T2 const & arg2, T3 const & arg3):
00250             BaseClass(arg1, arg2, arg3) {}
00251         template< typename T1, typename T2, typename T3, typename T4 >
00252         AggImplInheritanceHelper6(
00253             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
00254             BaseClass(arg1, arg2, arg3, arg4) {}
00255         template<
00256             typename T1, typename T2, typename T3, typename T4, typename T5 >
00257         AggImplInheritanceHelper6(
00258             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
00259             T5 const & arg5):
00260             BaseClass(arg1, arg2, arg3, arg4, arg5) {}
00261         template<
00262             typename T1, typename T2, typename T3, typename T4, typename T5,
00263             typename T6 >
00264         AggImplInheritanceHelper6(
00265             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
00266             T5 const & arg5, T6 const & arg6):
00267             BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
00268     public:
00269         AggImplInheritanceHelper6() {}
00270         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00271             { return BaseClass::queryInterface( rType ); }
00272         virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00273             {
00274                 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
00275                 if (aRet.hasValue())
00276                     return aRet;
00277                 return BaseClass::queryAggregation( rType );
00278             }
00279         virtual void SAL_CALL acquire() throw ()
00280             { BaseClass::acquire(); }
00281         virtual void SAL_CALL release() throw ()
00282             { BaseClass::release(); }
00283         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00284             { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
00285         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00286             { return ImplHelper_getImplementationId( cd::get() ); }
00287     };
00288 }
00289 
00290 #endif
00291 
00292 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines