|
BCNP 3.2.1
Batched Command Network Protocol
|
Forward iterator for zero-copy message access from packet payload. More...
#include <packet.h>
Public Types | |
| using | iterator_category = std::forward_iterator_tag |
| using | value_type = MsgType |
| using | difference_type = std::ptrdiff_t |
| using | pointer = const MsgType* |
| using | reference = MsgType |
Public Member Functions | |
| MessageIterator (const uint8_t *ptr, std::size_t count) | |
| Construct iterator at a position in the payload. | |
| MsgType | operator* () const |
| Decode and return the current message. | |
| MessageIterator & | operator++ () |
| Advance to the next message (pre-increment). | |
| MessageIterator | operator++ (int) |
| Advance to the next message (post-increment). | |
| bool | operator== (const MessageIterator &other) const |
| Equality comparison (end iterators compare equal). | |
| bool | operator!= (const MessageIterator &other) const |
| Inequality comparison. | |
Forward iterator for zero-copy message access from packet payload.
Allows iterating over messages in a PacketView without copying them to intermediate storage. Each dereference decodes the message on-the-fly from the raw wire bytes.
| MsgType | The message struct type (must have Decode() and kWireSize) |
| using bcnp::MessageIterator< MsgType >::difference_type = std::ptrdiff_t |
| using bcnp::MessageIterator< MsgType >::iterator_category = std::forward_iterator_tag |
| using bcnp::MessageIterator< MsgType >::pointer = const MsgType* |
| using bcnp::MessageIterator< MsgType >::reference = MsgType |
| using bcnp::MessageIterator< MsgType >::value_type = MsgType |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |