LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/comphelper - implbase_var.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 53 69 76.8 %
Date: 2012-08-25 Functions: 41 71 57.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 12 28 42.9 %

           Branch data     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                 :            : 
      20                 :            : /** This header generates the following template classes with a variable number
      21                 :            :     of interfaces:
      22                 :            : 
      23                 :            :     comphelper::ImplHelper<N> <typename Ifc1, ..., typename Ifc<N> >
      24                 :            :     comphelper::WeakImplHelper<N> <typename Ifc1, ..., typename Ifc<N> >
      25                 :            :     comphelper::WeakComponentImplHelper<N> <typename Ifc1, ...,
      26                 :            :                                             typename Ifc<N> >
      27                 :            :     comphelper::ImplInheritanceHelper<N> <typename BaseClass,
      28                 :            :                                           typename Ifc1, ..., typename Ifc<N> >
      29                 :            : 
      30                 :            :     as already present in headers cppuhelper/implbase<1-12>.hxx and
      31                 :            :     cppuhelper/compbase<1-12>.hxx.
      32                 :            :     <N> denotes the number of interface types passed as template arguments.
      33                 :            :     Don't use this header for interface numbers up to 12;
      34                 :            :     always use the existing cppuhelper/(impl|comp)base<1-12>.hxx headers
      35                 :            :     for this purpose, which eases debugging.
      36                 :            : 
      37                 :            :     Including this header requires a little discipline, because it has no
      38                 :            :     include guards.  Please use the following external include guard rule
      39                 :            :     where <N> is the number of interface types:
      40                 :            : 
      41                 :            :     #ifndef INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_<N>
      42                 :            :     #define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_<N>
      43                 :            :     #define COMPHELPER_IMPLBASE_INTERFACE_NUMBER <N>
      44                 :            :     #include "comphelper/implbase_var.hxx"
      45                 :            :     #endif
      46                 :            : 
      47                 :            :     Additionally you can
      48                 :            : 
      49                 :            :     #define COMPHELPER_IMPLBASE_MAX_CTOR_ARGS <N>
      50                 :            : 
      51                 :            :     to control the maximum number of templated ctor arguments for the
      52                 :            :     ImplInheritanceHelper<N> classes.
      53                 :            :     The default is a maximum of 6 arguments.
      54                 :            : */
      55                 :            : 
      56                 :            : #ifndef COMPHELPER_IMPLBASE_INTERFACE_NUMBER
      57                 :            : #error "you have to define COMPHELPER_IMPLBASE_INTERFACE_NUMBER prior to including comphelper/implbase_var.hxx!"
      58                 :            : #endif // ! defined(COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
      59                 :            : 
      60                 :            : #if !defined(COMPHELPER_IMPLBASE_TEST_PHASE) && COMPHELPER_IMPLBASE_INTERFACE_NUMBER <= 12
      61                 :            : #error "include proper header file: cppuhelper/implbase<N>.hxx or cppuhelper/compbase<N>.hxx!"
      62                 :            : #endif
      63                 :            : 
      64                 :            : #ifndef COMPHELPER_IMPLBASE_MAX_CTOR_ARGS
      65                 :            : #define COMPHELPER_IMPLBASE_MAX_CTOR_ARGS 6 // default
      66                 :            : #endif
      67                 :            : 
      68                 :            : #include "cppuhelper/implbase_ex.hxx"
      69                 :            : #include "rtl/instance.hxx"
      70                 :            : #include "cppuhelper/compbase_ex.hxx"
      71                 :            : 
      72                 :            : #include "boost/preprocessor/cat.hpp"
      73                 :            : #include "boost/preprocessor/repetition.hpp"
      74                 :            : #include "boost/preprocessor/arithmetic/add.hpp"
      75                 :            : 
      76                 :            : namespace comphelper {
      77                 :            : 
      78                 :            : // Suppress warnings about hidden functions in case any of the IfcN has
      79                 :            : // functions named dispose, addEventListener, or removeEventListener:
      80                 :            : #if defined __SUNPRO_CC
      81                 :            : #pragma disable_warn
      82                 :            : #endif
      83                 :            : 
      84                 :            : namespace detail {
      85                 :            : 
      86                 :            : struct BOOST_PP_CAT(class_data, COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
      87                 :            : {
      88                 :            :     sal_Int16 m_nTypes;
      89                 :            :     sal_Bool m_storedTypeRefs;
      90                 :            :     sal_Bool m_storedId;
      91                 :            :     sal_Int8 m_id[16];
      92                 :            :     ::cppu::type_entry m_typeEntries[COMPHELPER_IMPLBASE_INTERFACE_NUMBER + 1];
      93                 :            : };
      94                 :            : 
      95                 :            : /// @internal
      96                 :            : template < BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER,
      97                 :            :                                 typename Ifc), typename Impl >
      98                 :            : struct BOOST_PP_CAT(ImplClassData, COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
      99                 :            : {
     100                 :        195 :     ::cppu::class_data * operator()() {
     101                 :            :         static BOOST_PP_CAT(class_data, COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
     102                 :            :         s_cd = {
     103                 :            :             COMPHELPER_IMPLBASE_INTERFACE_NUMBER + 1, sal_False, sal_False,
     104                 :            :             { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
     105                 :            :             {
     106                 :            : #define COMPHELPER_IMPLBASE_classdataList(z_, n_, unused_) \
     107                 :            : { { BOOST_PP_CAT(Ifc, n_)::static_type }, \
     108                 :            :   reinterpret_cast<sal_IntPtr>( static_cast< BOOST_PP_CAT(Ifc, n_) * >( \
     109                 :            :                                reinterpret_cast<Impl *>(16) ) ) - 16 },
     110                 :            :                 BOOST_PP_REPEAT(COMPHELPER_IMPLBASE_INTERFACE_NUMBER,
     111                 :            :                                 COMPHELPER_IMPLBASE_classdataList, ~)
     112                 :            : #undef COMPHELPER_IMPLBASE_classdataList
     113                 :            :                 { { ::com::sun::star::lang::XTypeProvider::static_type },
     114                 :            :                   reinterpret_cast<sal_IntPtr>(
     115                 :            :                       static_cast< ::com::sun::star::lang::XTypeProvider * >(
     116                 :            :                           reinterpret_cast<Impl *>(16) ) ) - 16 }
     117                 :            :             }
     118                 :            :         };
     119                 :        195 :         return reinterpret_cast< ::cppu::class_data * >(&s_cd);
     120                 :            :     }
     121                 :            : };
     122                 :            : 
     123                 :            : } // namespace detail
     124                 :            : 
     125                 :            : /** Implementation helper implementing interface
     126                 :            :     ::com::sun::star::lang::XTypeProvider and method
     127                 :            :     XInterface::queryInterface(), but no reference counting.
     128                 :            : 
     129                 :            :     @derive
     130                 :            :     Inherit from this class giving your interface(s) to be implemented as
     131                 :            :     template argument(s).  Your sub class defines method implementations for
     132                 :            :     these interface(s) including acquire()/release() and delegates incoming
     133                 :            :     queryInterface() calls to this base class.
     134                 :            : */
     135                 :            : template< BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER,
     136                 :            :                                typename Ifc) >
     137                 :            : class SAL_NO_VTABLE BOOST_PP_CAT(ImplHelper,
     138                 :            :                                  COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
     139                 :            :     : public ::com::sun::star::lang::XTypeProvider,
     140                 :            :       BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, public Ifc)
     141                 :            : {
     142                 :            :     /// @internal
     143                 :            :     struct cd : public ::rtl::StaticAggregate<
     144                 :            :         ::cppu::class_data,
     145                 :            :         BOOST_PP_CAT(detail::ImplClassData,
     146                 :            :                      COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
     147                 :            :         <
     148                 :            :             BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc),
     149                 :            :             BOOST_PP_CAT(ImplHelper, COMPHELPER_IMPLBASE_INTERFACE_NUMBER)<
     150                 :            :                 BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc)>
     151                 :            :         > > {};
     152                 :            : 
     153                 :            : protected:
     154                 :         96 :     BOOST_PP_CAT(ImplHelper, COMPHELPER_IMPLBASE_INTERFACE_NUMBER)() {}
     155   [ -  +  -  + ]:         96 :     virtual ~BOOST_PP_CAT(ImplHelper, COMPHELPER_IMPLBASE_INTERFACE_NUMBER)() {}
     156                 :            : 
     157                 :            : public:
     158                 :            :     virtual ::com::sun::star::uno::Any
     159                 :       3688 :         SAL_CALL queryInterface( ::com::sun::star::uno::Type const& rType )
     160                 :            :         throw (::com::sun::star::uno::RuntimeException)
     161                 :       3688 :         { return ::cppu::ImplHelper_query( rType, cd::get(), this ); }
     162                 :            :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
     163                 :          2 :         SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
     164                 :          2 :         { return ::cppu::ImplHelper_getTypes( cd::get() ); }
     165                 :            :     virtual ::com::sun::star::uno::Sequence<sal_Int8>
     166                 :          0 :         SAL_CALL getImplementationId()
     167                 :            :         throw (::com::sun::star::uno::RuntimeException)
     168                 :          0 :         { return ::cppu::ImplHelper_getImplementationId( cd::get() ); }
     169                 :            : };
     170                 :            : 
     171                 :            : /** Implementation helper implementing interfaces
     172                 :            :     ::com::sun::star::lang::XTypeProvider and
     173                 :            :     ::com::sun::star::uno::XInterface
     174                 :            :     which supports weak mechanism to be held weakly
     175                 :            :     (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakObject).
     176                 :            : 
     177                 :            :     @derive
     178                 :            :     Inherit from this class giving your interface(s) to be implemented as
     179                 :            :     template argument(s).  Your sub class defines method implementations for
     180                 :            :     these interface(s).
     181                 :            : */
     182                 :            : template< BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER,
     183                 :            :                                typename Ifc) >
     184                 :            : class SAL_NO_VTABLE BOOST_PP_CAT(WeakImplHelper,
     185   [ -  +  -  + ]:       5297 :                                  COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
     186                 :            :     : public ::cppu::OWeakObject,
     187                 :            :       public ::com::sun::star::lang::XTypeProvider,
     188                 :            :       BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, public Ifc)
     189                 :            : {
     190                 :            :     /// @internal
     191                 :            :     struct cd : public ::rtl::StaticAggregate<
     192                 :            :         ::cppu::class_data,
     193                 :            :         BOOST_PP_CAT(detail::ImplClassData,
     194                 :            :                      COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
     195                 :            :         <
     196                 :            :             BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc),
     197                 :            :             BOOST_PP_CAT(WeakImplHelper, COMPHELPER_IMPLBASE_INTERFACE_NUMBER)<
     198                 :            :                 BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc)>
     199                 :            :         > > {};
     200                 :            : 
     201                 :            : public:
     202                 :            :     virtual ::com::sun::star::uno::Any
     203                 :     939151 :         SAL_CALL queryInterface( ::com::sun::star::uno::Type const& rType )
     204                 :            :         throw (::com::sun::star::uno::RuntimeException)
     205                 :            :     {
     206                 :            :         return ::cppu::WeakImplHelper_query(
     207                 :     939151 :             rType, cd::get(), this, static_cast<OWeakObject *>(this) );
     208                 :            :     }
     209                 :     376940 :     virtual void SAL_CALL acquire() throw ()
     210                 :     376940 :         { OWeakObject::acquire(); }
     211                 :     376940 :     virtual void SAL_CALL release() throw ()
     212                 :     376940 :         { OWeakObject::release(); }
     213                 :            :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
     214                 :       1544 :         SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
     215                 :       1544 :         { return ::cppu::WeakImplHelper_getTypes( cd::get() ); }
     216                 :            :     virtual ::com::sun::star::uno::Sequence<sal_Int8>
     217                 :          0 :         SAL_CALL getImplementationId()
     218                 :            :         throw (::com::sun::star::uno::RuntimeException)
     219                 :          0 :         { return ::cppu::ImplHelper_getImplementationId( cd::get() ); }
     220                 :            : };
     221                 :            : 
     222                 :            : /** Implementation helper implementing interfaces
     223                 :            :     ::com::sun::star::lang::XTypeProvider and
     224                 :            :     ::com::sun::star::uno::XInterface inherting from a BaseClass.
     225                 :            : 
     226                 :            :     All acquire() and release() calls are delegated to the BaseClass.
     227                 :            :     Upon queryInterface(), if a demanded interface is not supported by this
     228                 :            :     class directly, the request is delegated to the BaseClass.
     229                 :            : 
     230                 :            :     @attention
     231                 :            :     The BaseClass has to be complete in a sense, that
     232                 :            :     ::com::sun::star::uno::XInterface and
     233                 :            :     ::com::sun::star::lang::XTypeProvider are implemented properly.
     234                 :            :     The BaseClass must have at least one ctor that can be called with
     235                 :            :     COMPHELPER_IMPLBASE_MAX_CTOR_ARGS or fewer arguments.
     236                 :            : 
     237                 :            :     @derive
     238                 :            :     Inherit from this class giving your additional interface(s) to be
     239                 :            :     implemented as template argument(s).  Your sub class defines method
     240                 :            :     implementations for these interface(s).
     241                 :            : */
     242                 :            : template <typename BaseClass,
     243                 :            :           BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER,
     244                 :            :                                typename Ifc) >
     245                 :            : class SAL_NO_VTABLE BOOST_PP_CAT(ImplInheritanceHelper,
     246         [ -  + ]:         86 :                                  COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
     247                 :            :     : public BaseClass,
     248                 :            :       BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, public Ifc)
     249                 :            : {
     250                 :            :     /// @internal
     251                 :            :     struct cd : public ::rtl::StaticAggregate<
     252                 :            :         ::cppu::class_data,
     253                 :            :         BOOST_PP_CAT(detail::ImplClassData,
     254                 :            :                      COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
     255                 :            :         <
     256                 :            :             BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc),
     257                 :            :             BOOST_PP_CAT(ImplInheritanceHelper,
     258                 :            :                          COMPHELPER_IMPLBASE_INTERFACE_NUMBER)<
     259                 :            :                 BaseClass,
     260                 :            :                 BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc)>
     261                 :            :         > > {};
     262                 :            : 
     263                 :            : protected:
     264                 :            : #define COMPHELPER_IMPLBASE_templctor_args(z_, n_, unused_) \
     265                 :            :     BOOST_PP_CAT(T, n_) const& BOOST_PP_CAT(arg, n_)
     266                 :            : #define COMPHELPER_IMPLBASE_templctor(z_, n_, classname_) \
     267                 :            :     template< BOOST_PP_ENUM_PARAMS( BOOST_PP_ADD(n_, 1), typename T) > \
     268                 :            :     explicit BOOST_PP_CAT(classname_, COMPHELPER_IMPLBASE_INTERFACE_NUMBER)( \
     269                 :            :         BOOST_PP_ENUM(BOOST_PP_ADD(n_, 1), \
     270                 :            :                       COMPHELPER_IMPLBASE_templctor_args, ~) ) \
     271                 :            :         : BaseClass( BOOST_PP_ENUM_PARAMS(BOOST_PP_ADD(n_, 1), arg) ) {}
     272                 :            : 
     273                 :         86 :     BOOST_PP_CAT(ImplInheritanceHelper, COMPHELPER_IMPLBASE_INTERFACE_NUMBER)()
     274                 :         86 :         : BaseClass() {}
     275                 :            :     BOOST_PP_REPEAT(COMPHELPER_IMPLBASE_MAX_CTOR_ARGS,
     276                 :            :                     COMPHELPER_IMPLBASE_templctor, ImplInheritanceHelper)
     277                 :            : 
     278                 :            : public:
     279                 :            :     virtual ::com::sun::star::uno::Any
     280                 :       1629 :         SAL_CALL queryInterface( ::com::sun::star::uno::Type const& rType )
     281                 :            :         throw (::com::sun::star::uno::RuntimeException)
     282                 :            :     {
     283                 :            :         ::com::sun::star::uno::Any const aRet(
     284 [ +  - ][ +  - ]:       1629 :             ::cppu::ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
     285         [ +  + ]:       1629 :         if (aRet.hasValue())
     286                 :       1253 :             return aRet;
     287         [ +  - ]:       1629 :         return BaseClass::queryInterface( rType );
     288                 :            :     }
     289                 :       4664 :     virtual void SAL_CALL acquire() throw ()
     290                 :       4664 :         { BaseClass::acquire(); }
     291                 :       4664 :     virtual void SAL_CALL release() throw ()
     292                 :       4664 :         { BaseClass::release(); }
     293                 :            :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
     294                 :          0 :         SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
     295                 :            :     {
     296                 :            :         return ::cppu::ImplInhHelper_getTypes(
     297 [ #  # ][ #  # ]:          0 :             cd::get(), BaseClass::getTypes() );
     298                 :            :     }
     299                 :            :     virtual ::com::sun::star::uno::Sequence<sal_Int8>
     300                 :          0 :         SAL_CALL getImplementationId()
     301                 :            :         throw (::com::sun::star::uno::RuntimeException)
     302                 :          0 :         { return ::cppu::ImplHelper_getImplementationId( cd::get() ); }
     303                 :            : };
     304                 :            : 
     305                 :            : // not needed anymore:
     306                 :            : #undef COMPHELPER_IMPLBASE_templctor_args
     307                 :            : #undef COMPHELPER_IMPLBASE_templctor
     308                 :            : 
     309                 :            : /** Implementation helper supporting
     310                 :            :     ::com::sun::star::lang::XTypeProvider and
     311                 :            :     ::com::sun::star::lang::XComponent.
     312                 :            : 
     313                 :            :     Upon disposing objects of this class, sub-classes receive a disposing()
     314                 :            :     call.  Objects of this class can be held weakly, i.e. by a
     315                 :            :     ::com::sun::star::uno::WeakReference.
     316                 :            : 
     317                 :            :     @attention
     318                 :            :     The life-cycle of the passed mutex reference has to be longer than objects
     319                 :            :     of this class.
     320                 :            : 
     321                 :            :     @derive
     322                 :            :     Inherit from this class giving your interface(s) to be implemented as
     323                 :            :     template argument(s).  Your sub class defines method implementations for
     324                 :            :     these interface(s).
     325                 :            : */
     326                 :            : template < BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER,
     327                 :            :                                 typename Ifc) >
     328                 :            : class SAL_NO_VTABLE BOOST_PP_CAT(WeakComponentImplHelper,
     329         [ -  + ]:         17 :                                  COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
     330                 :            :     : public ::cppu::WeakComponentImplHelperBase,
     331                 :            :       public ::com::sun::star::lang::XTypeProvider,
     332                 :            :       BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, public Ifc)
     333                 :            : {
     334                 :            :     /// @internal
     335                 :            :     struct cd : public ::rtl::StaticAggregate<
     336                 :            :         ::cppu::class_data,
     337                 :            :         BOOST_PP_CAT(detail::ImplClassData,
     338                 :            :                      COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
     339                 :            :         <
     340                 :            :             BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc),
     341                 :            :             BOOST_PP_CAT(WeakComponentImplHelper,
     342                 :            :                          COMPHELPER_IMPLBASE_INTERFACE_NUMBER)<
     343                 :            :                 BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc)>
     344                 :            :         > > {};
     345                 :            : 
     346                 :            : public:
     347                 :         20 :     BOOST_PP_CAT(WeakComponentImplHelper, COMPHELPER_IMPLBASE_INTERFACE_NUMBER)(
     348                 :         20 :         ::osl::Mutex & rMutex ) : WeakComponentImplHelperBase(rMutex) {}
     349                 :            : 
     350                 :            :     virtual ::com::sun::star::uno::Any
     351                 :        247 :         SAL_CALL queryInterface( ::com::sun::star::uno::Type const& rType )
     352                 :            :         throw (::com::sun::star::uno::RuntimeException)
     353                 :            :     {
     354                 :            :         return ::cppu::WeakComponentImplHelper_query(
     355                 :            :             rType, cd::get(), this,
     356                 :        247 :             static_cast< ::cppu::WeakComponentImplHelperBase * >(this) );
     357                 :            :     }
     358                 :       1508 :     virtual void SAL_CALL acquire() throw ()
     359                 :       1508 :         { WeakComponentImplHelperBase::acquire(); }
     360                 :       1469 :     virtual void SAL_CALL release() throw ()
     361                 :       1469 :         { WeakComponentImplHelperBase::release(); }
     362                 :            :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
     363                 :          0 :         SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
     364                 :          0 :         { return ::cppu::WeakComponentImplHelper_getTypes( cd::get() ); }
     365                 :            :     virtual ::com::sun::star::uno::Sequence<sal_Int8>
     366                 :          0 :         SAL_CALL getImplementationId()
     367                 :            :         throw (::com::sun::star::uno::RuntimeException)
     368                 :          0 :         { return ::cppu::ImplHelper_getImplementationId( cd::get() ); }
     369                 :            : 
     370                 :            :     // implement XComponent directly avoiding ambiguities:
     371                 :         17 :     virtual void SAL_CALL dispose()
     372                 :            :         throw (::com::sun::star::uno::RuntimeException)
     373                 :         17 :         { WeakComponentImplHelperBase::dispose(); }
     374                 :          2 :     virtual void SAL_CALL addEventListener(
     375                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener>
     376                 :            :         const & xListener ) throw (::com::sun::star::uno::RuntimeException)
     377                 :          2 :         { WeakComponentImplHelperBase::addEventListener( xListener ); }
     378                 :          2 :     virtual void SAL_CALL removeEventListener(
     379                 :            :         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener>
     380                 :            :         const & xListener ) throw (::com::sun::star::uno::RuntimeException)
     381                 :          2 :         { WeakComponentImplHelperBase::removeEventListener( xListener ); }
     382                 :            : };
     383                 :            : 
     384                 :            : template < BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER,
     385                 :            :                                 typename Ifc) >
     386                 :            : class SAL_NO_VTABLE BOOST_PP_CAT(PartialWeakComponentImplHelper,
     387   [ #  #  -  + ]:        186 :                                  COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
     388                 :            :     : public ::cppu::WeakComponentImplHelperBase,
     389                 :            :       public ::com::sun::star::lang::XTypeProvider,
     390                 :            :       BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, public Ifc)
     391                 :            : {
     392                 :            :     /// @internal
     393                 :            :     struct cd : public ::rtl::StaticAggregate<
     394                 :            :         ::cppu::class_data,
     395                 :            :         BOOST_PP_CAT(detail::ImplClassData,
     396                 :            :                      COMPHELPER_IMPLBASE_INTERFACE_NUMBER)
     397                 :            :         <
     398                 :            :             BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc),
     399                 :            :             BOOST_PP_CAT(PartialWeakComponentImplHelper,
     400                 :            :                          COMPHELPER_IMPLBASE_INTERFACE_NUMBER)<
     401                 :            :                 BOOST_PP_ENUM_PARAMS(COMPHELPER_IMPLBASE_INTERFACE_NUMBER, Ifc)>
     402                 :            :         > > {};
     403                 :            : 
     404                 :            : public:
     405                 :        186 :     BOOST_PP_CAT(PartialWeakComponentImplHelper, COMPHELPER_IMPLBASE_INTERFACE_NUMBER)(
     406                 :        186 :         ::osl::Mutex & rMutex ) : WeakComponentImplHelperBase(rMutex) {}
     407                 :            : 
     408                 :            :     virtual ::com::sun::star::uno::Any
     409                 :      20312 :         SAL_CALL queryInterface( ::com::sun::star::uno::Type const& rType )
     410                 :            :         throw (::com::sun::star::uno::RuntimeException)
     411                 :            :     {
     412                 :            :         return ::cppu::WeakComponentImplHelper_query(
     413                 :            :             rType, cd::get(), this,
     414                 :      20312 :             static_cast< ::cppu::WeakComponentImplHelperBase * >(this) );
     415                 :            :     }
     416                 :      53993 :     virtual void SAL_CALL acquire() throw ()
     417                 :      53993 :         { WeakComponentImplHelperBase::acquire(); }
     418                 :      53992 :     virtual void SAL_CALL release() throw ()
     419                 :      53992 :         { WeakComponentImplHelperBase::release(); }
     420                 :            :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
     421                 :          0 :         SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
     422                 :          0 :         { return ::cppu::WeakComponentImplHelper_getTypes( cd::get() ); }
     423                 :            :     virtual ::com::sun::star::uno::Sequence<sal_Int8>
     424                 :          0 :         SAL_CALL getImplementationId()
     425                 :            :         throw (::com::sun::star::uno::RuntimeException)
     426                 :          0 :         { return ::cppu::ImplHelper_getImplementationId( cd::get() ); }
     427                 :            : };
     428                 :            : 
     429                 :            : 
     430                 :            : } // namespace comphelper
     431                 :            : 
     432                 :            : // undef for multiple use/inclusion of this header:
     433                 :            : #undef COMPHELPER_IMPLBASE_MAX_CTOR_ARGS
     434                 :            : #undef COMPHELPER_IMPLBASE_INTERFACE_NUMBER
     435                 :            : 
     436                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10