LCOV - code coverage report
Current view: top level - eq/server - channelStopFrameVisitor.h (source / functions) Hit Total Coverage
Test: Equalizer Lines: 0 13 0.0 %
Date: 2017-12-16 05:07:20 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             : namespace eq
      27             : {
      28             : namespace server
      29             : {
      30           0 : class ChannelStopFrameVisitor : public ConfigVisitor
      31             : {
      32             : public:
      33           0 :     explicit ChannelStopFrameVisitor(const uint32_t lastFrameNumber)
      34           0 :         : _lastFrameNumber(lastFrameNumber)
      35             :     {
      36           0 :     }
      37             : 
      38           0 :     virtual VisitorResult visit(Channel* channel)
      39             :     {
      40           0 :         if (!channel->isActive() || !channel->isRunning())
      41           0 :             return TRAVERSE_CONTINUE;
      42             : 
      43           0 :         channel->send(fabric::CMD_CHANNEL_STOP_FRAME) << _lastFrameNumber;
      44           0 :         return TRAVERSE_CONTINUE;
      45             :     }
      46             : 
      47           0 :     virtual VisitorResult visitPost(Node* node)
      48             :     {
      49           0 :         if (node->isRunning())
      50           0 :             node->flushSendBuffer();
      51           0 :         return TRAVERSE_CONTINUE;
      52             :     }
      53             : 
      54             : private:
      55             :     const uint32_t _lastFrameNumber;
      56             : };
      57             : }
      58             : }

Generated by: LCOV version 1.11