LCOV - code coverage report
Current view: top level - seq/detail - objectMap.h (source / functions) Hit Total Coverage
Test: lcov2.info Lines: 3 3 100.0 %
Date: 2014-06-18 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 <seq/objectType.h> // used inline
      22             : #include <seq/types.h>
      23             : #include <co/objectMap.h>      // base class
      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           4 :             { return map( _initData, object ); }
      41           4 :         co::Object* getFrameData() { return map( _frameData ); }
      42             : 
      43             :     protected:
      44             :         virtual void serialize( co::DataOStream& os, const uint64_t dirtyBits );
      45             :         virtual void deserialize( co::DataIStream& is,
      46             :                                   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.10