Equalizer 1.0
|
Base data transport class for layouts. More...
#include <layout.h>
Public Member Functions | |
Operations | |
EQFABRIC_INL VisitorResult | accept (Visitor &visitor) |
Traverse this layout and all children using a layout visitor. | |
EQFABRIC_INL VisitorResult | accept (Visitor &visitor) const |
Const-version of accept(). | |
void | create (V **view) |
void | release (V *view) |
Protected Member Functions | |
EQFABRIC_INL | Layout (C *config) |
virtual EQFABRIC_INL void | attach (const co::base::UUID &id, const uint32_t instanceID) |
virtual EQFABRIC_INL void | serialize (co::DataOStream &os, const uint64_t dirtyBits) |
Worker for pack() and getInstanceData(). | |
virtual EQFABRIC_INL void | deserialize (co::DataIStream &is, const uint64_t dirtyBits) |
Worker for unpack() and applyInstanceData(). | |
virtual EQFABRIC_INL void | notifyDetach () |
Notify that this object will be deregistered or unmapped. | |
virtual EQFABRIC_INL void | setDirty (const uint64_t bits) |
Add dirty flags to mark data for distribution. | |
virtual uint64_t | getRedistributableBits () const |
Protected Types | |
enum | DirtyBits { DIRTY_VIEWS = Object::DIRTY_CUSTOM << 0, DIRTY_LAYOUT_BITS = DIRTY_VIEWS | DIRTY_OBJECT_BITS } |
The changed parts of the object since the last pack(). More... | |
Friends | |
class | View |
class | Object |
class | Config |
Data Access | |
typedef std::vector< V * > | Views |
A vector of pointers to views. | |
typedef ElementVisitor< L, LeafVisitor< V > > | Visitor |
The layout visitor type. | |
C * | getConfig () |
const C * | getConfig () const |
const Views & | getViews () const |
Get the list of views. | |
V * | getView (const ViewPath &path) |
V * | findView (const std::string &name) |
LayoutPath | getPath () const |
Base data transport class for layouts.
Definition at line 32 of file fabric/layout.h.
typedef std::vector< V* > eq::fabric::Layout< C, L, V >::Views |
typedef ElementVisitor< L, LeafVisitor< V > > eq::fabric::Layout< C, L, V >::Visitor |
enum eq::fabric::Layout::DirtyBits [protected] |
The changed parts of the object since the last pack().
Subclasses should define their own bits, starting at DIRTY_CUSTOM.
Reimplemented from eq::fabric::Object.
Definition at line 104 of file fabric/layout.h.
EQFABRIC_INL VisitorResult eq::fabric::Layout< C, L, V >::accept | ( | Visitor & | visitor | ) |
Traverse this layout and all children using a layout visitor.
visitor | the visitor. |
EQFABRIC_INL VisitorResult eq::fabric::Layout< C, L, V >::accept | ( | Visitor & | visitor | ) | const |
Const-version of accept().
virtual EQFABRIC_INL void eq::fabric::Layout< C, L, V >::deserialize | ( | co::DataIStream & | , |
const uint64_t | |||
) | [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 from eq::fabric::Object.
C* eq::fabric::Layout< C, L, V >::getConfig | ( | ) | [inline] |
const C* eq::fabric::Layout< C, L, V >::getConfig | ( | ) | const [inline] |
const Views& eq::fabric::Layout< C, L, V >::getViews | ( | ) | const [inline] |
virtual EQFABRIC_INL void eq::fabric::Layout< C, L, V >::notifyDetach | ( | ) | [protected, virtual] |
Notify that this object will be deregistered or unmapped.
The method is called from the thread initiating the deregistration or unmapping, before the operation is executed.
Reimplemented from eq::fabric::Object.
virtual EQFABRIC_INL void eq::fabric::Layout< C, L, V >::serialize | ( | co::DataOStream & | , |
const uint64_t | |||
) | [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 from eq::fabric::Object.
virtual EQFABRIC_INL void eq::fabric::Layout< C, L, V >::setDirty | ( | const uint64_t | bits | ) | [protected, virtual] |
Add dirty flags to mark data for distribution.
Reimplemented from eq::fabric::Serializable.