Equalizer  1.2.1
Classes | Public Member Functions | Public Types | Protected Member Functions | Protected Types | Friends
eq::fabric::Window< P, W, C > Class Template Reference

Base data transport class for windows. More...

#include <window.h>

+ Inheritance diagram for eq::fabric::Window< P, W, C >:
+ Collaboration diagram for eq::fabric::Window< P, W, C >:

List of all members.

Classes

struct  BackupData

Public Member Functions

EQFABRIC_INL WindowPath getPath () const
Data Access
void init ()
const P * getPipe () const
P * getPipe ()
const ChannelsgetChannels () const
const DrawableConfiggetDrawableConfig () const
const PixelViewportgetPixelViewport () const
const ViewportgetViewport () const
virtual EQFABRIC_INL void setPixelViewport (const PixelViewport &pvp)
 Set the window's pixel viewport wrt its parent pipe.
EQFABRIC_INL void setViewport (const Viewport &vp)
 Set the window's viewport wrt its parent pipe.
bool hasFixedViewport () const
virtual void notifyViewportChanged ()
EQFABRIC_INL VisitorResult accept (Visitor &visitor)
 Traverse this window and all children using a window visitor.
EQFABRIC_INL VisitorResult accept (Visitor &visitor) const
 Const-version of accept().
internal
virtual EQFABRIC_INL void backup ()
virtual EQFABRIC_INL void restore ()
void create (C **channel)
void release (C *channel)
virtual void output (std::ostream &) const
virtual EQFABRIC_INL uint128_t commit (const uint32_t incarnation=CO_COMMIT_NEXT)
 Commit a new version of this object.

Public Types

typedef std::vector< C * > Channels
 A vector of pointers to channels.
typedef ElementVisitor< W,
LeafVisitor< C > > 
Visitor
 The Window visitor type.

Protected Member Functions

 Window (P *parent)
virtual 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)
void _setDrawableConfig (const DrawableConfig &drawableConfig)
virtual ChangeType getChangeType () const
C * _findChannel (const co::base::UUID &id)
virtual uint64_t getRedistributableBits () const

Protected Types

enum  DirtyBits {
  DIRTY_ATTRIBUTES = Object::DIRTY_CUSTOM << 0, DIRTY_CHANNELS = Object::DIRTY_CUSTOM << 1, DIRTY_VIEWPORT = Object::DIRTY_CUSTOM << 2, DIRTY_DRAWABLECONFIG = Object::DIRTY_CUSTOM << 3,
  DIRTY_WINDOW_BITS
}
 The changed parts of the object since the last pack(). More...

Friends

class Channel< W, C >

Attributes

enum  IAttribute {
  IATTR_HINT_STEREO, IATTR_HINT_DOUBLEBUFFER, IATTR_HINT_FULLSCREEN, IATTR_HINT_DECORATION,
  IATTR_HINT_SWAPSYNC, IATTR_HINT_DRAWABLE, IATTR_HINT_STATISTICS, IATTR_HINT_SCREENSAVER,
  IATTR_PLANES_COLOR, IATTR_PLANES_ALPHA, IATTR_PLANES_DEPTH, IATTR_PLANES_STENCIL,
  IATTR_PLANES_ACCUM, IATTR_PLANES_ACCUM_ALPHA, IATTR_PLANES_SAMPLES, IATTR_LAST,
  IATTR_ALL = IATTR_LAST + 5
}
 Window attributes. More...
void setIAttribute (const IAttribute attr, const int32_t value)
 Set a window attribute.
int32_t getIAttribute (const IAttribute attr) const
static EQFABRIC_INL const
std::string & 
getIAttributeString (const IAttribute attr)

Detailed Description

template<class P, class W, class C>
class eq::fabric::Window< P, W, C >

Base data transport class for windows.

See also:
eq::Window

Definition at line 40 of file include/eq/fabric/window.h.


Member Typedef Documentation

template<class P, class W, class C>
typedef std::vector< C* > eq::fabric::Window< P, W, C >::Channels

A vector of pointers to channels.

Version:
1.0

Definition at line 44 of file include/eq/fabric/window.h.

template<class P, class W, class C>
typedef ElementVisitor< W, LeafVisitor< C > > eq::fabric::Window< P, W, C >::Visitor

The Window visitor type.

Version:
1.0

Definition at line 46 of file include/eq/fabric/window.h.


Member Enumeration Documentation

template<class P, class W, class C>
enum eq::fabric::Window::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 210 of file include/eq/fabric/window.h.

template<class P, class W, class C>
enum eq::fabric::Window::IAttribute

Window attributes.

Most of these attributes are used by the SystemWindow implementation to configure the window during configInit(). An SystemWindow implementation might not respect all attributes, e.g., IATTR_HINT_SWAPSYNC is not implemented by the GLXWindow. Please refer to the Programming Guide for details.

Version:
1.0
Enumerator:
IATTR_HINT_STEREO 

Active stereo.

IATTR_HINT_DOUBLEBUFFER 

Front and back buffer.

IATTR_HINT_FULLSCREEN 

Fullscreen drawable.

IATTR_HINT_DECORATION 

