LCOV - code coverage report
Current view: top level - eq/server - channelStopFrameVisitor.h (source / functions) Hit Total Coverage
Test: lcov2.info Lines: 0 12 0.0 %
Date: 2014-06-18 Functions: 0 5 0.0 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2010, Cedric Stalder <cedric.stalder@gmail.com>
       3             :  *               2011, Stefan Eilemann <eile@eyescale.ch>
       4             :  *               2010, Daniel Nachbaur <danielnachbaur@gmail.com>
       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 "channel.h"
      21             : 
      22             : #include "node.h"
      23             : 
      24             : #include <eq/fabric/commands.h>
      25             : 
      26             : 
      27             : namespace eq
      28             : {
      29             : namespace server
      30             : {
      31             : 
      32           0 : class ChannelStopFrameVisitor : public ConfigVisitor
      33             : {
      34             : public:
      35             : 
      36           0 :     ChannelStopFrameVisitor( const uint32_t lastFrameNumber )
      37           0 :         : _lastFrameNumber( lastFrameNumber ) {}
      38             : 
      39           0 :     virtual VisitorResult visit( Channel* channel )
      40             :         {
      41           0 :             if( !channel->isActive() || !channel->isRunning( ))
      42           0 :                 return TRAVERSE_CONTINUE;
      43             : 
      44           0 :             channel->send( fabric::CMD_CHANNEL_STOP_FRAME ) << _lastFrameNumber;
      45           0 :             return TRAVERSE_CONTINUE;
      46             :         }
      47             : 
      48           0 :     virtual VisitorResult visitPost( Node* node )
      49             :         {
      50           0 :             if( node->isRunning() )
      51           0 :                 node->flushSendBuffer();
      52           0 :             return TRAVERSE_CONTINUE;
      53             :         }
      54             : private:
      55             :     const uint32_t _lastFrameNumber;
      56             : };
      57             : 
      58             : }
      59             : }

Generated by: LCOV version 1.10