LCOV - code coverage report
Current view: top level - libreoffice/o3tl/qa - cow_wrapper_clients.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 69 75 92.0 %
Date: 2012-12-17 Functions: 33 35 94.3 %
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             : 
      20             : #include "cow_wrapper_clients.hxx"
      21             : 
      22             : namespace o3tltests {
      23             : 
      24             : class cow_wrapper_client2_impl
      25             : {
      26             : public:
      27          12 :     cow_wrapper_client2_impl() : mnValue(0) {}
      28           4 :     explicit cow_wrapper_client2_impl( int nVal ) : mnValue(nVal) {}
      29           8 :     void setValue( int nVal ) { mnValue = nVal; }
      30          12 :     int  getValue() const { return mnValue; }
      31             : 
      32           8 :     bool operator==( const cow_wrapper_client2_impl& rRHS ) const { return mnValue == rRHS.mnValue; }
      33          12 :     bool operator!=( const cow_wrapper_client2_impl& rRHS ) const { return mnValue != rRHS.mnValue; }
      34           8 :     bool operator<( const cow_wrapper_client2_impl& rRHS ) const { return mnValue < rRHS.mnValue; }
      35             : 
      36             : private:
      37             :     int mnValue;
      38             : };
      39             : 
      40           6 : cow_wrapper_client2::cow_wrapper_client2() : maImpl()
      41             : {
      42           6 : }
      43             : 
      44           2 : cow_wrapper_client2::cow_wrapper_client2( int nVal ) :
      45           2 :     maImpl( cow_wrapper_client2_impl(nVal) )
      46             : {
      47           2 : }
      48             : 
      49           8 : cow_wrapper_client2::~cow_wrapper_client2()
      50             : {
      51           8 : }
      52             : 
      53           0 : cow_wrapper_client2::cow_wrapper_client2( const cow_wrapper_client2& rSrc ) :
      54           0 :     maImpl(rSrc.maImpl)
      55             : {
      56           0 : }
      57             : 
      58           6 : cow_wrapper_client2& cow_wrapper_client2::operator=( const cow_wrapper_client2& rSrc )
      59             : {
      60           6 :     maImpl = rSrc.maImpl;
      61             : 
      62           6 :     return *this;
      63             : }
      64             : 
      65           4 : void cow_wrapper_client2::modify( int nVal )
      66             : {
      67           4 :     maImpl->setValue( nVal );
      68           4 : }
      69             : 
      70           6 : int  cow_wrapper_client2::queryUnmodified() const
      71             : {
      72           6 :     return maImpl->getValue();
      73             : }
      74             : 
      75           2 : void cow_wrapper_client2::makeUnique()
      76             : {
      77           2 :     maImpl.make_unique();
      78           2 : }
      79          10 : bool cow_wrapper_client2::is_unique() const
      80             : {
      81          10 :     return maImpl.is_unique();
      82             : }
      83          18 : oslInterlockedCount cow_wrapper_client2::use_count() const
      84             : {
      85          18 :     return maImpl.use_count();
      86             : }
      87           2 : void cow_wrapper_client2::swap( cow_wrapper_client2& r )
      88             : {
      89           2 :     o3tl::swap(maImpl, r.maImpl);
      90           2 : }
      91             : 
      92          12 : bool cow_wrapper_client2::operator==( const cow_wrapper_client2& rRHS ) const
      93             : {
      94          12 :     return maImpl == rRHS.maImpl;
      95             : }
      96           6 : bool cow_wrapper_client2::operator!=( const cow_wrapper_client2& rRHS ) const
      97             : {
      98           6 :     return maImpl != rRHS.maImpl;
      99             : }
     100           4 : bool cow_wrapper_client2::operator<( const cow_wrapper_client2& rRHS ) const
     101             : {
     102           4 :     return maImpl < rRHS.maImpl;
     103             : }
     104             : 
     105             : // ---------------------------------------------------------------------------
     106             : 
     107           6 : cow_wrapper_client3::cow_wrapper_client3() : maImpl()
     108             : {
     109           6 : }
     110             : 
     111           2 : cow_wrapper_client3::cow_wrapper_client3( int nVal ) :
     112           2 :     maImpl( cow_wrapper_client2_impl(nVal) )
     113             : {
     114           2 : }
     115             : 
     116           8 : cow_wrapper_client3::~cow_wrapper_client3()
     117             : {
     118           8 : }
     119             : 
     120           0 : cow_wrapper_client3::cow_wrapper_client3( const cow_wrapper_client3& rSrc ) :
     121           0 :     maImpl(rSrc.maImpl)
     122             : {
     123           0 : }
     124             : 
     125           6 : cow_wrapper_client3& cow_wrapper_client3::operator=( const cow_wrapper_client3& rSrc )
     126             : {
     127           6 :     maImpl = rSrc.maImpl;
     128             : 
     129           6 :     return *this;
     130             : }
     131             : 
     132           4 : void cow_wrapper_client3::modify( int nVal )
     133             : {
     134           4 :     maImpl->setValue( nVal );
     135           4 : }
     136             : 
     137           6 : int  cow_wrapper_client3::queryUnmodified() const
     138             : {
     139           6 :     return maImpl->getValue();
     140             : }
     141             : 
     142           2 : void cow_wrapper_client3::makeUnique()
     143             : {
     144           2 :     maImpl.make_unique();
     145           2 : }
     146          10 : bool cow_wrapper_client3::is_unique() const
     147             : {
     148          10 :     return maImpl.is_unique();
     149             : }
     150          18 : oslInterlockedCount cow_wrapper_client3::use_count() const
     151             : {
     152          18 :     return maImpl.use_count();
     153             : }
     154           2 : void cow_wrapper_client3::swap( cow_wrapper_client3& r )
     155             : {
     156           2 :     o3tl::swap(maImpl, r.maImpl);
     157           2 : }
     158             : 
     159          12 : bool cow_wrapper_client3::operator==( const cow_wrapper_client3& rRHS ) const
     160             : {
     161          12 :     return maImpl == rRHS.maImpl;
     162             : }
     163           6 : bool cow_wrapper_client3::operator!=( const cow_wrapper_client3& rRHS ) const
     164             : {
     165           6 :     return maImpl != rRHS.maImpl;
     166             : }
     167           4 : bool cow_wrapper_client3::operator<( const cow_wrapper_client3& rRHS ) const
     168             : {
     169           4 :     return maImpl < rRHS.maImpl;
     170             : }
     171             : 
     172             : } // namespace o3tltests
     173             : 
     174             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10