LCOV - code coverage report
Current view: top level - co - nullCM.h (source / functions) Hit Total Coverage
Test: Collage Lines: 4 15 26.7 %
Date: 2016-12-14 01:26:48 Functions: 5 12 41.7 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2007-2016, Stefan Eilemann <eile@equalizergraphics.com>
       3             :  *                          Daniel Nachbaur <danielnachbaur@gmail.com>
       4             :  *
       5             :  * This file is part of Collage <https://github.com/Eyescale/Collage>
       6             :  *
       7             :  * This library is free software; you can redistribute it and/or modify it under
       8             :  * the terms of the GNU Lesser General Public License version 2.1 as published
       9             :  * by the Free Software Foundation.
      10             :  *
      11             :  * This library is distributed in the hope that it will be useful, but WITHOUT
      12             :  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
      13             :  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
      14             :  * details.
      15             :  *
      16             :  * You should have received a copy of the GNU Lesser General Public License
      17             :  * along with this library; if not, write to the Free Software Foundation, Inc.,
      18             :  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      19             :  */
      20             : 
      21             : #ifndef CO_NULLCM_H
      22             : #define CO_NULLCM_H
      23             : 
      24             : #include "objectCM.h"    // base class
      25             : 
      26             : namespace co
      27             : {
      28             : class Node;
      29             : 
      30             : /**
      31             :  * The NOP object change manager for unmapped objects.
      32             :  * @internal
      33             :  */
      34             : class NullCM : public ObjectCM
      35             : {
      36             : public:
      37          22 :     NullCM() : ObjectCM( 0 ) {}
      38          44 :     virtual ~NullCM() {}
      39             : 
      40          29 :     void init() override {}
      41             : 
      42           0 :     void push( const uint128_t&, const uint128_t&,
      43           0 :                const Nodes& ) override { LBDONTCALL; }
      44           0 :     bool sendSync( const MasterCMCommand& ) override
      45           0 :         { LBDONTCALL; return false; }
      46             : 
      47           0 :     uint128_t getHeadVersion() const override { return VERSION_NONE; }
      48           0 :     uint128_t getVersion() const override { return VERSION_NONE; }
      49          85 :     bool isMaster() const override { return false; }
      50           0 :     uint32_t getMasterInstanceID() const override
      51           0 :         { LBDONTCALL; return CO_INSTANCE_INVALID; }
      52             : 
      53           0 :     bool addSlave( const MasterCMCommand& ) override
      54           0 :         { LBDONTCALL; return false; }
      55           0 :     void removeSlaves( NodePtr ) override { LBDONTCALL; }
      56             : 
      57             : private:
      58             : };
      59             : }
      60             : 
      61             : #endif // CO_NULLCM_H

Generated by: LCOV version 1.11