ParsingBuffer.h
Go to the documentation of this file.
Definition: StoreIOBuffer.h:16
Definition: ParsingBuffer.h:36
void consume(size_t)
get rid of previously appended() prefix of a given size
Definition: ParsingBuffer.cc:68
const char * c_str()
a NUL-terminated version of content(); same lifetime as content()
Definition: ParsingBuffer.h:45
void growSpace(size_t)
makes sure we have the requested number of bytes, allocates enough memory if needed
Definition: ParsingBuffer.cc:110
StoreIOBuffer readerSuppliedMemory_
externally allocated buffer we were seeded with (or a zero-size one)
Definition: ParsingBuffer.h:108
size_t contentSize() const
the total number of append()ed bytes that were not consume()d
Definition: ParsingBuffer.cc:41
void print(std::ostream &) const
summarizes object state (for debugging)
Definition: ParsingBuffer.cc:184
const char * memory() const
a read-only content start (or nil for some zero-size buffers)
Definition: ParsingBuffer.cc:29
ParsingBuffer()=default
creates buffer without any space or content
SBuf toSBuf() const
export content() into SBuf, avoiding content copying when possible
Definition: ParsingBuffer.cc:134
StoreIOBuffer makeSpace(size_t pageSize)
Definition: ParsingBuffer.cc:91
size_t capacity() const
the maximum number of bytes we can store without allocating more space
Definition: ParsingBuffer.cc:35
StoreIOBuffer makeInitialSpace()
Definition: ParsingBuffer.h:84
size_t readerSuppliedMemoryContentSize_
append()ed to readerSuppliedMemory_ bytes that were not consume()d
Definition: ParsingBuffer.h:111
void appended(const char *, size_t)
remember the new bytes received into the previously provided space()
Definition: ParsingBuffer.cc:47
Definition: SquidConfig.h:62
std::ostream & operator<<(std::ostream &os, const ParsingBuffer &b)
Definition: ParsingBuffer.h:119