Equalizer 1.0

eq::fabric::Serializable Class Reference

Base class for all distributed, inheritable objects. More...

#include <serializable.h>

Inheritance diagram for eq::fabric::Serializable:
Collaboration diagram for eq::fabric::Serializable:

List of all members.

Public Member Functions

uint64_t getDirty () const
virtual bool isDirty () const
virtual bool isDirty (const uint64_t dirtyBits) const
virtual uint128_t commitSync (const uint32_t commitID)
 Finalize a commit transaction.

Protected Member Functions

 Serializable ()
 Construct a new Serializable.
 Serializable (const Serializable &)
 Construct an unmapped, unregistered copy of an serializable.
virtual ~Serializable ()
 Destruct the serializable.
virtual void serialize (co::DataOStream &, const uint64_t)
 Worker for pack() and getInstanceData().
virtual void deserialize (co::DataIStream &, const uint64_t)
 Worker for unpack() and applyInstanceData().
virtual ChangeType getChangeType () const
virtual void setDirty (const uint64_t bits)
 Add dirty flags to mark data for distribution.
virtual void unsetDirty (const uint64_t bits)
 Remove dirty flags to clear data from distribution.
virtual void notifyAttached ()
 Notify that this object has been registered or mapped.

Protected Types

enum  DirtyBits { DIRTY_NONE = 0, DIRTY_CUSTOM = 1, DIRTY_ALL = 0xFFFFFFFFFFFFFFFFull }
 

The changed parts of the serializable since the last pack().

More...

Detailed Description

Base class for all distributed, inheritable objects.

This class implements one usage pattern of co::Object, which allows subclassing and serialization of distributed Objects used by Equalizer. The inheritance Serializable -> Object -> Frustum -> View illustrates the usage of this class.

Definition at line 38 of file serializable.h.


Member Enumeration Documentation


Constructor & Destructor Documentation

eq::fabric::Serializable::Serializable ( ) [inline, protected]

Construct a new Serializable.

Version:
1.0

Definition at line 60 of file serializable.h.

eq::fabric::Serializable::Serializable ( const Serializable ) [inline, protected]

Construct an unmapped, unregistered copy of an serializable.

Version:
1.0

Definition at line 66 of file serializable.h.

virtual eq::fabric::Serializable::~Serializable ( ) [inline, protected, virtual]

Destruct the serializable.

Version:
1.0

Definition at line 70 of file serializable.h.


Member Function Documentation

virtual uint128_t eq::fabric::Serializable::commitSync ( const uint32_t  commitID) [inline, virtual]

Finalize a commit transaction.

Parameters:
commitIDthe commit identifier returned from commitNB
Returns:
the new head version.
See also:
commit()

Reimplemented from co::Object.

Definition at line 51 of file serializable.h.

virtual void eq::fabric::Serializable::deserialize ( co::DataIStream ,
const uint64_t   
) [inline, protected, virtual]
uint64_t eq::fabric::Serializable::getDirty ( ) const [inline]
Returns:
the current dirty bit mask.
Version:
1.0

Definition at line 42 of file serializable.h.

virtual bool eq::fabric::Serializable::isDirty ( ) const [inline, virtual]
Returns:
true if the serializable has to be committed.
Version:
1.0

Reimplemented from co::Object.

Reimplemented in eq::fabric::Object.

Definition at line 45 of file serializable.h.

virtual bool eq::fabric::Serializable::isDirty ( const uint64_t  dirtyBits) const [inline, virtual]
Returns:
true if the given dirty bit is set.
Version:
1.0

Definition at line 48 of file serializable.h.

virtual void eq::fabric::Serializable::notifyAttached ( ) [inline, protected, virtual]

Notify that this object has been registered or mapped.

The method is called from the thread initiating the registration or mapping, after the operation has been completed successfully.

See also:
isMaster()

Reimplemented from co::Object.

Reimplemented in eq::Config.

Definition at line 119 of file serializable.h.

References co::Object::isMaster().

Here is the call graph for this function:

virtual void eq::fabric::Serializable::serialize ( co::DataOStream ,
const uint64_t   
) [inline, protected, virtual]

Worker for pack() and getInstanceData().

Override this and deserialize() if you want to distribute subclassed data.

This method is called with DIRTY_ALL from getInstanceData() and with the actual dirty bits from pack(), which also resets the dirty state afterwards. The dirty bits are transmitted beforehand, and do not need to be transmitted by the overriding method.

Version:
1.0

Reimplemented in eq::fabric::Canvas< CFG, C, S, L >, eq::fabric::Channel< W, C >, eq::fabric::Config< S, C, O, L, CV, N, V >, eq::fabric::Layout< C, L, V >, eq::fabric::Node< C, N, P, V >, eq::fabric::Object, eq::fabric::Observer< C, O >, eq::fabric::Pipe< N, P, W, V >, eq::fabric::Segment< C, S, CH >, eq::fabric::View< L, V, O >, eq::fabric::Window< P, W, C >, eqNbody::FrameData, eqNbody::SharedDataProxy, eqPly::FrameData, eVolve::FrameData, osgScaleViewer::FrameData, eq::fabric::Canvas< Config, Canvas, Segment, Layout >, eq::fabric::Channel< Window, Channel >, eq::fabric::Config< Server, Config, Observer, Layout, Canvas, Node, ConfigVisitor >, eq::fabric::Layout< Config, Layout, View >, eq::fabric::Node< Config, Node, Pipe, NodeVisitor >, eq::fabric::Observer< Config, Observer >, eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >, eq::fabric::Segment< Canvas, Segment, Channel >, eq::fabric::View< Layout, View, Observer >, and eq::fabric::Window< Pipe, Window, Channel >.

Definition at line 84 of file serializable.h.

Referenced by eqNbody::FrameData::serialize().

Here is the caller graph for this function:

virtual void eq::fabric::Serializable::unsetDirty ( const uint64_t  bits) [inline, protected, virtual]

Remove dirty flags to clear data from distribution.

Version:
1.0

Definition at line 117 of file serializable.h.


The documentation for this class was generated from the following file:
Generated on Sun May 8 2011 19:11:10 for Equalizer 1.0 by  doxygen 1.7.3