LCOV - code coverage report
Current view: top level - seq/detail - objectMap.h (source / functions) Hit Total Coverage
Test: Equalizer Lines: 3 3 100.0 %
Date: 2017-12-16 05:07:20 Functions: 2 2 100.0 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2011-2012, Stefan Eilemann <eile@eyescale.ch>
       3             :  *
       4             :  * This library is free software; you can redistribute it and/or modify it under
       5             :  * the terms of the GNU Lesser General Public License version 2.1 as published
       6             :  * by the Free Software Foundation.
       7             :  *
       8             :  * This library is distributed in the hope that it will be useful, but WITHOUT
       9             :  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
      10             :  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
      11             :  * details.
      12             :  *
      13             :  * You should have received a copy of the GNU Lesser General Public License
      14             :  * along with this library; if not, write to the Free Software Foundation, Inc.,
      15             :  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      16             :  */
      17             : 
      18             : #ifndef EQSEQUEL_DETAIL_OBJECTMAP_H
      19             : #define EQSEQUEL_DETAIL_OBJECTMAP_H
      20             : 
      21             : #include <co/objectMap.h>   // base class
      22             : #include <seq/objectType.h> // used inline
      23             : #include <seq/types.h>
      24             : 
      25             : namespace seq
      26             : {
      27             : namespace detail
      28             : {
      29             : /** Central distributed object registry. */
      30             : class ObjectMap : public co::ObjectMap
      31             : {
      32             : public:
      33             :     ObjectMap(eq::Config& config, co::ObjectFactory& factory);
      34             :     ~ObjectMap();
      35             : 
      36             :     void setInitData(co::Object* object);
      37             :     void setFrameData(co::Object* object);
      38             : 
      39           4 :     co::Object* getInitData(co::Object* object)
      40             :     {
      41           4 :         return map(_initData, object);
      42             :     }
      43           5 :     co::Object* getFrameData() { return map(_frameData); }
      44             : protected:
      45             :     virtual void serialize(co::DataOStream& os, const uint64_t dirtyBits);
      46             :     virtual void deserialize(co::DataIStream& is, const uint64_t dirtyBits);
      47             : 
      48             : private:
      49             :     uint128_t _initData;
      50             :     uint128_t _frameData;
      51             : 
      52             :     /** The changed parts of the object since the last serialize(). */
      53             :     enum DirtyBits
      54             :     {
      55             :         DIRTY_INITDATA = co::ObjectMap::DIRTY_CUSTOM << 0, // 4
      56             :         DIRTY_FRAMEDATA = co::ObjectMap::DIRTY_CUSTOM << 1 // 8
      57             :     };
      58             : };
      59             : }
      60             : }
      61             : #endif // EQSEQUEL_DETAIL_OBJECTMAP_H

Generated by: LCOV version 1.11