Window decorations.

IATTR_HINT_SWAPSYNC 

Swap sync on vertical retrace.

IATTR_HINT_DRAWABLE 

Window, pbuffer or FBO.

IATTR_HINT_STATISTICS 

Statistics gathering hint.

IATTR_HINT_SCREENSAVER 

Screensaver (de)activation (WGL)

IATTR_PLANES_COLOR 

No of per-component color planes.

IATTR_PLANES_ALPHA 

No of alpha planes.

IATTR_PLANES_DEPTH 

No of z-buffer planes.

IATTR_PLANES_STENCIL 

No of stencil planes.

IATTR_PLANES_ACCUM 

No of accumulation buffer planes.

IATTR_PLANES_ACCUM_ALPHA 

No of alpha accum buffer planes.

IATTR_PLANES_SAMPLES 

No of multisample (AA) planes.

Definition at line 129 of file include/eq/fabric/window.h.


Member Function Documentation

template<class P, class W, class C>
EQFABRIC_INL VisitorResult eq::fabric::Window< P, W, C >::accept ( Visitor visitor)

Traverse this window and all children using a window visitor.

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

Const-version of accept().

Version:
1.0
template<class P, class W, class C>
virtual EQFABRIC_INL uint128_t eq::fabric::Window< P, W, C >::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 P, class W, class C>
virtual EQFABRIC_INL void eq::fabric::Window< P, W, C >::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 P, class W, class C>
virtual ChangeType eq::fabric::Window< P, W, C >::getChangeType ( ) const [inline, protected, virtual]
Returns:
how the changes are to be handled.

Reimplemented from co::Serializable.

Definition at line 205 of file include/eq/fabric/window.h.

template<class P, class W, class C>
const Channels& eq::fabric::Window< P, W, C >::getChannels ( ) const [inline]
Returns:
a vector of all child channels of this window.

Definition at line 59 of file include/eq/fabric/window.h.

template<class P, class W, class C>
const DrawableConfig& eq::fabric::Window< P, W, C >::getDrawableConfig ( ) const [inline]
Returns:
the window's drawable configuration.
Version:
1.0

Definition at line 62 of file include/eq/fabric/window.h.

template<class P, class W, class C>
int32_t eq::fabric::Window< P, W, C >::getIAttribute ( const IAttribute  attr) const [inline]
Returns:
the value of a window attribute.
Version:
1.0

Definition at line 157 of file include/eq/fabric/window.h.

template<class P, class W, class C>
const P* eq::fabric::Window< P, W, C >::getPipe ( ) const [inline]
Returns:
the parent Pipe of this window.
Version:
1.0

Definition at line 54 of file include/eq/fabric/window.h.

template<class P, class W, class C>
P* eq::fabric::Window< P, W, C >::getPipe ( ) [inline]
Returns:
the parent Pipe of this window.
Version:
1.0

Definition at line 56 of file include/eq/fabric/window.h.

template<class P, class W, class C>
const PixelViewport& eq::fabric::Window< P, W, C >::getPixelViewport ( ) const [inline]
Returns:
the window's pixel viewport wrt the parent pipe.
Version:
1.0

Definition at line 68 of file include/eq/fabric/window.h.

template<class P, class W, class C>
const Viewport& eq::fabric::Window< P, W, C >::getViewport ( ) const [inline]
Returns:
the window's fractional viewport wrt the parent pipe.
Version:
1.0

Definition at line 74 of file include/eq/fabric/window.h.

template<class P, class W, class C>
bool eq::fabric::Window< P, W, C >::hasFixedViewport ( ) const [inline]
Returns:
true if a viewport was specified last.
Version:
1.0

Definition at line 99 of file include/eq/fabric/window.h.

template<class P, class W, class C>
virtual EQFABRIC_INL void eq::fabric::Window< P, W, C >::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 P, class W, class C>
virtual EQFABRIC_INL void eq::fabric::Window< P, W, C >::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 P, class W, class C>
virtual EQFABRIC_INL void eq::fabric::Window< P, W, C >::setDirty ( const uint64_t  bits) [protected, virtual]
See also:
Serializable::setDirty()

Reimplemented from co::Serializable.

template<class P, class W, class C>
void eq::fabric::Window< P, W, C >::setIAttribute ( const IAttribute  attr,
const int32_t  value 
) [inline]

Set a window attribute.

Version:
1.0

Definition at line 152 of file include/eq/fabric/window.h.

template<class P, class W, class C>
virtual EQFABRIC_INL void eq::fabric::Window< P, W, C >::setPixelViewport ( const PixelViewport pvp) [virtual]

Set the window's pixel viewport wrt its parent pipe.

Updates the fractional viewport of the window and its channels accordingly.

Parameters:
pvpthe viewport in pixels.
Version:
1.0
template<class P, class W, class C>
EQFABRIC_INL void eq::fabric::Window< P, W, C >::setViewport ( const Viewport vp)

Set the window's viewport wrt its parent pipe.

Updates the fractional pixel viewport of the window and its channels accordingly.

Parameters:
vpthe fractional viewport.
Version:
1.0

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