sparrow 1.0.0
|
Custom view for lazily extracting key-value pairs from a binary buffer. More...
#include <metadata.hpp>
Public Member Functions | |
SPARROW_API | key_value_view (const char *ptr) |
Constructs a view over the given binary metadata buffer. | |
SPARROW_API key_value_view_iterator | cbegin () const |
Gets const iterator to the beginning of the metadata pairs. | |
SPARROW_API key_value_view_iterator | begin () const |
Gets iterator to the beginning of the metadata pairs. | |
SPARROW_API key_value_view_iterator | cend () const |
Gets const iterator to the end of the metadata pairs. | |
SPARROW_API key_value_view_iterator | end () const |
Gets iterator to the end of the metadata pairs. | |
SPARROW_API size_t | size () const |
Gets the number of key-value pairs in the metadata. | |
Custom view for lazily extracting key-value pairs from a binary buffer.
This class provides a range-like interface over metadata stored in binary format. It implements lazy extraction, meaning key-value pairs are only parsed when accessed through iteration. This approach is memory-efficient and allows processing of large metadata sets without upfront parsing overhead.
The binary format consists of:
Definition at line 220 of file metadata.hpp.
SPARROW_API sparrow::key_value_view::key_value_view | ( | const char * | ptr | ) |
Constructs a view over the given binary metadata buffer.
ptr | Pointer to the start of the binary metadata buffer |
|
nodiscard |
Gets iterator to the beginning of the metadata pairs.
|
nodiscard |
Gets const iterator to the beginning of the metadata pairs.
|
nodiscard |
Gets const iterator to the end of the metadata pairs.
|
nodiscard |
Gets iterator to the end of the metadata pairs.
|
nodiscard |
Gets the number of key-value pairs in the metadata.