12#ifndef STRING_INPLACE_HPP
13#define STRING_INPLACE_HPP
23 size_type position = 0;
29 void AssignBuffer(
const InPlaceBuilder &src) { this->dest = src.dest; this->position = src.position; }
50 void PutBuffer(std::span<const
char> str) override;
60 using iterator_category = std::output_iterator_tag;
Compose data into a string / buffer.
void PutChar(char c)
Append 8-bit char.
Implementation of std::back_insert_iterator for non-growing destination buffer.
Builder implementation for InPlaceReplacement.
bool AnyBytesWritten() const noexcept
Check whether any bytes have been written.
bool AnyBytesUnused() const noexcept
Check whether any unused bytes are left between the Builder and Consumer position.
std::string_view GetWrittenData() const noexcept
Get already written data.
back_insert_iterator back_inserter()
Create a back-insert-iterator.
size_type GetBytesUnused() const noexcept
Get number of unused bytes left between the Builder and Consumer position.
size_type GetBytesWritten() const noexcept
Get number of already written bytes.
void PutBuffer(std::span< const char > str) override
Append buffer.
Compose data into a fixed size buffer, which is consumed at the same time.
InPlaceBuilder builder
Builder into shared buffer.
StringConsumer consumer
Consumer from shared buffer.
Parse data from a string / buffer.
constexpr enum_type & operator++(enum_type &e)
Prefix increment.
Compose strings from textual and binary data.