#include <object.h>


Definition at line 24 of file object.h.
Packet Transmission | |
| class | Session |
| class | DeltaMasterCM |
| class | DeltaSlaveCM |
| class | FullMasterCM |
| class | FullSlaveCM |
| class | StaticMasterCM |
| class | StaticSlaveCM |
| class | UnbufferedMasterCM |
| bool | send (NodePtr node, ObjectPacket &packet) |
| bool | send (NodePtr node, ObjectPacket &packet, const std::string &string) |
| bool | send (NodePtr node, ObjectPacket &packet, const void *data, const uint64_t size) |
| bool | send (NodeVector nodes, ObjectPacket &packet, const void *data, const uint64_t size) |
Methods used by session during mapping. | |
| void | setupChangeManager (const Object::ChangeType type, const bool master, const uint32_t masterInstanceID=EQ_ID_INVALID) |
| Setup the change manager. | |
| Object (const Object &) | |
| Copy constructor. | |
| const Object & | operator= (const Object &) |
| NOP assignment operator. | |
Public Types | |
| enum | ObsoleteFlags { AUTO_OBSOLETE_COUNT_VERSIONS = 0, AUTO_OBSOLETE_COUNT_COMMITS = 1 } |
| Flags for auto obsoletion. | |
| enum | Version { VERSION_NONE = 0, VERSION_INVALID = 0xfffffffeu, VERSION_HEAD = 0xffffffffu } |
| Special version enums. | |
| enum | ChangeType { STATIC, INSTANCE, DELTA, UNBUFFERED } |
| Object change handling characteristics. More... | |
Public Member Functions | |
| Object () | |
| Construct a new object. | |
| virtual void | attachToSession (const uint32_t id, const uint32_t instanceID, Session *session) |
| virtual void | makeThreadSafe () |
| Make this object thread safe. | |
| bool | isThreadSafe () const |
| NodePtr | getLocalNode () |
| const Session * | getSession () const |
| Session * | getSession () |
| uint32_t | getID () const |
| uint32_t | getInstanceID () const |
| bool | isMaster () const |
Versioning | |
| virtual Object::ChangeType | getChangeType () const |
| uint32_t | commit () |
| Commit a new version of this object. | |
| uint32_t | commitNB () |
| Start committing a new version of this object. | |
| uint32_t | commitSync (const uint32_t commitID) |
| Finalizes a commit transaction. | |
| void | obsolete (const uint32_t version) |
| Explicitly obsoletes all versions including version. | |
| void | setAutoObsolete (const uint32_t count, const uint32_t flags=AUTO_OBSOLETE_COUNT_VERSIONS) |
| Automatically obsolete old versions. | |
| uint32_t | getAutoObsoleteCount () const |
| uint32_t | sync (const uint32_t version=VERSION_HEAD) |
| Sync to a given version. | |
| uint32_t | getHeadVersion () const |
| uint32_t | getVersion () const |
| uint32_t | getOldestVersion () const |
| virtual void | notifyNewHeadVersion (const uint32_t version) |
| Notification that a new head version was received by a slave object. | |
Protected Member Functions | |
Automatic Instantiation and Versioning | |
| virtual void | getInstanceData (DataOStream &os)=0 |
| Serialize the instance information about this managed object. | |
| virtual void | applyInstanceData (DataIStream &is)=0 |
| Deserialize the instance data. | |
| virtual void | pack (DataOStream &os) |
| Serialize the modifications since the last call to commit(). | |
| virtual void | unpack (DataIStream &is) |
| Deserialize a change. | |
| uint32_t | getMasterInstanceID () const |
| void | addSlave (NodePtr node, const uint32_t instanceID, const uint32_t version) |
| Add a slave subscriber. | |
| void | removeSlave (NodePtr node) |
| Remove a subscribed slave. | |
| eq::net::Object::Object | ( | const Object & | object | ) | [protected] |
| void eq::net::Object::makeThreadSafe | ( | ) | [virtual] |
Make this object thread safe.
The caller has to ensure that no other thread is using this object when this function is called. It is primarily used by the session during object instantiation.
Definition at line 120 of file object.cpp.
References eq::net::ObjectCM::makeThreadSafe().
Referenced by eq::Node::getBarrier(), and eq::Node::getFrameData().


