Base class for all distributed, inheritable objects. More...
#include <serializable.h>
Inheritance diagram for eq::fabric::Serializable:
Collaboration diagram for eq::fabric::Serializable:Public Member Functions | |
| uint64_t | getDirty () const |
| virtual bool | isDirty () const |
| virtual bool | isDirty (const uint64_t dirtyBit) const |
| virtual uint32_t | commitSync (const uint32_t commitID) |
| Finalizes 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 (net::DataOStream &, const uint64_t) |
| Worker for pack() and getInstanceData(). | |
| virtual void | deserialize (net::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. | |
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 net::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 37 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::Object, eq::fabric::Observer< C, O >, eqNbody::FrameData, eqNbody::SharedDataProxy, eqPly::FrameData, eVolve::FrameData, osgScaleViewer::FrameData, and eq::fabric::Observer< Config, Observer >.
Definition at line 105 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 65 of file serializable.h.
| virtual eq::fabric::Serializable::~Serializable | ( | ) | [inline, protected, virtual] |
| virtual uint32_t eq::fabric::Serializable::commitSync | ( | const uint32_t | commitID | ) | [inline, virtual] |
Finalizes a commit transaction.
| commitID | the commit identifier returned from commitNB |
Reimplemented from eq::net::Object.
Definition at line 50 of file serializable.h.
| virtual void eq::fabric::Serializable::deserialize | ( | net::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::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::Window< P, W, C >, eqNbody::FrameData, eqNbody::SharedDataProxy, eqPly::FrameData, eVolve::FrameData, osgScaleViewer::FrameData, eq::server::Channel, eq::server::Node, eq::server::Observer, eq::server::Pipe, eq::server::Window, 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::Pipe< Node, Pipe, Window, PipeVisitor >, and eq::fabric::Window< Pipe, Window, Channel >.
Definition at line 95 of file serializable.h.
| virtual ChangeType eq::fabric::Serializable::getChangeType | ( | ) | const [inline, protected, virtual] |
Reimplemented from eq::net::Object.
Reimplemented in 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::Window< P, W, C >, 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::Pipe< Node, Pipe, Window, PipeVisitor >, and eq::fabric::Window< Pipe, Window, Channel >.
Definition at line 97 of file serializable.h.
| uint64_t eq::fabric::Serializable::getDirty | ( | ) | const [inline] |
| virtual bool eq::fabric::Serializable::isDirty | ( | ) | const [inline, virtual] |
Reimplemented from eq::net::Object.
Reimplemented in eq::fabric::Object.
Definition at line 44 of file serializable.h.
| virtual bool eq::fabric::Serializable::isDirty | ( | const uint64_t | dirtyBit | ) | const [inline, virtual] |
Definition at line 47 of file serializable.h.
| virtual void eq::fabric::Serializable::serialize | ( | net::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::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::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::Pipe< Node, Pipe, Window, PipeVisitor >, and eq::fabric::Window< Pipe, Window, Channel >.
Definition at line 83 of file serializable.h.
| 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::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::Window< P, W, C >, 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::Pipe< Node, Pipe, Window, PipeVisitor >, and eq::fabric::Window< Pipe, Window, Channel >.
Definition at line 113 of file serializable.h.
Referenced by eq::fabric::Object::serialize(), osgScaleViewer::FrameData::setCameraLookAtPoint(), osgScaleViewer::FrameData::setCameraPosition(), osgScaleViewer::FrameData::setCameraUpVector(), eq::fabric::Object::setErrorMessage(), eq::fabric::Object::setUserData(), and osgScaleViewer::FrameData::toggleStatistics().
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.
Definition at line 116 of file serializable.h.
0.9.1 by
1.7.1