LCOV - code coverage report
Current view: top level - libreoffice/solver/unxlngi6.pro/inc/cppuhelper - implbase9.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 29 42 69.0 %
Date: 2012-12-27 Functions: 21 44 47.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : #ifndef _CPPUHELPER_IMPLBASE9_HXX_
      20             : #define _CPPUHELPER_IMPLBASE9_HXX_
      21             : 
      22             : #include <cppuhelper/implbase_ex.hxx>
      23             : #include <rtl/instance.hxx>
      24             : 
      25             : namespace cppu
      26             : {
      27             :     /// @cond INTERNAL
      28             : 
      29             :     struct class_data9
      30             :     {
      31             :         sal_Int16 m_nTypes;
      32             :         sal_Bool m_storedTypeRefs;
      33             :         sal_Bool m_storedId;
      34             :         sal_Int8 m_id[ 16 ];
      35             :         type_entry m_typeEntries[ 9 + 1 ];
      36             :     };
      37             : 
      38             :     template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Ifc7, typename Ifc8, typename Ifc9, typename Impl >
      39             :     struct ImplClassData9
      40             :     {
      41          47 :         class_data* operator ()()
      42             :         {
      43             :             static class_data9 s_cd =
      44             :             {
      45             :                 9 +1, sal_False, sal_False,
      46             :                 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
      47             :                 {
      48             :                     { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 },
      49             :                     { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 },
      50             :                     { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 },
      51             :                     { { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 },
      52             :                     { { Ifc5::static_type }, ((sal_IntPtr)(Ifc5 *) (Impl *) 16) - 16 },
      53             :                     { { Ifc6::static_type }, ((sal_IntPtr)(Ifc6 *) (Impl *) 16) - 16 },
      54             :                     { { Ifc7::static_type }, ((sal_IntPtr)(Ifc7 *) (Impl *) 16) - 16 },
      55             :                     { { Ifc8::static_type }, ((sal_IntPtr)(Ifc8 *) (Impl *) 16) - 16 },
      56             :                     { { Ifc9::static_type }, ((sal_IntPtr)(Ifc9 *) (Impl *) 16) - 16 },
      57             :                     { { com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 }
      58             :                 }
      59             :             };
      60          47 :             return reinterpret_cast< class_data * >(&s_cd);
      61             :         }
      62             :     };
      63             : 
      64             :     /// @endcond
      65             : 
      66             :     /** Implementation helper implementing interface com::sun::star::lang::XTypeProvider
      67             :         and method XInterface::queryInterface(), but no reference counting.
      68             : 
      69             :         @derive
      70             :         Inherit from this class giving your interface(s) to be implemented as template argument(s).
      71             :         Your sub class defines method implementations for these interface(s) including acquire()/
      72             :         release() and delegates incoming queryInterface() calls to this base class.
      73             :     */
      74             :     template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
      75             :     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelper9
      76             :         : public com::sun::star::lang::XTypeProvider
      77             :         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
      78             :     {
      79             :         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> > > {};
      80             :     public:
      81             :         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
      82             :             { return ImplHelper_query( rType, cd::get(), this ); }
      83             :         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
      84             :             { return ImplHelper_getTypes( cd::get() ); }
      85             :         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
      86             :             { return ImplHelper_getImplementationId( cd::get() ); }
      87             : 
      88             : #if !defined _MSC_VER // public -> protected changes mangled names there
      89             :     protected:
      90             : #endif
      91             :         ~ImplHelper9() throw () {}
      92             :     };
      93             :     /** Implementation helper implementing interfaces com::sun::star::lang::XTypeProvider and
      94             :         com::sun::star::uno::XInterface which supports weak mechanism to be held weakly
      95             :         (supporting com::sun::star::uno::XWeak thru ::cppu::OWeakObject).
      96             : 
      97             :         @derive
      98             :         Inherit from this class giving your interface(s) to be implemented as template argument(s).
      99             :         Your sub class defines method implementations for these interface(s).
     100             :     */
     101             :     template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
     102         293 :     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper9
     103             :         : public OWeakObject
     104             :         , public com::sun::star::lang::XTypeProvider
     105             :         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
     106             :     {
     107             :         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> > > {};
     108             :     public:
     109       10485 :         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
     110       10485 :             { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
     111      101728 :         virtual void SAL_CALL acquire() throw ()
     112      101728 :             { OWeakObject::acquire(); }
     113      100656 :         virtual void SAL_CALL release() throw ()
     114      100656 :             { OWeakObject::release(); }
     115           0 :         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
     116           0 :             { return WeakImplHelper_getTypes( cd::get() ); }
     117           0 :         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
     118           0 :             { return ImplHelper_getImplementationId( cd::get() ); }
     119             :     };
     120             :     /** Implementation helper implementing interfaces com::sun::star::lang::XTypeProvider and
     121             :         com::sun::star::uno::XInterface which supports weak mechanism to be held weakly
     122             :         (supporting com::sun::star::uno::XWeak thru ::cppu::OWeakAggObject).
     123             :         In addition, it supports also aggregation meaning object of this class can be aggregated
     124             :         (com::sun::star::uno::XAggregation thru ::cppu::OWeakAggObject).
     125             :         If a delegator is set (this object is aggregated), then incoming queryInterface()
     126             :         calls are delegated to the delegator object. If the delegator does not support the
     127             :         demanded interface, it calls queryAggregation() on its aggregated objects.
     128             : 
     129             :         @derive
     130             :         Inherit from this class giving your interface(s) to be implemented as template argument(s).
     131             :         Your sub class defines method implementations for these interface(s).
     132             :     */
     133             :     template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
     134          11 :     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggImplHelper9
     135             :         : public OWeakAggObject
     136             :         , public com::sun::star::lang::XTypeProvider
     137             :         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
     138             :     {
     139             :         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> > > {};
     140             :     public:
     141          33 :         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
     142          33 :             { return OWeakAggObject::queryInterface( rType ); }
     143          22 :         virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
     144          22 :             { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
     145         137 :         virtual void SAL_CALL acquire() throw ()
     146         137 :             { OWeakAggObject::acquire(); }
     147         116 :         virtual void SAL_CALL release() throw ()
     148         116 :             { OWeakAggObject::release(); }
     149           0 :         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
     150           0 :             { return WeakAggImplHelper_getTypes( cd::get() ); }
     151           0 :         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
     152           0 :             { return ImplHelper_getImplementationId( cd::get() ); }
     153             :     };
     154             :     /** Implementation helper implementing interfaces com::sun::star::lang::XTypeProvider and
     155             :         com::sun::star::uno::XInterface inherting from a BaseClass.
     156             :         All acquire() and release() calls are delegated to the BaseClass. Upon queryInterface(),
     157             :         if a demanded interface is not supported by this class directly, the request is
     158             :         delegated to the BaseClass.
     159             : 
     160             :         @attention
     161             :         The BaseClass has to be complete in a sense, that com::sun::star::uno::XInterface
     162             :         and com::sun::star::lang::XTypeProvider are implemented properly.  The
     163             :         BaseClass must have at least one ctor that can be called with six or
     164             :         fewer arguments, of which none is of non-const reference type.
     165             : 
     166             :         @derive
     167             :         Inherit from this class giving your additional interface(s) to be implemented as
     168             :         template argument(s). Your sub class defines method implementations for these interface(s).
     169             :     */
     170             :     template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
     171         359 :     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper9
     172             :         : public BaseClass
     173             :         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
     174             :     {
     175             :         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> > > {};
     176             :     protected:
     177             :         template< typename T1 >
     178           0 :         explicit ImplInheritanceHelper9(T1 const & arg1): BaseClass(arg1) {}
     179             :         template< typename T1, typename T2 >
     180             :         ImplInheritanceHelper9(T1 const & arg1, T2 const & arg2):
     181             :             BaseClass(arg1, arg2) {}
     182             :         template< typename T1, typename T2, typename T3 >
     183             :         ImplInheritanceHelper9(
     184             :             T1 const & arg1, T2 const & arg2, T3 const & arg3):
     185             :             BaseClass(arg1, arg2, arg3) {}
     186             :         template< typename T1, typename T2, typename T3, typename T4 >
     187             :         ImplInheritanceHelper9(
     188             :             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
     189             :             BaseClass(arg1, arg2, arg3, arg4) {}
     190             :         template<
     191             :             typename T1, typename T2, typename T3, typename T4, typename T5 >
     192             :         ImplInheritanceHelper9(
     193             :             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
     194             :             T5 const & arg5):
     195             :             BaseClass(arg1, arg2, arg3, arg4, arg5) {}
     196             :         template<
     197             :             typename T1, typename T2, typename T3, typename T4, typename T5,
     198             :             typename T6 >
     199             :         ImplInheritanceHelper9(
     200             :             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
     201             :             T5 const & arg5, T6 const & arg6):
     202             :             BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
     203             :     public:
     204        3768 :         ImplInheritanceHelper9() {}
     205       86764 :         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
     206             :             {
     207       86764 :                 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
     208       86764 :                 if (aRet.hasValue())
     209       36557 :                     return aRet;
     210       50207 :                 return BaseClass::queryInterface( rType );
     211             :             }
     212      233543 :         virtual void SAL_CALL acquire() throw ()
     213      233543 :             { BaseClass::acquire(); }
     214      227815 :         virtual void SAL_CALL release() throw ()
     215      227815 :             { BaseClass::release(); }
     216           0 :         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
     217           0 :             { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
     218           0 :         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
     219           0 :             { return ImplHelper_getImplementationId( cd::get() ); }
     220             :     };
     221             :     /** Implementation helper implementing interfaces com::sun::star::lang::XTypeProvider and
     222             :         com::sun::star::uno::XInterface inherting from a BaseClass.
     223             :         All acquire(),  release() and queryInterface() calls are delegated to the BaseClass.
     224             :         Upon queryAggregation(), if a demanded interface is not supported by this class directly,
     225             :         the request is delegated to the BaseClass.
     226             : 
     227             :         @attention
     228             :         The BaseClass has to be complete in a sense, that com::sun::star::uno::XInterface,
     229             :         com::sun::star::uno::XAggregation and com::sun::star::lang::XTypeProvider
     230             :         are implemented properly.  The BaseClass must have at least one ctor
     231             :         that can be called with six or fewer arguments, of which none is of
     232             :         non-const reference type.
     233             : 
     234             :         @derive
     235             :         Inherit from this class giving your additional interface(s) to be implemented as
     236             :         template argument(s). Your sub class defines method implementations for these interface(s).
     237             :     */
     238             :     template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 >
     239             :     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE AggImplInheritanceHelper9
     240             :         : public BaseClass
     241             :         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9
     242             :     {
     243             :         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> > > {};
     244             :     protected:
     245             :         template< typename T1 >
     246             :         explicit AggImplInheritanceHelper9(T1 const & arg1): BaseClass(arg1) {}
     247             :         template< typename T1, typename T2 >
     248             :         AggImplInheritanceHelper9(T1 const & arg1, T2 const & arg2):
     249             :             BaseClass(arg1, arg2) {}
     250             :         template< typename T1, typename T2, typename T3 >
     251             :         AggImplInheritanceHelper9(
     252             :             T1 const & arg1, T2 const & arg2, T3 const & arg3):
     253             :             BaseClass(arg1, arg2, arg3) {}
     254             :         template< typename T1, typename T2, typename T3, typename T4 >
     255             :         AggImplInheritanceHelper9(
     256             :             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
     257             :             BaseClass(arg1, arg2, arg3, arg4) {}
     258             :         template<
     259             :             typename T1, typename T2, typename T3, typename T4, typename T5 >
     260             :         AggImplInheritanceHelper9(
     261             :             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
     262             :             T5 const & arg5):
     263             :             BaseClass(arg1, arg2, arg3, arg4, arg5) {}
     264             :         template<
     265             :             typename T1, typename T2, typename T3, typename T4, typename T5,
     266             :             typename T6 >
     267             :         AggImplInheritanceHelper9(
     268             :             T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
     269             :             T5 const & arg5, T6 const & arg6):
     270             :             BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
     271             :     public:
     272             :         AggImplInheritanceHelper9() {}
     273             :         virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
     274             :             { return BaseClass::queryInterface( rType ); }
     275             :         virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
     276             :             {
     277             :                 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
     278             :                 if (aRet.hasValue())
     279             :                     return aRet;
     280             :                 return BaseClass::queryAggregation( rType );
     281             :             }
     282             :         virtual void SAL_CALL acquire() throw ()
     283             :             { BaseClass::acquire(); }
     284             :         virtual void SAL_CALL release() throw ()
     285             :             { BaseClass::release(); }
     286             :         virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
     287             :             { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
     288             :         virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
     289             :             { return ImplHelper_getImplementationId( cd::get() ); }
     290             :     };
     291             : }
     292             : 
     293             : #endif
     294             : 
     295             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10