BLPAPI C++
3.21.0
|
#include <blpapi_event.h>
Public Member Functions | |
MessageIterator (const Event &event) | |
~MessageIterator () | |
bool | next () |
bool | isValid () const |
Message | message (bool createClonable=false) const |
An iterator over the Message objects within an Event.
MessageIterator objects are used to process the individual Message objects in an Event received in an EventHandler, from EventQueue::nextEvent() or from Session::nextEvent().
This class is used to iterate over each message in an Event. The user must ensure that the Event this iterator is created for is not destroyed before the iterator.
MessageIterator | ( | const Event & | event | ) |
Construct a forward iterator to iterate over the message in the specified event
object. The MessageIterator is created in a state where next() must be called to advance it to the first item.
~MessageIterator | ( | ) |
Destructor.
bool isValid | ( | ) | const |
Returns true if this iterator is currently positioned on a valid Message. Returns false otherwise.
Message message | ( | bool | createClonable = false | ) | const |
Returns the Message at the current position of this iterator. If the specified createClonable
flag is set, the internal handle of the message returned is added a reference and the message can outlive the call to next(). If the createClonable
flag is set to false, the use of message outside the scope of the iterator or after the next() call is undefined. The behavior is undefined if isValid() returns false.
bool next | ( | ) |