libbmq  a5f8a06ba1d16cb5a65643e1fa7f1a1d6aadef40
BloombergLP::bmqa::MessageEvent Class Reference

#include <bmqa_messageevent.h>

Public Member Functions

 MessageEvent ()
 
MessageIterator messageIterator () const
 
bmqt::MessageEventType::Enum type () const
 Return the type of messages contained in this MessageEvent. More...
 
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
 

Detailed Description

An event containing messages received from a queue. The application can consume messages using the message iterator.

Constructor & Destructor Documentation

◆ MessageEvent()

BloombergLP::bmqa::MessageEvent::MessageEvent ( )

Create an unset instance. Note that type() will return bmqt::MessageEventType::UNDEFINED.

Member Function Documentation

◆ messageIterator()

MessageIterator BloombergLP::bmqa::MessageEvent::messageIterator ( ) const

Return a MessageIterator object usable for iterating over the Message objects contained in this MessageEvent. Note that obtaining an iterator invalidates (resets) any previously obtained iterator. The behavior is undefined if type() returns bmqt::MessageEventType::UNDEFINED.

◆ type()

bmqt::MessageEventType::Enum BloombergLP::bmqa::MessageEvent::type ( ) const

◆ print()

bsl::ostream& BloombergLP::bmqa::MessageEvent::print ( bsl::ostream &  stream,
int  level = 0,
int  spacesPerLevel = 4 
) const

Format this object to the specified output stream at the (absolute value of) the optionally specified indentation level and return a reference to stream. If level is specified, optionally specify spacesPerLevel, the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative format the entire output on one line, suppressing all but the initial indentation (as governed by level). If stream is not valid on entry, this operation has no effect.

Referenced by BloombergLP::bmqa::operator<<().


The documentation for this class was generated from the following file: