mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-21 04:04:52 +00:00
Add iterators to Buffer
This commit is contained in:
@@ -49,8 +49,16 @@ namespace cppkafka {
|
||||
*/
|
||||
class Buffer {
|
||||
public:
|
||||
/**
|
||||
* The type of data this buffer points to
|
||||
*/
|
||||
using DataType = unsigned char;
|
||||
|
||||
/**
|
||||
* The const iterator type
|
||||
*/
|
||||
using const_iterator = const DataType*;
|
||||
|
||||
/**
|
||||
* Constructs an empty buffer
|
||||
*/
|
||||
@@ -94,6 +102,16 @@ public:
|
||||
*/
|
||||
size_t get_size() const;
|
||||
|
||||
/**
|
||||
* Gets an iterator to the beginning of this buffer
|
||||
*/
|
||||
const_iterator begin() const;
|
||||
|
||||
/**
|
||||
* Gets an iterator to the end of this buffer
|
||||
*/
|
||||
const_iterator end() const;
|
||||
|
||||
/**
|
||||
* Checks whether this is a non empty buffer
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user