OnixS C++ CME MDP Premium Market Data Handler 5.11.1
Users' manual and API documentation
Loading...
Searching...
No Matches
BinaryMessages Class Reference

#include <OnixS/CME/MDH/Packet.h>

Public Member Functions

 BinaryMessages (const void *messagesBegin, const void *messagesEnd, const Packet *packet=nullptr) noexcept
BinaryMessageIterator begin () const
BinaryMessageIterator end () const

Detailed Description

The underlying byte range and optional packet context must remain valid while this view or its iterators are used.

Definition at line 172 of file Packet.h.

Constructor & Destructor Documentation

◆ BinaryMessages()

BinaryMessages ( const void * messagesBegin,
const void * messagesEnd,
const Packet * packet = nullptr )
inlinenoexcept

Constructs a view over an encoded message range.

Parameters
messagesBeginAddress of the first message prefix, or messagesEnd for an empty range.
messagesEndAddress one byte past the encoded message range.
packetPacket used to provide context in iteration errors; may be nullptr.
Note
The addresses must delimit the same valid buffer and remain valid for the lifetime of this view.

Definition at line 180 of file Packet.h.

Member Function Documentation

◆ begin()

BinaryMessageIterator begin ( ) const
inline

Returns an iterator to the first encoded message.

Returns
Iterator to the beginning of the range.
Exceptions
std::runtime_errorIf the first message prefix or payload does not fit in the range, or the prefix declares a size smaller than the prefix itself.

Definition at line 193 of file Packet.h.

◆ end()

BinaryMessageIterator end ( ) const
inline

Returns an iterator past the last encoded message.

Returns
Past-the-end iterator for the range.

Definition at line 202 of file Packet.h.