libbmq  a5f8a06ba1d16cb5a65643e1fa7f1a1d6aadef40
BloombergLP::bmqa::MessagePropertiesIterator Class Reference

#include <bmqa_messageproperties.h>

Public Member Functions

 MessagePropertiesIterator ()
 
 MessagePropertiesIterator (const MessageProperties *properties)
 
 MessagePropertiesIterator (const MessagePropertiesIterator &other)
 Copy constructor from the specified other. More...
 
 ~MessagePropertiesIterator ()
 Destroy this iterator. More...
 
MessagePropertiesIteratoroperator= (const MessagePropertiesIterator &rhs)
 Assignment operator from the specified rhs. More...
 
bool hasNext ()
 
const bsl::string & name () const
 
bmqt::PropertyType::Enum type () const
 
bool getAsBool () const
 
char getAsChar () const
 
short getAsShort () const
 
bsl::int32_t getAsInt32 () const
 
bsls::Types::Int64 getAsInt64 () const
 
const bsl::string & getAsString () const
 
const bsl::vector< char > & getAsBinary () const
 

Detailed Description

Provide a mechanism to iterator over all the properties in an instance of bmqa::MessageProperties. The order of the iteration is implementation defined. An iterator is valid if it is associated with a property , otherwise it is invalid. Behavior is undefined if the underlying instance of bmqa::MessageProperties is modified during the lifetime of this iterator.

Constructor & Destructor Documentation

◆ MessagePropertiesIterator() [1/3]

BloombergLP::bmqa::MessagePropertiesIterator::MessagePropertiesIterator ( )

Create an empty iterator instance. The only valid operations that can be invoked on an empty instance are copying, assignment and destruction.

◆ MessagePropertiesIterator() [2/3]

BloombergLP::bmqa::MessagePropertiesIterator::MessagePropertiesIterator ( const MessageProperties properties)
explicit

Create an iterator for the specified properties. Behavior is undefined unless properties is not null.

◆ MessagePropertiesIterator() [3/3]

BloombergLP::bmqa::MessagePropertiesIterator::MessagePropertiesIterator ( const MessagePropertiesIterator other)

◆ ~MessagePropertiesIterator()

BloombergLP::bmqa::MessagePropertiesIterator::~MessagePropertiesIterator ( )

Member Function Documentation

◆ operator=()

MessagePropertiesIterator& BloombergLP::bmqa::MessagePropertiesIterator::operator= ( const MessagePropertiesIterator rhs)

◆ hasNext()

bool BloombergLP::bmqa::MessagePropertiesIterator::hasNext ( )

Advance this iterator to refer to the next property of the associated MessageProperties instance, if there is one and return true, return false otherwise. Behavior is undefined unless this method is being invoked for the first time on this object or previous call to hasNext returned true. Note that the order of the iteration is not specified.

◆ name()

const bsl::string& BloombergLP::bmqa::MessagePropertiesIterator::name ( ) const

Return a reference offering non-modifiable access to the name of the property being pointed by the iterator. Behavior is undefined unless last call to hasNext returned true.

◆ type()

bmqt::PropertyType::Enum BloombergLP::bmqa::MessagePropertiesIterator::type ( ) const

Return the data type of property being pointed by the iterator. Behavior is undefined unless last call to hasNext returned true;

◆ getAsBool()

bool BloombergLP::bmqa::MessagePropertiesIterator::getAsBool ( ) const

◆ getAsChar()

char BloombergLP::bmqa::MessagePropertiesIterator::getAsChar ( ) const

◆ getAsShort()

short BloombergLP::bmqa::MessagePropertiesIterator::getAsShort ( ) const

◆ getAsInt32()

bsl::int32_t BloombergLP::bmqa::MessagePropertiesIterator::getAsInt32 ( ) const

◆ getAsInt64()

bsls::Types::Int64 BloombergLP::bmqa::MessagePropertiesIterator::getAsInt64 ( ) const

◆ getAsString()

const bsl::string& BloombergLP::bmqa::MessagePropertiesIterator::getAsString ( ) const

◆ getAsBinary()

const bsl::vector<char>& BloombergLP::bmqa::MessagePropertiesIterator::getAsBinary ( ) const

Return property value having the corresponding type being currently being pointed by this iterator instance. Behavior is undefined unless last call to hasNext returned true. Behavior is also undefined unless property's data type matches the requested type.


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