From f37e619d7b7420f0d6dbfb9ea50a6fd0a00f42f1 Mon Sep 17 00:00:00 2001 From: Thomas Winget Date: Fri, 25 Sep 2020 12:18:30 -0400 Subject: [PATCH] add method to get current buffer from bt list/dict consumer --- lokimq/bt_serialize.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lokimq/bt_serialize.h b/lokimq/bt_serialize.h index dfdd12c..24bf15a 100644 --- a/lokimq/bt_serialize.h +++ b/lokimq/bt_serialize.h @@ -639,6 +639,9 @@ public: bt_list_consumer(const bt_list_consumer&) = default; bt_list_consumer& operator=(const bt_list_consumer&) = default; + /// Get a copy of the current buffer + std::string_view current_buffer() const { return data; } + /// Returns true if the next value indicates the end of the list bool is_finished() const { return data.front() == 'e'; } /// Returns true if the next element looks like an encoded string