LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/cppuhelper - compbase8.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 30 36 83.3 %
Date: 2012-08-25 Functions: 30 84 35.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 2 4 50.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _CPPUHELPER_COMPBASE8_HXX_
      29                 :            : #define _CPPUHELPER_COMPBASE8_HXX_
      30                 :            : 
      31                 :            : #include <cppuhelper/implbase8.hxx>
      32                 :            : #include <cppuhelper/compbase_ex.hxx>
      33                 :            : 
      34                 :            : namespace cppu
      35                 :            : {
      36                 :            : 
      37                 :            : // Suppress warnings about hidden functions in case any of the IfcN has
      38                 :            : // functions named dispose, addEventListener, or removeEventListener:
      39                 :            : #if defined __SUNPRO_CC
      40                 :            : #pragma disable_warn
      41                 :            : #endif
      42                 :            : 
      43                 :            :     /** Implementation helper supporting com::sun::star::lang::XTypeProvider and
      44                 :            :         com::sun::star::lang::XComponent.
      45                 :            : 
      46                 :            :         Upon disposing objects of this class, sub-classes receive a disposing()
      47                 :            :         call.  Objects of this class can be held weakly, i.e. by a
      48                 :            :         com::sun::star::uno::WeakReference.
      49                 :            : 
      50                 :            :         @attention
      51                 :            :         The life-cycle of the passed mutex reference has to be longer than objects of this class.
      52                 :            : 
      53                 :            :         @derive
      54                 :            :         Inherit from this class giving your interface(s) to be implemented as template argument(s).
      55                 :            :         Your sub class defines method implementations for these interface(s).
      56                 :            :     */
      57                 :            :     template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 >
      58         [ -  + ]:      12991 :     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakComponentImplHelper8
      59                 :            :         : public WeakComponentImplHelperBase
      60                 :            :         , public ::com::sun::star::lang::XTypeProvider
      61                 :            :         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8
      62                 :            :     {
      63                 :            :         struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, WeakComponentImplHelper8<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {};
      64                 :            :     public:
      65                 :      13264 :         inline WeakComponentImplHelper8( ::osl::Mutex & rMutex ) throw ()
      66                 :      13264 :             : WeakComponentImplHelperBase( rMutex )
      67                 :      13264 :             {}
      68                 :    1122203 :         virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
      69                 :    1122203 :             { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); }
      70                 :    5755340 :         virtual void SAL_CALL acquire() throw ()
      71                 :    5755340 :             { WeakComponentImplHelperBase::acquire(); }
      72                 :    5731970 :         virtual void SAL_CALL release() throw ()
      73                 :    5731970 :             { WeakComponentImplHelperBase::release(); }
      74                 :      13262 :         virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException)
      75                 :      13262 :             { WeakComponentImplHelperBase::dispose(); }
      76                 :          4 :         virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException)
      77                 :          4 :             { WeakComponentImplHelperBase::addEventListener(xListener); }
      78                 :          0 :         virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException)
      79                 :          0 :             { WeakComponentImplHelperBase::removeEventListener(xListener); }
      80                 :        437 :         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
      81                 :        437 :             { return WeakComponentImplHelper_getTypes( cd::get() ); }
      82                 :        437 :         virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
      83                 :        437 :             { return ImplHelper_getImplementationId( cd::get() ); }
      84                 :            :     };
      85                 :            : 
      86                 :            : #if defined __SUNPRO_CC
      87                 :            : #pragma enable_warn
      88                 :            : #endif
      89                 :            : 
      90                 :            :     /** Same as WeakComponentImplHelper8, except doesn't implement
      91                 :            :         addEventListener, removeEventListener and dispose.
      92                 :            : 
      93                 :            :         This requires derived classes to implement those three methods.
      94                 :            :         This makes it possible to implement classes which are required to
      95                 :            :         implement methods from multiple bases which have different
      96                 :            :         addEventListener/removeEventListener signatures without triggering
      97                 :            :         the g++ overloaded-virtual warning
      98                 :            :     */
      99                 :            :     template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 >
     100                 :            :     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE PartialWeakComponentImplHelper8
     101                 :            :         : public WeakComponentImplHelperBase
     102                 :            :         , public ::com::sun::star::lang::XTypeProvider
     103                 :            :         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8
     104                 :            :     {
     105                 :            :         struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, PartialWeakComponentImplHelper8<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {};
     106                 :            :     public:
     107                 :            :         inline PartialWeakComponentImplHelper8( ::osl::Mutex & rMutex ) throw ()
     108                 :            :             : WeakComponentImplHelperBase( rMutex )
     109                 :            :             {}
     110                 :            :         virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
     111                 :            :             { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); }
     112                 :            :         virtual void SAL_CALL acquire() throw ()
     113                 :            :             { WeakComponentImplHelperBase::acquire(); }
     114                 :            :         virtual void SAL_CALL release() throw ()
     115                 :            :             { WeakComponentImplHelperBase::release(); }
     116                 :            :         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
     117                 :            :             { return WeakComponentImplHelper_getTypes( cd::get() ); }
     118                 :            :         virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
     119                 :            :             { return ImplHelper_getImplementationId( cd::get() ); }
     120                 :            :     };
     121                 :            : 
     122                 :            :     /** Implementation helper supporting com::sun::star::lang::XTypeProvider and
     123                 :            :         com::sun::star::lang::XComponent.
     124                 :            : 
     125                 :            :         Upon disposing objects of this class, sub-classes receive a disposing()
     126                 :            :         call.  Objects of this class can be held weakly, i.e. by a
     127                 :            :         com::sun::star::uno::WeakReference.  Object of this class can be
     128                 :            :         aggregated, i.e. incoming queryInterface() calls are delegated.
     129                 :            : 
     130                 :            :         @attention
     131                 :            :         The life-cycle of the passed mutex reference has to be longer than objects of this class.
     132                 :            : 
     133                 :            :         @derive
     134                 :            :         Inherit from this class giving your interface(s) to be implemented as template argument(s).
     135                 :            :         Your sub class defines method implementations for these interface(s).
     136                 :            : 
     137                 :            :         @deprecated
     138                 :            :     */
     139                 :            :     template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 >
     140         [ -  + ]:        122 :     class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggComponentImplHelper8
     141                 :            :         : public WeakAggComponentImplHelperBase
     142                 :            :         , public ::com::sun::star::lang::XTypeProvider
     143                 :            :         , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8
     144                 :            :     {
     145                 :            :         struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, WeakAggComponentImplHelper8<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {};
     146                 :            :     public:
     147                 :        122 :         inline WeakAggComponentImplHelper8( ::osl::Mutex & rMutex ) throw ()
     148                 :        122 :             : WeakAggComponentImplHelperBase( rMutex )
     149                 :        122 :             {}
     150                 :        240 :         virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
     151                 :        240 :             { return WeakAggComponentImplHelperBase::queryInterface( rType ); }
     152                 :        240 :         virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
     153                 :        240 :             { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); }
     154                 :       1330 :         virtual void SAL_CALL acquire() throw ()
     155                 :       1330 :             { WeakAggComponentImplHelperBase::acquire(); }
     156                 :       1330 :         virtual void SAL_CALL release() throw ()
     157                 :       1330 :             { WeakAggComponentImplHelperBase::release(); }
     158                 :          0 :         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException)
     159                 :          0 :             { return WeakAggComponentImplHelper_getTypes( cd::get() ); }
     160                 :          0 :         virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException)
     161                 :          0 :             { return ImplHelper_getImplementationId( cd::get() ); }
     162                 :            :     };
     163                 :            : }
     164                 :            : 
     165                 :            : #endif
     166                 :            : 
     167                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10