#include <ObjectQueue.h>
Public Member Functions | |
ObjectQueue () | |
virtual | ~ObjectQueue () |
bool | unitTest () |
Object * | clone () const |
bool | isEmpty () |
int | getCount () |
bool | removeAll () |
ObjectCollection * | retrieveAll () |
JString | add (Object *obj) |
Add and return newly created id. | |
JString | add (JString id, Object *obj) |
virtual unsigned long | getPayloadSize () const |
Get total size of payload. | |
JString | waitForNewEntryID (long ms) |
use to block until Queue is no longer empty | |
bool | waitForNewEntryToAppear (long ms) |
Object * | waitForNewEntry (long ms) |
Object * | waitForNewEntry (JString id, long ms) |
Object * | retrieveEntry (JString id) |
Object * | retrieveEntry (int pos) |
Object * | viewEntry (JString id) |
Object * | viewEntry (int pos) |
long | getBinarySize (int chunk) |
Get the size of binary data chunk, -1 for all chunks. | |
int | getBinaryChunkCount () |
Get the number of data chunks. | |
long | toBinaryBuffer (int chunk, char *buffer, int maxlen) |
Write binary data to buffer at chunk number 'chunk'. | |
bool | fromBinaryBuffer (int chunk, char *buffer, long len) |
Set the data after separate reception. | |
Public Attributes | |
ObjectDictionary * | dict |
Protected Attributes | |
JMutex | mutex |
JSemaphore | sem |
Definition at line 42 of file ObjectQueue.h.
cmlabs::ObjectQueue::ObjectQueue | ( | ) |
Definition at line 33 of file ObjectQueue.cpp.
cmlabs::ObjectQueue::~ObjectQueue | ( | ) | [virtual] |
Definition at line 39 of file ObjectQueue.cpp.
bool cmlabs::ObjectQueue::unitTest | ( | ) | [virtual] |
Object* cmlabs::ObjectQueue::clone | ( | ) | const [virtual] |
bool cmlabs::ObjectQueue::isEmpty | ( | ) |
Definition at line 49 of file ObjectQueue.cpp.
int cmlabs::ObjectQueue::getCount | ( | ) |
Definition at line 60 of file ObjectQueue.cpp.
bool cmlabs::ObjectQueue::removeAll | ( | ) |
Definition at line 69 of file ObjectQueue.cpp.
ObjectCollection * cmlabs::ObjectQueue::retrieveAll | ( | ) |
Definition at line 76 of file ObjectQueue.cpp.
Definition at line 104 of file ObjectQueue.cpp.
unsigned long cmlabs::ObjectQueue::getPayloadSize | ( | ) | const [virtual] |
Get total size of payload.
Reimplemented from cmlabs::Object.
Definition at line 45 of file ObjectQueue.cpp.
JString cmlabs::ObjectQueue::waitForNewEntryID | ( | long | ms | ) |
bool cmlabs::ObjectQueue::waitForNewEntryToAppear | ( | long | ms | ) |
Definition at line 171 of file ObjectQueue.cpp.
Object * cmlabs::ObjectQueue::waitForNewEntry | ( | long | ms | ) |
Definition at line 142 of file ObjectQueue.cpp.
Definition at line 200 of file ObjectQueue.cpp.
Definition at line 234 of file ObjectQueue.cpp.
Object * cmlabs::ObjectQueue::retrieveEntry | ( | int | pos | ) |
Definition at line 243 of file ObjectQueue.cpp.
Definition at line 252 of file ObjectQueue.cpp.
Object * cmlabs::ObjectQueue::viewEntry | ( | int | pos | ) |
Definition at line 256 of file ObjectQueue.cpp.
long cmlabs::ObjectQueue::getBinarySize | ( | int | chunk | ) | [virtual] |
Get the size of binary data chunk, -1 for all chunks.
Get the size of any binary data.
Reimplemented from cmlabs::Object.
Definition at line 266 of file ObjectQueue.cpp.
int cmlabs::ObjectQueue::getBinaryChunkCount | ( | ) | [virtual] |
Get the number of data chunks.
Reimplemented from cmlabs::Object.
Definition at line 273 of file ObjectQueue.cpp.
long cmlabs::ObjectQueue::toBinaryBuffer | ( | int | chunk, | |
char * | buffer, | |||
int | maxlen | |||
) | [virtual] |
Write binary data to buffer at chunk number 'chunk'.
Get a pointer to the binary data at chunk number 'chunk'.
Reimplemented from cmlabs::Object.
Definition at line 280 of file ObjectQueue.cpp.
bool cmlabs::ObjectQueue::fromBinaryBuffer | ( | int | chunk, | |
char * | buffer, | |||
long | len | |||
) | [virtual] |
Set the data after separate reception.
Reimplemented from cmlabs::Object.
Definition at line 287 of file ObjectQueue.cpp.
Definition at line 85 of file ObjectQueue.h.
JMutex cmlabs::ObjectQueue::mutex [protected] |
Definition at line 89 of file ObjectQueue.h.
JSemaphore cmlabs::ObjectQueue::sem [protected] |
Definition at line 90 of file ObjectQueue.h.