Equalizer  1.2.1
Public Types | Protected Member Functions | Protected Types
eq::fabric::Segment< C, S, CH > Class Template Reference

Base data transport class for segments. More...

#include <segment.h>

+ Inheritance diagram for eq::fabric::Segment< C, S, CH >:
+ Collaboration diagram for eq::fabric::Segment< C, S, CH >:

List of all members.

Public Member Functions

Data Access
const C * getCanvas () const
C * getCanvas ()
const ViewportgetViewport () const
EQFABRIC_INL void setViewport (const Viewport &vp)
void setChannel (CH *channel)
CH * getChannel ()
 Return the output channel of this segment.
const CH * getChannel () const
 Return the output channel of this segment.
virtual EQFABRIC_INL void setWall (const Wall &wall)
 Set the frustum using a wall description.
virtual EQFABRIC_INL void setProjection (const Projection &)
 Set the frustum using a projection description.
virtual EQFABRIC_INL void unsetFrustum ()
 Set the last specified frustum to TYPE_NONE.
uint32_t getEyes () const
EQFABRIC_INL void setEyes (const uint32_t eyes)
void enableEye (const uint32_t eyes)
EQFABRIC_INL void setSwapBarrier (SwapBarrierPtr barrier)
SwapBarrierConstPtr getSwapBarrier () const
SwapBarrierPtr getSwapBarrier ()
Operations
EQFABRIC_INL VisitorResult accept (Visitor &visitor)
 Traverse this segment using a segment visitor.
EQFABRIC_INL VisitorResult accept (Visitor &visitor) const
 Const-version of accept().
void notifyFrustumChanged ()
virtual void backup ()
virtual void restore ()
virtual uint128_t commit (const uint32_t incarnation=CO_COMMIT_NEXT)
 Commit a new version of this object.

Public Types

typedef LeafVisitor< S > Visitor
 The segment visitor type.

Protected Member Functions

EQFABRIC_INL Segment (C *canvas)
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 void setDirty (const uint64_t bits)
 Add dirty flags to mark data for distribution.
virtual uint64_t getRedistributableBits () const

Protected Types

enum  DirtyBits {
  DIRTY_VIEWPORT = Object::DIRTY_CUSTOM << 0, DIRTY_FRUSTUM = Object::DIRTY_CUSTOM << 1, DIRTY_CHANNEL = Object::DIRTY_CUSTOM << 2, DIRTY_EYES = Object::DIRTY_CUSTOM << 3,
  DIRTY_SEGMENT_BITS
}
 The changed parts of the object since the last pack(). More...

Detailed Description

template<class C, class S, class CH>
class eq::fabric::Segment< C, S, CH >

Base data transport class for segments.

See also:
eq::Segment

Definition at line 34 of file fabric/segment.h.


Member Typedef Documentation

template<class C, class S, class CH>
typedef LeafVisitor< S > eq::fabric::Segment< C, S, CH >::Visitor

The segment visitor type.

Version:
1.0

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


Member Enumeration Documentation

template<class C, class S, class CH>
enum eq::fabric::Segment::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 172 of file fabric/segment.h.


Member Function Documentation

template<class C, class S, class CH>
EQFABRIC_INL VisitorResult eq::fabric::Segment< C, S, CH >::accept ( Visitor visitor)

Traverse this segment using a segment visitor.

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

Const-version of accept().

Version:
1.0
template<class C, class S, class CH>
virtual uint128_t eq::fabric::Segment< C, S, CH >::commit ( const uint32_t  incarnation = CO_COMMIT_NEXT) [virtual]

Commit a new version of this object.

Objects using the change type STATIC can not be committed.

Master instances will increment new versions continously, starting at VERSION_FIRST. If the object has not changed, no new version will be generated, that is, the current version is returned. The high value of the returned version will always be 0.

Slave objects can be commited, but have certain caveats for serialization. Please refer to the Programming Guide for more details. Slave object commits will return a random version on a successful commit, or VERSION_NONE if the object has not changed since the last commit. The high value of a successful commit will never be 0.

The incarnation count is meaningful for buffered master objects. The commit implementation will keep all instance data committed with an incarnation count newer than current_incarnation - getAutoObsolete(). By default, each call to commit creates a new incarnation, retaining the data from last getAutoObsolete() commit calls. When the application wishes to auto obsolete by another metric than commit calls, it has to consistently provide an incarnation counter. Buffers with a higher incarnation count than the current are discarded. A typical use case is to tie the auto obsoletion to an application-specific frame loop. Decreasing the incarnation counter will lead to undefined results.

Parameters:
incarnationthe commit incarnation for auto obsoletion.
Returns:
the new head version.

Reimplemented from eq::fabric::Object.

template<class C, class S, class CH>
virtual EQFABRIC_INL void eq::fabric::Segment< C, S, CH >::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 S, class CH>
const C* eq::fabric::Segment< C, S, CH >::getCanvas ( ) const [inline]
Returns:
the parent canvas.
Version:
1.0

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

template<class C, class S, class CH>
C* eq::fabric::Segment< C, S, CH >::getCanvas ( ) [inline]
Returns:
the parent canvas.
Version:
1.0

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

template<class C, class S, class CH>
CH* eq::fabric::Segment< C, S, CH >::getChannel ( ) [inline]

Return the output channel of this segment.

Version:
1.0

Definition at line 76 of file fabric/segment.h.

template<class C, class S, class CH>
const CH* eq::fabric::Segment< C, S, CH >::getChannel ( ) const [inline]

Return the output channel of this segment.

Version:
1.0

Definition at line 79 of file fabric/segment.h.

template<class C, class S, class CH>
uint32_t eq::fabric::Segment< C, S, CH >::getEyes ( ) const [inline]
Returns:
the bitwise OR of the eye values.
Version:
1.0

Definition at line 91 of file fabric/segment.h.

template<class C, class S, class CH>
const Viewport& eq::fabric::Segment< C, S, CH >::getViewport ( ) const [inline]
Returns:
the segment's viewport.
Version:
1.0

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

template<class C, class S, class CH>
virtual EQFABRIC_INL void eq::fabric::Segment< C, S, CH >::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 S, class CH>
virtual void eq::fabric::Segment< C, S, CH >::setDirty ( const uint64_t  bits) [protected, virtual]

Add dirty flags to mark data for distribution.

Version:
1.0

Reimplemented from co::Serializable.

template<class C, class S, class CH>
virtual EQFABRIC_INL void eq::fabric::Segment< C, S, CH >::setProjection ( const Projection projection) [virtual]

Set the frustum using a projection description.

Version:
1.0

Reimplemented from eq::fabric::Frustum.

template<class C, class S, class CH>
virtual EQFABRIC_INL void eq::fabric::Segment< C, S, CH >::setWall ( const Wall wall) [virtual]

Set the frustum using a wall description.

Version:
1.0

Reimplemented from eq::fabric::Frustum.

template<class C, class S, class CH>
virtual EQFABRIC_INL void eq::fabric::Segment< C, S, CH >::unsetFrustum ( ) [virtual]

Set the last specified frustum to TYPE_NONE.

Version:
1.0

Reimplemented from eq::fabric::Frustum.


The documentation for this class was generated from the following file:
Generated on Fri Jun 8 2012 15:44:36 for Equalizer 1.2.1 by  doxygen 1.8.0