eq::Object Class Reference

Base class for all distributed, inheritable objects in the eq namespace. More...

#include <object.h>

Inheritance diagram for eq::Object:

Inheritance graph
[legend]
Collaboration diagram for eq::Object:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Object ()
 Construct a new Object.
virtual ~Object ()
 Destruct the object.
void setName (const std::string &name)
 Set the name of the object.
const std::string & getName () const
uint64_t getDirty () const

Protected Types

enum  DirtyBits {
  DIRTY_NONE = 0, DIRTY_NAME = 1 << 0, DIRTY_FILL1 = 1 << 1, DIRTY_FILL2 = 1 << 2,
  DIRTY_CUSTOM = 1 << 3, DIRTY_ALL = 0xffffffffffffffffull
}
 The changed parts of the object since the last pack(). More...

Protected Member Functions

virtual bool isDirty () const
virtual void serialize (net::DataOStream &os, const uint64_t dirtyBits)
 Worker for pack() and getInstanceData().
virtual void deserialize (net::DataIStream &is, const uint64_t dirtyBits)
 Worker for unpack() and applyInstanceData().
virtual ChangeType getChangeType () const
void setDirty (const uint64_t bits)
 Set dirty flags to mark data for distribution.
virtual void attachToSession (const uint32_t id, const uint32_t instanceID, net::Session *session)


Detailed Description

Base class for all distributed, inheritable objects in the eq namespace.

This class implements one usage pattern of net::Object, which allows subclassing and serialization of distributed Objects used by Equalizer. The inheritance Object -> Frustum -> View illustrates the usage of eq::Object.

Definition at line 33 of file client/object.h.


Member Enumeration Documentation

enum eq::Object::DirtyBits [protected]

The changed parts of the object since the last pack().

Subclasses should define their own bits, starting at DIRTY_CUSTOM.

Reimplemented in eq::Canvas, eq::Frustum, eq::Layout, eq::Observer, eq::Segment, eq::View, and eqPly::FrameData.

Definition at line 88 of file client/object.h.


Constructor & Destructor Documentation

eq::Object::Object (  ) 

Construct a new Object.

Reimplemented from eq::net::Object.

Definition at line 26 of file client/object.cpp.

eq::Object::~Object (  )  [virtual]

Destruct the object.

Reimplemented from eq::net::Object.

Definition at line 30 of file client/object.cpp.


Member Function Documentation

void eq::Object::setName ( const std::string &  name  ) 

Set the name of the object.

Definition at line 83 of file client/object.cpp.

References setDirty().

Here is the call graph for this function:

const std::string & eq::Object::getName (  )  const

Returns:
the name of the object.

Definition at line 89 of file client/object.cpp.

Referenced by eq::server::Config::addCanvas(), and eq::server::Canvas::addSegment().

Here is the caller graph for this function:

uint64_t eq::Object::getDirty (  )  const [inline]

Returns:
the current dirty flags.

Definition at line 49 of file client/object.h.

Referenced by eq::ConfigCommitVisitor::visitPre().

Here is the caller graph for this function:

virtual bool eq::Object::isDirty (  )  const [inline, protected, virtual]

Returns:
true if the view has to be committed.

Reimplemented from eq::net::Object.

Definition at line 53 of file client/object.h.

void eq::Object::serialize ( net::DataOStream os,
const uint64_t  dirtyBits 
) [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::Canvas, eq::Frustum, eq::Observer, eq::Segment, eq::View, eqPly::FrameData, eq::server::Canvas, and eq::server::Layout.

Definition at line 59 of file client/object.cpp.

Referenced by eqPly::FrameData::serialize().

Here is the caller graph for this function:

void eq::Object::deserialize ( net::DataIStream is,
const uint64_t  dirtyBits 
) [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 transmitted by the overriding method.

See also:
serialize()

Reimplemented in eq::Canvas, eq::Frustum, eq::Layout, eq::Observer, eq::Segment, eq::View, eqPly::FrameData, eq::server::Canvas, eq::server::Observer, and eq::server::View.

Definition at line 65 of file client/object.cpp.

Referenced by eqPly::FrameData::deserialize().

Here is the caller graph for this function:

virtual ChangeType eq::Object::getChangeType (  )  const [inline, protected, virtual]

Returns:
how the changes are to be handled.

Reimplemented from eq::net::Object.

Reimplemented in eq::View, and eqPly::FrameData.

Definition at line 81 of file client/object.h.

References eq::net::Object::UNBUFFERED.

void eq::Object::setDirty ( const uint64_t  bits  )  [protected]

void eq::Object::attachToSession ( const uint32_t  id,
const uint32_t  instanceID,
net::Session session 
) [protected, virtual]

See also:
eq::net::Object::attachToSession.

Reimplemented from eq::net::Object.

Definition at line 76 of file client/object.cpp.


The documentation for this class was generated from the following files:
Generated on Mon Aug 10 18:58:43 2009 for Equalizer 0.9 by  doxygen 1.5.8