version 1.43, 2006/08/25 17:48:11
|
version 1.44, 2006/08/25 17:58:57
|
|
|
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
#include <Pegasus/Common/Message.h> | #include <Pegasus/Common/Message.h> |
#include <Pegasus/Common/Mutex.h> | #include <Pegasus/Common/Mutex.h> |
|
#include <Pegasus/Common/List.h> |
#include <Pegasus/Common/Linkage.h> | #include <Pegasus/Common/Linkage.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
|
|
virtual Message* dequeue(); | virtual Message* dequeue(); |
| |
/** Returns true if there are no messages on the queue. */ | /** Returns true if there are no messages on the queue. */ |
Boolean isEmpty() const throw() { return _front == 0; } |
Boolean isEmpty() const { return _messageList.is_empty(); } |
| |
/** Returns the number of messages on the queue. */ | /** Returns the number of messages on the queue. */ |
Uint32 getCount() const throw() { return _count; } |
Uint32 getCount() const { return _messageList.size(); } |
| |
/** Retrieve the queue id for this queue. */ | /** Retrieve the queue id for this queue. */ |
Uint32 getQueueId() const throw() { return _queueId; } | Uint32 getQueueId() const throw() { return _queueId; } |
|
|
return _capabilities; | return _capabilities; |
} | } |
| |
#ifdef PEGASUS_DEBUG |
|
/** Prints the contents of this queue by calling the print() method |
|
of each message. |
|
@param os stream onto which the output is placed. |
|
@exception IPCException Thrown if an IPC error occurs. |
|
*/ |
|
void print(PEGASUS_STD(ostream)& os) const; |
|
#endif |
|
|
|
/** Provide a string name for this queue to be used by the print method. | /** Provide a string name for this queue to be used by the print method. |
*/ | */ |
const char* getQueueName() const; | const char* getQueueName() const; |
|
|
Uint32 _capabilities; | Uint32 _capabilities; |
| |
private: | private: |
Mutex _mut; |
List<Message, Mutex> _messageList; |
Uint32 _count; |
|
Message* _front; |
|
Message* _back; |
|
Boolean _async; | Boolean _async; |
}; | }; |
| |