Equalizer  1.4.1
Protected Member Functions | Protected Types | Friends
eq::fabric::Layout< C, L, V > Class Template Reference

Base data transport class for layouts. More...

#include <layout.h>

+ Inheritance diagram for eq::fabric::Layout< C, L, V >:
+ Collaboration diagram for eq::fabric::Layout< C, L, V >:

List of all members.

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 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 ViewsgetViews () const
 Get the list of views.
EQFABRIC_INL bool isActive () const
V * getView (const ViewPath &path)
V * findView (const std::string &name)
LayoutPath getPath () const

Detailed Description

template<class C, class L, class V>
class eq::fabric::Layout< C, L, V >

Base data transport class for layouts.

See also:
eq::Layout

Definition at line 32 of file fabric/layout.h.


Member Typedef Documentation

template<class C, class L, class V>
typedef std::vector< V* > eq::fabric::Layout< C, L, V >::Views

A vector of pointers to views.

Version:
1.0

Definition at line 38 of file fabric/layout.h.

template<class C, class L, class V>
typedef ElementVisitor< L, LeafVisitor< V > > eq::fabric::Layout< C, L, V >::Visitor

The layout visitor type.

Version:
1.0

Definition at line 40 of file fabric/layout.h.


Member Enumeration Documentation

template<class C, class L, class V>
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 110 of file fabric/layout.h.


Member Function Documentation

template<class C, class L, class V>
EQFABRIC_INL VisitorResult eq::fabric::Layout< C, L, V >::accept ( Visitor visitor)

Traverse this layout and all children using a layout visitor.

Parameters:
visitorthe visitor.
Returns:
the result of the visitor traversal.
Version:
1.0
template<class C, class L, class V>
EQFABRIC_INL VisitorResult eq::fabric::Layout< C, L, V >::accept ( Visitor visitor) const

Const-version of accept().

Version:
1.0
template<class C, class L, class V>
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.

See also:
serialize()
Version:
1.0

Reimplemented from eq::fabric::Object.

template<class C, class L, class V>
C* eq::fabric::Layout< C, L, V >::getConfig ( ) [inline]
Returns:
the current config.
Version:
1.0

Definition at line 43 of file fabric/layout.h.

template<class C, class L, class V>
const C* eq::fabric::Layout< C, L, V >::getConfig ( ) const [inline]
Returns:
the current config.
Version:
1.0

Definition at line 46 of file fabric/layout.h.

template<class C, class L, class V>
const Views& eq::fabric::Layout< C, L, V >::getViews ( ) const [inline]

Get the list of views.

Version:
1.0

Definition at line 49 of file fabric/layout.h.

template<class C, class L, class V>
EQFABRIC_INL bool eq::fabric::Layout< C, L, V >::isActive ( ) const
Returns:
true if the layout is activated in at least one canvas.
Version:
1.1.5
template<class C, class L, class V>
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.

See also:
isMaster()

Reimplemented from eq::fabric::Object.

template<class C, class L, class V>
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.

Version:
1.0

Reimplemented from eq::fabric::Object.

template<class C, class L, class V>
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.

Version:
1.0

Reimplemented from co::Serializable.


The documentation for this class was generated from the following file:
Generated on Mon Nov 26 2012 14:41:50 for Equalizer 1.4.1 by  doxygen 1.7.6.1