AMPS C/C++ Client Class Reference
AMPS C/C++ Client Version 5.3.0.2
|
An iterable object representing the contents of an AMPS topic. More...
#include <ampsplusplus.hpp>
Classes | |
class | iterator |
Represents an iterator over messages in an AMPS topic. More... | |
Public Member Functions | |
bool | isValid () const |
Returns true if self is a valid stream that may be iterated. | |
iterator | begin (void) |
Returns an iterator representing the beginning of the topic or subscription. More... | |
iterator | end (void) |
Returns an iterator representing the end of the topic or subscription. More... | |
An iterable object representing the contents of an AMPS topic.
Objects of MesageStream type are returned by the MessageStream-returning overloads of methods on class AMPS::Client, such as AMPS::Client::sow() and AMPS::Client::subscribe() . Use this object via the begin() and end() iterators returned, for example:
For MessageStream objects returned by calls to methods other than sow(), note that the "end" is never reached, unless the server is disconnected. In this case, you may choose to stop processing messages by simply exiting the loop, i.e.:
|
inline |
Returns an iterator representing the beginning of the topic or subscription.
|
inline |
Returns an iterator representing the end of the topic or subscription.