LCOV - code coverage report
Current view: top level - co - objectDataOStream.h (source / functions) Hit Total Coverage
Test: Collage Lines: 2 2 100.0 %
Date: 2016-12-14 01:26:48 Functions: 2 3 66.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_OBJECTDATAOSTREAM_H
      22             : #define CO_OBJECTDATAOSTREAM_H
      23             : 
      24             : #include <co/dataOStream.h>   // base class
      25             : #include <co/version.h>       // enum
      26             : 
      27             : namespace co
      28             : {
      29             : /** The DataOStream for object data. */
      30             : class ObjectDataOStream : public DataOStream
      31             : {
      32             : public:
      33             :     explicit ObjectDataOStream( const ObjectCM* cm );
      34         178 :     virtual ~ObjectDataOStream(){}
      35             : 
      36             :     void reset() override;
      37             : 
      38             :     /** Set up commit of the given version to the receivers. */
      39             :     virtual void enableCommit( const uint128_t& version,
      40             :                                const Nodes& receivers );
      41             : 
      42         988 :     uint128_t getVersion() const { return _version; }
      43             : 
      44             : protected:
      45             :     ObjectDataOCommand send( const uint32_t cmd, const uint32_t type,
      46             :                              const uint32_t instanceID,
      47             :                              const void* data, const uint64_t size,
      48             :                              const bool last );
      49             : 
      50             :     const ObjectCM* _cm;
      51             :     uint128_t _version;
      52             :     uint32_t _sequence;
      53             : };
      54             : }
      55             : #endif //CO_OBJECTDATAOSTREAM_H

Generated by: LCOV version 1.11