| uint32_t eq::net::Object::getID | ( | ) | const [inline] |
Definition at line 82 of file object.h.
Referenced by eq::net::FullSlaveCM::_unpackOneVersion(), eq::net::StaticSlaveCM::applyMapData(), eq::net::FullSlaveCM::applyMapData(), eqPly::VertexBufferDist::getInstanceData(), eq::Config::handleViewResize(), eq::net::Session::mapObjectNB(), eq::Channel::processEvent(), eq::net::ObjectInstanceDataOStream::sendBuffer(), eq::net::ObjectDeltaDataOStream::sendBuffer(), eq::net::ObjectInstanceDataOStream::sendFooter(), eq::net::ObjectDeltaDataOStream::sendFooter(), eq::net::FullSlaveCM::sync(), and eq::FrameData::transmit().

| uint32_t eq::net::Object::getInstanceID | ( | ) | const [inline] |
Definition at line 84 of file object.h.
Referenced by eq::net::FullSlaveCM::_unpackOneVersion(), eq::net::StaticSlaveCM::applyMapData(), eq::net::FullSlaveCM::applyMapData(), eq::net::FullSlaveCM::sync(), and eq::FrameData::update().

| bool eq::net::Object::isMaster | ( | ) | const [inline] |
Definition at line 87 of file object.h.
Referenced by eq::net::Session::mapObjectNB(), eq::net::Session::mapObjectSync(), and eq::net::Session::unmapObject().

| virtual Object::ChangeType eq::net::Object::getChangeType | ( | ) | const [inline, virtual] |
Reimplemented in eq::Frame, eq::FrameData, eq::View, and eq::net::Barrier.
Definition at line 94 of file object.h.
Referenced by eq::net::FullMasterCM::addSlave(), eq::net::UnbufferedMasterCM::commitNB(), eq::net::FullMasterCM::commitNB(), eq::net::DeltaMasterCM::commitNB(), and eq::net::Session::registerObject().

| uint32_t eq::net::Object::commit | ( | ) |
Commit a new version of this object.
If the object has not changed no new version will be generated, that is, the previous version number is returned. This method is a convenience function for commitNB(); commitSync()
Definition at line 235 of file object.cpp.
References commitNB(), and commitSync().
Referenced by eq::Config::startFrame().


| uint32_t eq::net::Object::commitNB | ( | ) | [inline] |
Start committing a new version of this object.
The commit transaction has to be completed using commitSync, passing the returned identifier.
Definition at line 118 of file object.h.
Referenced by commit().

| uint32_t eq::net::Object::commitSync | ( | const uint32_t | commitID | ) | [inline] |
| void eq::net::Object::obsolete | ( | const uint32_t | version | ) | [inline] |
| void eq::net::Object::setAutoObsolete | ( | const uint32_t | count, | |
| const uint32_t | flags = AUTO_OBSOLETE_COUNT_VERSIONS | |||
| ) | [inline] |
Automatically obsolete old versions.
Flags are a bitwise combination of the following values:
AUTO_OBSOLETE_COUNT_VERSIONS: count 'full' versions are retained. AUTO_OBSOLETE_COUNT_COMMIT: The versions for the last count commits are retained. Note that the number of versions may be less since commit may not generate a new version. This flags takes precedence over AUTO_OBSOLETE_COUNT_VERSIONS.
| count | the number of versions to retain, excluding the head version. | |
| flags | additional flags for the auto-obsoletion mechanism |
| uint32_t eq::net::Object::getAutoObsoleteCount | ( | ) | const [inline] |
| uint32_t eq::net::Object::sync | ( | const uint32_t | version = VERSION_HEAD |
) | [inline] |
Sync to a given version.
Syncing to VERSION_HEAD syncs to the last received version, does not block, ignores the timeout and always returns true.
| version | the version to synchronize, must be bigger than the current version. |
Definition at line 171 of file object.h.
Referenced by eq::Node::getBarrier(), eq::Pipe::getFrame(), and eq::Node::getFrameData().

