Equalizer 1.0
|
Base class for all distributed, inheritable objects. More...
#include <serializable.h>
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... |
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.
enum eq::fabric::Serializable::DirtyBits [protected] |
The changed parts of the serializable since the last pack().
Subclasses should define their own bits, starting at DIRTY_CUSTOM.
Reimplemented in eq::fabric::Channel< W, C >, 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::Channel< Window, Channel >, 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 106 of file serializable.h.
eq::fabric::Serializable::Serializable | ( | ) | [inline, protected] |
eq::fabric::Serializable::Serializable | ( | const Serializable & | ) | [inline, protected] |
Construct an unmapped, unregistered copy of an serializable.
Definition at line 66 of file serializable.h.
virtual eq::fabric::Serializable::~Serializable | ( | ) | [inline, protected, virtual] |
virtual uint128_t eq::fabric::Serializable::commitSync | ( | const uint32_t | commitID | ) | [inline, virtual] |
Finalize a commit transaction.
commitID | the commit identifier returned from commitNB |
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] |
Worker for unpack() and applyInstanceData().
This function is called with the dirty bits send by the master instance. The dirty bits are received beforehand, and do not need to be deserialized by the overriding method.
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 >, eq::View, 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 96 of file serializable.h.
Referenced by eqNbody::FrameData::deserialize().
virtual ChangeType eq::fabric::Serializable::getChangeType | ( | ) | const [inline, protected, virtual] |
Reimplemented from co::Object.
Reimplemented in eq::fabric::Channel< W, C >, eq::fabric::Node< C, N, P, V >, eq::fabric::Pipe< N, P, W, V >, eq::fabric::Window< P, W, C >, eqNbody::SharedDataProxy, eqPly::FrameData, eVolve::FrameData, osgScaleViewer::FrameData, eq::fabric::Channel< Window, Channel >, eq::fabric::Node< Config, Node, Pipe, NodeVisitor >, eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >, and eq::fabric::Window< Pipe, Window, Channel >.
Definition at line 98 of file serializable.h.
References co::Object::DELTA.
uint64_t eq::fabric::Serializable::getDirty | ( | ) | const [inline] |
virtual bool eq::fabric::Serializable::isDirty | ( | ) | const [inline, virtual] |
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] |
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.
Reimplemented from co::Object.
Reimplemented in eq::Config.
Definition at line 119 of file serializable.h.
References co::Object::isMaster().
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.
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().
virtual void eq::fabric::Serializable::setDirty | ( | const uint64_t | bits | ) | [inline, protected, virtual] |
Add dirty flags to mark data for distribution.
Reimplemented in eq::fabric::Canvas< CFG, C, S, L >, eq::fabric::Channel< W, C >, eq::fabric::Layout< C, L, V >, eq::fabric::Node< C, N, P, V >, 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 >, eq::Node, eq::Pipe, eq::fabric::Canvas< Config, Canvas, Segment, Layout >, eq::fabric::Channel< Window, Channel >, 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 114 of file serializable.h.
Referenced by osgScaleViewer::FrameData::setCameraLookAtPoint(), osgScaleViewer::FrameData::setCameraPosition(), osgScaleViewer::FrameData::setCameraUpVector(), and osgScaleViewer::FrameData::toggleStatistics().
virtual void eq::fabric::Serializable::unsetDirty | ( | const uint64_t | bits | ) | [inline, protected, virtual] |
Remove dirty flags to clear data from distribution.
Definition at line 117 of file serializable.h.