A component which defines events related operations.
More...
A component which defines events related operations.
- Purpose:
- A component which defines events related operations
-
- Classes:
blpapi::Event | an event resulting from a subscription or request. |
blpapi::EventQueue | A construct to handle replies synchronously. |
blpapi::MessageIterator | An iterator over the Messages within an Event. |
-
- Description:
- This file defines an
Event
. One or more Event
s are generated as a result of a subscription or a request. Event
s contain Message
objects which can be accessed using range based for
loop or a MessageIterator
. This file also defines a EventQueue
for handling replies synchronously.
-
- Usage:
- There are two ways to iterate the messages in an
Event
. for (Message msg : event) {
...
}
OR MessageIterator iter(event);
while (iter.next()) {
Message msg = iter.message();
...
}
- The following code snippet shows a how a
EventQueue
is used with a generateToken
request. For any established session session
pass an EventQueue
object tokenEventQueue
when calling generateToken
. All Events in responses to generateToken
request will be returned in tokenEventQueue
. EventQueue tokenEventQueue;
session->generateToken(CorrelationId(), &tokenEventQueue);
- Synchronously read the response
event
and parse over messages Event event = tokenEventQueue.nextEvent();
if (event.eventType() == Event::TOKEN_STATUS) {
for (Message msg : event) {
}
}
◆ operator!=()
Return true if the specified lhs
and rhs
are not equal.
◆ operator==()
Return true if the specified lhs
and rhs
are the same iterator, or both are end iterators.
◆ swap()
Swap the contents of the lhs
and rhs
iterators.