LCOV - code coverage report
Current view: top level - co - queueItem.cpp (source / functions) Hit Total Coverage
Test: Collage Lines: 14 22 63.6 %
Date: 2016-12-14 01:26:48 Functions: 5 8 62.5 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2012, Daniel Nachbaur <danielnachbaur@gmail.com>
       3             :  *
       4             :  * This file is part of Collage <https://github.com/Eyescale/Collage>
       5             :  *
       6             :  * This library is free software; you can redistribute it and/or modify it under
       7             :  * the terms of the GNU Lesser General Public License version 2.1 as published
       8             :  * by the Free Software Foundation.
       9             :  *
      10             :  * This library is distributed in the hope that it will be useful, but WITHOUT
      11             :  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
      12             :  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
      13             :  * details.
      14             :  *
      15             :  * You should have received a copy of the GNU Lesser General Public License
      16             :  * along with this library; if not, write to the Free Software Foundation, Inc.,
      17             :  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      18             :  */
      19             : 
      20             : #include "queueItem.h"
      21             : 
      22             : #include "queueMaster.h"
      23             : 
      24             : 
      25             : namespace co
      26             : {
      27             : namespace detail
      28             : {
      29             : class QueueItem
      30             : {
      31             : public:
      32           4 :     explicit QueueItem( co::QueueMaster& queueMaster_ )
      33           4 :         : queueMaster( queueMaster_ )
      34           4 :     {}
      35             : 
      36           0 :     QueueItem( const QueueItem& rhs )
      37           0 :         : queueMaster( rhs.queueMaster )
      38           0 :     {}
      39             : 
      40             :     co::QueueMaster& queueMaster;
      41             : };
      42             : }
      43             : 
      44           4 : QueueItem::QueueItem( QueueMaster& master )
      45             :     : DataOStream()
      46           4 :     , _impl( new detail::QueueItem( master ))
      47             : {
      48           4 :     enableSave();
      49           4 :     _enable();
      50           4 : }
      51             : 
      52           0 : QueueItem::QueueItem( const QueueItem& rhs )
      53             :     : DataOStream()
      54           0 :     , _impl( new detail::QueueItem( *rhs._impl ))
      55             : {
      56           0 :     enableSave();
      57           0 :     _enable();
      58           0 : }
      59             : 
      60           8 : QueueItem::~QueueItem()
      61             : {
      62           4 :     _impl->queueMaster._addItem( *this );
      63           4 :     disable();
      64           4 :     delete _impl;
      65           4 : }
      66             : 
      67          66 : }

Generated by: LCOV version 1.11