diff options
| author | Alan Conway <aconway@apache.org> | 2008-11-05 21:20:34 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-11-05 21:20:34 +0000 |
| commit | 6a6005d60961fd51900ec2177c723759dfcc71ec (patch) | |
| tree | 2a6283fc2c136bc6279d58a23027195f9d515c75 /cpp/src/qpid/client/LocalQueue.h | |
| parent | 359f60c318627900c3ac216496486c42d1a4df8a (diff) | |
| download | qpid-python-6a6005d60961fd51900ec2177c723759dfcc71ec.tar.gz | |
QPID-1294 (Johnathan Robie) Improved doxygen generation.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@711702 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/LocalQueue.h')
| -rw-r--r-- | cpp/src/qpid/client/LocalQueue.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/cpp/src/qpid/client/LocalQueue.h b/cpp/src/qpid/client/LocalQueue.h index 2b878b2939..30ea00612d 100644 --- a/cpp/src/qpid/client/LocalQueue.h +++ b/cpp/src/qpid/client/LocalQueue.h @@ -37,7 +37,37 @@ namespace client { * local queue until you retrieve them. * * \ingroup clientapi + * + * \details Using a Local Queue + * + * <pre> + * LocalQueue local_queue; + * subscriptions.subscribe(local_queue, string("message_queue")); + * for (int i=0; i<10; i++) { + * Message message = local_queue.get(); + * std::cout << message.getData() << std::endl; + * } + * </pre> + * + * <h2>Getting Messages</h2> + * + * <ul><li> + * <p>get()</p> + * <pre>Message message = local_queue.get();</pre> + * <pre>// Specifying timeouts (TIME_SEC, TIME_MSEC, TIME_USEC, TIME_NSEC) + *#include <qpid/sys/Time.h> + *Message message; + *local_queue.get(message, 5*sys::TIME_SEC);</pre></li></ul> + * + * <h2>Checking size</h2> + * <ul><li> + * <p>empty()</p> + * <pre>if (local_queue.empty()) { ... }</pre></li> + * <li><p>size()</p> + * <pre>std::cout << local_queue.size();</pre></li> + * </ul> */ + class LocalQueue { public: /** Create a local queue. Subscribe the local queue to a remote broker |
