LCOV - code coverage report
Current view: top level - co - objectDataOStream.h (source / functions) Hit Total Coverage
Test: Collage Lines: 2 2 100.0 %
Date: 2018-01-09 16:37:03 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         172 :     virtual ~ObjectDataOStream() {}
      35             :     void reset() override;
      36             : 
      37             :     /** Set up commit of the given version to the receivers. */
      38             :     virtual void enableCommit(const uint128_t& version, const Nodes& receivers);
      39             : 
      40         988 :     uint128_t getVersion() const { return _version; }
      41             : protected:
      42             :     ObjectDataOCommand send(const uint32_t cmd, const uint32_t type,
      43             :                             const uint32_t instanceID, const void* data,
      44             :                             const uint64_t size, const bool last);
      45             : 
      46             :     const ObjectCM* _cm;
      47             :     uint128_t _version;
      48             :     uint32_t _sequence;
      49             : };
      50             : }
      51             : #endif // CO_OBJECTDATAOSTREAM_H

Generated by: LCOV version 1.11