LCOV - code coverage report
Current view: top level - eq - eventICommand.cpp (source / functions) Hit Total Coverage
Test: Equalizer Lines: 19 22 86.4 %
Date: 2016-07-30 05:04:55 Functions: 8 10 80.0 %

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

Generated by: LCOV version 1.11