| uint32_t eq::net::Object::getHeadVersion | ( | ) | const [inline] |
| uint32_t eq::net::Object::getVersion | ( | ) | const [inline] |
Definition at line 179 of file object.h.
Referenced by eq::FrameData::addListener(), eq::Node::getFrameData(), eq::FrameData::setReady(), and eq::FrameData::transmit().

| uint32_t eq::net::Object::getOldestVersion | ( | ) | const [inline] |
| virtual void eq::net::Object::notifyNewHeadVersion | ( | const uint32_t | version | ) | [inline, virtual] |
Notification that a new head version was received by a slave object.
The notification is send from the command thread, which is different from the node main thread. The object should not be sync()'ed from this notification, as this might lead to synchronization issues with the application thread changing the object. Its purpose is to send a message to the application, which then takes the appropriate action.
| version | The new head version. |
| void eq::net::Object::setupChangeManager | ( | const Object::ChangeType | type, | |
| const bool | master, | |||
| const uint32_t | masterInstanceID = EQ_ID_INVALID | |||
| ) |
Setup the change manager.
| type | the type of the change manager. | |
| master | true if this object is the master. | |
| masterInstanceID | the instance identifier of the master object, when master == false. |
Definition at line 241 of file object.cpp.
References DELTA, INSTANCE, STATIC, and UNBUFFERED.
| virtual void eq::net::Object::getInstanceData | ( | DataOStream & | os | ) | [protected, pure virtual] |
Serialize the instance information about this managed object.
The default implementation uses the data provided by setInstanceData.
| os | The output stream. |
Implemented in eq::Frame, eq::FrameData, eq::View, eq::net::Barrier, and eqPly::VertexBufferDist.
Referenced by eq::net::UnbufferedMasterCM::addSlave(), and eq::net::StaticMasterCM::addSlave().

| virtual void eq::net::Object::applyInstanceData | ( | DataIStream & | is | ) | [protected, pure virtual] |
Deserialize the instance data.
This method is called during object mapping to populate slave instances with the master object's data. The default implementation writes the data into the memory declared by setInstanceData.
| is | the input stream. |
Implemented in eq::Frame, eq::FrameData, eq::View, eq::net::Barrier, and eqPly::VertexBufferDist.
Referenced by eq::net::StaticSlaveCM::applyMapData(), and eq::net::FullSlaveCM::applyMapData().

| virtual void eq::net::Object::pack | ( | DataOStream & | os | ) | [inline, protected, virtual] |
Serialize the modifications since the last call to commit().
No new version will be created if no data is written to the ostream. The default implementation uses the data provided by setDeltaData or setInstanceData.
| os | the output stream. |
Reimplemented in eq::View, and eq::net::Barrier.
| virtual void eq::net::Object::unpack | ( | DataIStream & | is | ) | [inline, protected, virtual] |
Deserialize a change.
The default implementation writes the data into the memory declared by setDeltaData or setInstanceData.
| is | the input data stream. |
Reimplemented in eq::net::Barrier.
Definition at line 279 of file object.h.
Referenced by eq::net::FullSlaveCM::_unpackOneVersion().

| uint32_t eq::net::Object::getMasterInstanceID | ( | ) | const [inline, protected] |
| void eq::net::Object::addSlave | ( | NodePtr | node, | |
| const uint32_t | instanceID, | |||
| const uint32_t | version | |||
| ) | [inline, protected] |
| void eq::net::Object::removeSlave | ( | NodePtr | node | ) | [inline, protected] |
0.6 by
1.5.5