LCOV - code coverage report
Current view: top level - co - nullCM.h (source / functions) Hit Total Coverage
Test: Collage Lines: 6 21 28.6 %
Date: 2018-01-09 16:37:03 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          21 :     NullCM()
      38          21 :         : ObjectCM(0)
      39             :     {
      40          21 :     }
      41          42 :     virtual ~NullCM() {}
      42          17 :     void init() override {}
      43           0 :     void push(const uint128_t&, const uint128_t&, const Nodes&) override
      44             :     {
      45           0 :         LBDONTCALL;
      46           0 :     }
      47           0 :     bool sendSync(const MasterCMCommand&) override
      48             :     {
      49           0 :         LBDONTCALL;
      50           0 :         return false;
      51             :     }
      52             : 
      53           0 :     uint128_t getHeadVersion() const override { return VERSION_NONE; }
      54           0 :     uint128_t getVersion() const override { return VERSION_NONE; }
      55          73 :     bool isMaster() const override { return false; }
      56           0 :     uint32_t getMasterInstanceID() const override
      57             :     {
      58           0 :         LBDONTCALL;
      59           0 :         return CO_INSTANCE_INVALID;
      60             :     }
      61             : 
      62           0 :     bool addSlave(const MasterCMCommand&) override
      63             :     {
      64           0 :         LBDONTCALL;
      65           0 :         return false;
      66             :     }
      67           0 :     void removeSlaves(NodePtr) override { LBDONTCALL; }
      68             : private:
      69             : };
      70             : }
      71             : 
      72             : #endif // CO_NULLCM_H

Generated by: LCOV version 1.11