summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/LocalQueue.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-01-04 16:49:29 +0000
committerGordon Sim <gsim@apache.org>2008-01-04 16:49:29 +0000
commit808e18100fda27d1f349422ffa7e5a3dc10343be (patch)
treeaf7ab3ad0821fc3f8cd3f67350cc9e453c7b4e04 /cpp/src/qpid/client/LocalQueue.cpp
parent02c036d9684fc3a326577d2aaeaf956690ea8816 (diff)
downloadqpid-python-808e18100fda27d1f349422ffa7e5a3dc10343be.tar.gz
Provide method to test for empty local queue.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@608915 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/LocalQueue.cpp')
-rw-r--r--cpp/src/qpid/client/LocalQueue.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/src/qpid/client/LocalQueue.cpp b/cpp/src/qpid/client/LocalQueue.cpp
index 7fbe4a053e..f44a04837b 100644
--- a/cpp/src/qpid/client/LocalQueue.cpp
+++ b/cpp/src/qpid/client/LocalQueue.cpp
@@ -47,4 +47,11 @@ Message LocalQueue::pop() {
void LocalQueue::setAckPolicy(AckPolicy a) { autoAck=a; }
+bool LocalQueue::empty()
+{
+ if (!queue)
+ throw ClosedException();
+ return queue->isEmpty();
+}
+
}} // namespace qpid::client