LCOV - code coverage report
Current view: top level - include/com/sun/star/uno - Type.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 59 61 96.7 %
Date: 2014-11-03 Functions: 57 60 95.0 %
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 INCLUDED_COM_SUN_STAR_UNO_TYPE_HXX
      20             : #define INCLUDED_COM_SUN_STAR_UNO_TYPE_HXX
      21             : 
      22             : #include <osl/mutex.hxx>
      23             : #include <com/sun/star/uno/Type.h>
      24             : #include <cppu/unotype.hxx>
      25             : 
      26             : namespace com
      27             : {
      28             : namespace sun
      29             : {
      30             : namespace star
      31             : {
      32             : namespace uno
      33             : {
      34             : 
      35             : 
      36    18088041 : inline Type::Type()
      37             : {
      38             :     _pType = reinterpret_cast< const ::com::sun::star::uno::Type * >(
      39    18088041 :         ::typelib_static_type_getByTypeClass( typelib_TypeClass_VOID ) )->getTypeLibType();
      40    18088041 :     ::typelib_typedescriptionreference_acquire( _pType );
      41    18088041 : }
      42             : 
      43      213959 : inline Type::Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName )
      44      213959 :     : _pType( 0 )
      45             : {
      46      213959 :     ::typelib_typedescriptionreference_new( &_pType, (typelib_TypeClass)eTypeClass, rTypeName.pData );
      47      213959 : }
      48             : 
      49             : inline Type::Type( TypeClass eTypeClass, const sal_Char * pTypeName )
      50             :     : _pType( 0 )
      51             : {
      52             :     ::typelib_typedescriptionreference_newByAsciiName( &_pType, (typelib_TypeClass)eTypeClass, pTypeName );
      53             : }
      54             : 
      55     1351048 : inline Type::Type( typelib_TypeDescriptionReference * pType )
      56     1351048 :     : _pType( pType )
      57             : {
      58     1351048 :     ::typelib_typedescriptionreference_acquire( _pType );
      59     1351048 : }
      60             : 
      61             : inline Type::Type( typelib_TypeDescriptionReference * pType, UnoType_NoAcquire )
      62             :     : _pType( pType )
      63             : {
      64             : }
      65             : 
      66             : inline Type::Type( typelib_TypeDescriptionReference * pType, __sal_NoAcquire )
      67             :     : _pType( pType )
      68             : {
      69             : }
      70             : 
      71    40347656 : inline Type::Type( const Type & rType )
      72    40347656 :     : _pType( rType._pType )
      73             : {
      74    40347656 :     ::typelib_typedescriptionreference_acquire( _pType );
      75    40347656 : }
      76             : 
      77     2105344 : inline ::rtl::OUString Type::getTypeName() const
      78             : {
      79     2105344 :     return ::rtl::OUString( _pType->pTypeName );
      80             : }
      81             : 
      82    20008550 : inline Type & Type::operator = ( const Type & rType )
      83             : {
      84    20008550 :     ::typelib_typedescriptionreference_assign( &_pType, rType._pType );
      85    20008550 :     return *this;
      86             : }
      87             : 
      88             : 
      89             : template< class T >
      90             : typelib_TypeDescriptionReference * Array< T >::s_pType = 0;
      91             : 
      92             : }
      93             : }
      94             : }
      95             : }
      96             : 
      97           2 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const ::com::sun::star::uno::Type * )
      98             : {
      99           2 :     return ::cppu::UnoType< ::com::sun::star::uno::Type >::get();
     100             : }
     101             : 
     102      385180 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType()
     103             : {
     104      385180 :     return ::cppu::UnoType< ::cppu::UnoVoidType >::get();
     105             : }
     106       55805 : inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType()
     107             : {
     108       55805 :     return ::cppu::UnoType< ::cppu::UnoVoidType >::get();
     109             : }
     110             : 
     111     4685884 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType()
     112             : {
     113     4685884 :     return ::cppu::UnoType< bool >::get();
     114             : }
     115      248469 : inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType()
     116             : {
     117      248469 :     return ::cppu::UnoType< bool >::get();
     118             : }
     119        9202 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_Bool * )
     120             : {
     121        9202 :     return ::cppu::UnoType< bool >::get();
     122             : }
     123             : 
     124      215370 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType(
     125             :     SAL_UNUSED_PARAMETER bool const * )
     126             : {
     127      215370 :     return ::cppu::UnoType< bool >::get();
     128             : }
     129             : 
     130           0 : inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType()
     131             : {
     132           0 :     return ::cppu::UnoType< ::cppu::UnoCharType >::get();
     133             : }
     134           2 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType()
     135             : {
     136           2 :     return ::cppu::UnoType< ::cppu::UnoCharType >::get();
     137             : }
     138             : 
     139         714 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_Int8 * )
     140             : {
     141         714 :     return ::cppu::UnoType< ::sal_Int8 >::get();
     142             : }
     143             : 
     144       76902 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const ::rtl::OUString * )
     145             : {
     146       76902 :     return ::cppu::UnoType< ::rtl::OUString >::get();
     147             : }
     148             : 
     149       16326 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_Int16 * )
     150             : {
     151       16326 :     return ::cppu::UnoType< ::sal_Int16 >::get();
     152             : }
     153             : 
     154        1176 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_uInt16 * )
     155             : {
     156        1176 :     return ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get();
     157             : }
     158             : 
     159       49907 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_Int32 * )
     160             : {
     161       49907 :     return ::cppu::UnoType< ::sal_Int32 >::get();
     162             : }
     163             : 
     164             : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_uInt32 * )
     165             : {
     166             :     return ::cppu::UnoType< ::sal_uInt32 >::get();
     167             : }
     168             : 
     169         118 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_Int64 * )
     170             : {
     171         118 :     return ::cppu::UnoType< ::sal_Int64 >::get();
     172             : }
     173             : 
     174           2 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const sal_uInt64 * )
     175             : {
     176           2 :     return ::cppu::UnoType< ::sal_uInt64 >::get();
     177             : }
     178             : 
     179        6246 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const float * )
     180             : {
     181        6246 :     return ::cppu::UnoType< float >::get();
     182             : }
     183             : 
     184         800 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARAMETER const double * )
     185             : {
     186         800 :     return ::cppu::UnoType< double >::get();
     187             : }
     188             : 
     189             : template< typename T >
     190         480 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType()
     191             : {
     192         480 :     return ::cppu::UnoType< T >::get();
     193             : }
     194             : 
     195             : template<>
     196          10 : inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType< sal_Unicode >()
     197             : {
     198          10 :     return ::cppu::UnoType< ::cppu::UnoCharType >::get();
     199             : }
     200             : 
     201             : #endif
     202             : 
     203             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10