Equalizer
1.4.1
|
Internal base class for all distributed, inheritable Equalizer objects. More...
#include <object.h>
Inherits co::Serializable.
Inherited by eq::fabric::Canvas< Config, Canvas, Segment, Layout >, eq::fabric::Channel< Window, Channel >, eq::fabric::Config< Server, Config, Observer, Layout, Canvas, Node, ConfigVisitor >, eq::fabric::Canvas< CFG, C, S, L >, eq::fabric::Channel< W, C >, eq::fabric::Config< S, C, O, L, CV, N, V >, eq::fabric::Layout< C, L, V >, eq::fabric::Node< C, N, P, V >, eq::fabric::Observer< C, O >, eq::fabric::Pipe< N, P, W, V >, eq::fabric::Segment< C, S, CH >, eq::fabric::View< L, V, O >, eq::fabric::Window< P, W, C >, eq::fabric::Layout< Config, Layout, View >, eq::fabric::Node< Config, Node, Pipe, NodeVisitor >, eq::fabric::Observer< Config, Observer >, eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >, eq::fabric::Segment< Canvas, Segment, Channel >, eq::fabric::View< Layout, View, Observer >, and eq::fabric::Window< Pipe, Window, Channel >.
Classes | |
struct | BackupData |
Public Member Functions | |
virtual bool | isDirty () const |
virtual uint128_t | commit (const uint32_t incarnation=CO_COMMIT_NEXT) |
Commit a new version of this object. | |
virtual void | backup () |
virtual void | restore () |
Data Access. | |
void | setName (const std::string &name) |
Set the name of the object. | |
const std::string & | getName () const |
void | setUserData (co::Object *userData) |
Set user-specific data. | |
co::Object * | getUserData () |
const co::Object * | getUserData () const |
Error Information. | |
void | setError (const int32_t error) |
Set an error code why the last operation failed. | |
co::Error | getError () const |
Data Access | |
uint32_t | getTasks () const |
Return the set of tasks this channel might execute in the worst case. | |
uint32_t | getSerial () const |
Public Types | |
enum | DirtyBits { DIRTY_NAME = Serializable::DIRTY_CUSTOM << 0, DIRTY_USERDATA = Serializable::DIRTY_CUSTOM << 1, DIRTY_ERROR = Serializable::DIRTY_CUSTOM << 2, DIRTY_TASKS = Serializable::DIRTY_CUSTOM << 3, DIRTY_REMOVED = Serializable::DIRTY_CUSTOM << 4, DIRTY_SERIAL = Serializable::DIRTY_CUSTOM << 5, DIRTY_CUSTOM = Serializable::DIRTY_CUSTOM << 6, DIRTY_OBJECT_BITS = DIRTY_NAME | DIRTY_USERDATA | DIRTY_ERROR } |
The changed parts of the object since the last pack(). More... | |
Protected Member Functions | |
Object () | |
Construct a new Object. | |
virtual | ~Object () |
Destruct the object. | |
virtual bool | hasMasterUserData () |
virtual uint32_t | getUserDataLatency () const |
void | setTasks (const uint32_t tasks) |
virtual void | notifyDetach () |
Notify that this object will be deregistered or unmapped. | |
virtual void | serialize (co::DataOStream &os, const uint64_t dirtyBits) |
Worker for pack() and getInstanceData(). | |
virtual void | deserialize (co::DataIStream &is, const uint64_t dirtyBits) |
Worker for unpack() and applyInstanceData(). | |
virtual uint64_t | getRedistributableBits () const |
void | postRemove (Object *child) |
virtual void | removeChild (const UUID &) |
template<class C , class PKG , class S > | |
void | commitChild (C *child, S *sender, const uint32_t incarnation) |
template<class C > | |
void | commitChild (C *child, const uint32_t incarnation) |
template<class C , class PKG , class S > | |
void | commitChildren (const std::vector< C * > &children, S *sender, const uint32_t incarnation) |
template<class C , class PKG > | |
void | commitChildren (const std::vector< C * > &children, const uint32_t incarnation) |
template<class C > | |
void | commitChildren (const std::vector< C * > &children, const uint32_t incarnation) |
template<class C > | |
void | syncChildren (const std::vector< C * > &children) |
template<class P , class C > | |
void | releaseChildren (const std::vector< C * > &children) |
bool | _cmdSync (co::Command &command) |
Internal base class for all distributed, inheritable Equalizer objects.
This class provides common data storage used by all Equalizer resource entities. Do not subclass directly.
Definition at line 37 of file eq/fabric/object.h.
The changed parts of the object since the last pack().
Subclasses should define their own bits, starting at DIRTY_CUSTOM.
Reimplemented from co::Serializable.
Reimplemented in eq::fabric::Channel< W, C >, eq::fabric::Channel< Window, Channel >, eq::fabric::View< L, V, O >, eq::fabric::View< Layout, View, Observer >, eq::fabric::Window< P, W, C >, eq::fabric::Window< Pipe, Window, Channel >, eq::fabric::Pipe< N, P, W, V >, eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >, eq::fabric::Segment< C, S, CH >, eq::fabric::Segment< Canvas, Segment, Channel >, eq::fabric::Node< C, N, P, V >, eq::fabric::Node< Config, Node, Pipe, NodeVisitor >, eq::fabric::Observer< C, O >, eq::fabric::Observer< Config, Observer >, eq::fabric::Layout< C, L, V >, and eq::fabric::Layout< Config, Layout, View >.
Definition at line 117 of file eq/fabric/object.h.
eq::fabric::Object::Object | ( | ) | [protected] |
Construct a new Object.
Reimplemented from co::Object.
virtual eq::fabric::Object::~Object | ( | ) | [protected, virtual] |
Destruct the object.
Reimplemented from co::Object.
virtual uint128_t eq::fabric::Object::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.
incarnation | the commit incarnation for auto obsoletion. |
Reimplemented from co::Serializable.
Reimplemented in eq::fabric::Config< S, C, O, L, CV, N, V >, eq::fabric::Config< Server, Config, Observer, Layout, Canvas, Node, ConfigVisitor >, eq::fabric::Window< P, W, C >, eq::fabric::Window< Pipe, Window, Channel >, eq::fabric::Segment< C, S, CH >, eq::fabric::Segment< Canvas, Segment, Channel >, eq::fabric::Pipe< N, P, W, V >, eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >, eq::fabric::Node< C, N, P, V >, and eq::fabric::Node< Config, Node, Pipe, NodeVisitor >.
virtual void eq::fabric::Object::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 co::Serializable.
Reimplemented in eq::fabric::Channel< W, C >, eq::fabric::Channel< Window, Channel >, eq::fabric::View< L, V, O >, eq::fabric::View< Layout, View, Observer >, eq::fabric::Config< S, C, O, L, CV, N, V >, eq::fabric::Config< Server, Config, Observer, Layout, Canvas, Node, ConfigVisitor >, eq::fabric::Window< P, W, C >, eq::fabric::Window< Pipe, Window, Channel >, eq::fabric::Pipe< N, P, W, V >, eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >, eq::fabric::Segment< C, S, CH >, eq::fabric::Segment< Canvas, Segment, Channel >, eq::fabric::Canvas< CFG, C, S, L >, eq::fabric::Canvas< Config, Canvas, Segment, Layout >, eq::fabric::Node< C, N, P, V >, eq::fabric::Node< Config, Node, Pipe, NodeVisitor >, eq::fabric::Observer< C, O >, eq::fabric::Observer< Config, Observer >, eq::fabric::Layout< C, L, V >, eq::fabric::Layout< Config, Layout, View >, and eq::View.
co::Error eq::fabric::Object::getError | ( | ) | const [inline] |
Definition at line 80 of file eq/fabric/object.h.
Referenced by eVolve::Pipe::configInit(), eVolve::EVolve::run(), osgScaleViewer::OSGScaleViewer::run(), and eqPly::EqPly::run().
const std::string& eq::fabric::Object::getName | ( | ) | const |
Referenced by eqPixelBench::Channel::frameStart().
uint32_t eq::fabric::Object::getTasks | ( | ) | const [inline] |
Return the set of tasks this channel might execute in the worst case.
It is not guaranteed that all the tasks will be actually executed during rendering.
Definition at line 94 of file eq/fabric/object.h.
co::Object* eq::fabric::Object::getUserData | ( | ) | [inline] |
const co::Object* eq::fabric::Object::getUserData | ( | ) | const [inline] |
virtual uint32_t eq::fabric::Object::getUserDataLatency | ( | ) | const [inline, protected, virtual] |
Reimplemented in eq::fabric::View< L, V, O >, and eq::fabric::View< Layout, View, Observer >.
Definition at line 144 of file eq/fabric/object.h.
virtual bool eq::fabric::Object::hasMasterUserData | ( | ) | [inline, protected, virtual] |
Reimplemented in eq::fabric::View< L, V, O >, and eq::fabric::View< Layout, View, Observer >.
Definition at line 141 of file eq/fabric/object.h.
virtual bool eq::fabric::Object::isDirty | ( | ) | const [virtual] |
virtual void eq::fabric::Object::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 co::Object.
Reimplemented in eq::Config, eq::fabric::Config< S, C, O, L, CV, N, V >, eq::fabric::Config< Server, Config, Observer, Layout, Canvas, Node, ConfigVisitor >, eq::fabric::Window< P, W, C >, eq::fabric::Window< Pipe, Window, Channel >, eq::fabric::Pipe< N, P, W, V >, eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >, eq::fabric::Canvas< CFG, C, S, L >, eq::fabric::Canvas< Config, Canvas, Segment, Layout >, eq::fabric::Node< C, N, P, V >, eq::fabric::Node< Config, Node, Pipe, NodeVisitor >, eq::fabric::Layout< C, L, V >, and eq::fabric::Layout< Config, Layout, View >.
virtual void eq::fabric::Object::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 co::Serializable.
Reimplemented in eq::fabric::Channel< W, C >, eq::fabric::Channel< Window, Channel >, eq::fabric::View< L, V, O >, eq::fabric::View< Layout, View, Observer >, eq::fabric::Config< S, C, O, L, CV, N, V >, eq::fabric::Config< Server, Config, Observer, Layout, Canvas, Node, ConfigVisitor >, eq::fabric::Window< P, W, C >, eq::fabric::Window< Pipe, Window, Channel >, eq::fabric::Pipe< N, P, W, V >, eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >, eq::fabric::Segment< C, S, CH >, eq::fabric::Segment< Canvas, Segment, Channel >, eq::fabric::Canvas< CFG, C, S, L >, eq::fabric::Canvas< Config, Canvas, Segment, Layout >, eq::fabric::Node< C, N, P, V >, eq::fabric::Node< Config, Node, Pipe, NodeVisitor >, eq::fabric::Observer< C, O >, eq::fabric::Observer< Config, Observer >, eq::fabric::Layout< C, L, V >, and eq::fabric::Layout< Config, Layout, View >.
void eq::fabric::Object::setError | ( | const int32_t | error | ) |
Set an error code why the last operation failed.
The error will be transmitted to the originator of the request, for example to Config::init when set from within configInit().
error | the error message. |
Referenced by eVolve::Node::configInit(), eVolve::Pipe::configInit(), eqPly::Node::configInit(), and eVolve::Window::configInitGL().
void eq::fabric::Object::setName | ( | const std::string & | name | ) |
Set the name of the object.
void eq::fabric::Object::setUserData | ( | co::Object * | userData | ) |
Set user-specific data.
Registration, mapping, commit and sync of the user data object are automatically executed when committing and syncing this object. Not all instances of the object have to set a user data object. All instances have to set the same type of object.
Referenced by eqPly::View::View(), and eqPly::View::~View().