#include <QAvatar.h>
Inheritance diagram for QAvatar:
Definition at line 58 of file QAvatar.h.
Public Member Functions | |
QAvatar (const long &) | |
Parameterized constructor takes an identification number. | |
QAvatar (const long &, const size_t &, const size_t &, const size_t &) | |
Parameterized constructor takes id and data sizes. | |
virtual | ~QAvatar () |
Virtual destructor. | |
virtual void | lock () |
Locks the avatar's mutex. | |
virtual void | unlock () |
Unlocks the avatar's mutex. | |
long | getID () |
Returns the avatar's identification number. | |
void | setAuxData (const char *, const size_t &) |
Sets the avatar's aux data. | |
void | setHelloData (const char *, const size_t &) |
Sets the avatar's hello data. | |
void | setTrackerData (const char *, const size_t &) |
Sets the avatar's tracker data. | |
double | getLastUpdateTime () |
Returns the last time the avatar was updated. | |
void | markUpdateTime () |
Marks the avatar as updated. | |
Protected Attributes | |
const long | m_id |
Unique identification number for the avatar. | |
double | m_lastUpdateTime |
Last time the avatar was updated. | |
QUANTAts_mutex_c * | m_mutex |
Mutual exclusion lock can serialize multi-thread access. |
|
Parameterized constructor takes id and data sizes. The parameterized constructor initializes the instance's constants using its paramters. The order is important, as other the data sizes will not be correct during program execution. This constructor is preferred, and subclasses should perform call it from their own constructors. The data buffer sizes may only be set once, so make sure that there is appropriate memory allocated.
Definition at line 66 of file QAvatar.cxx. |
|
Virtual destructor. The destructor deletes the avatar's m_mutex. It also deletes all data buffers that have been allocated for use with the avatar instance. Definition at line 77 of file QAvatar.cxx. References m_auxData, m_helloData, m_mutex, and m_trackerData. |
|
Sets the avatar's aux data. This method accepts a pointer to a data buffer and the size of that data. These values are copied into the avatar's aux data.
Definition at line 148 of file QAvatar.cxx. References m_auxData, and m_auxSize. Referenced by QAvatarManager::handleHailingData(). |
|
Sets the avatar's hello data. This method accepts a pointer to a data buffer and the size of that data. These values are copied into the avatar's hello data.
Definition at line 166 of file QAvatar.cxx. References m_helloData, and m_helloSize. Referenced by QAvatarManager::handleHailingData(). |
|
Sets the avatar's tracker data. This method accepts a pointer to a data buffer and the size of that data. These values are copied into the avatar's tracker data.
Definition at line 184 of file QAvatar.cxx. References m_trackerData, and m_trackerSize. Referenced by QAvatarManager::handleTrackerData(). |