ParsingBuffer.cc
Go to the documentation of this file.
37 return extraMemory_ ? (extraMemory_->length() + extraMemory_->spaceSize()) : readerSuppliedMemory_.length;
114 throw TextException(ToSBuf("no support for a single memory block of ", contentSize(), '+', minimumSpaceSize, " bytes"), Here());
176 debugs(90, 7, "slowly exporting " << result.length << " bytes from " << extraMemory_->id << " back into " << readerSuppliedMemory_);
std::optional< S > IncreaseSum(const S s, const T t)
argument pack expansion termination for IncreaseSum<S, T, Args...>()
Definition: SquidMath.h:144
Definition: StoreIOBuffer.h:16
void consume(size_t)
get rid of previously appended() prefix of a given size
Definition: ParsingBuffer.cc:68
void growSpace(size_t)
makes sure we have the requested number of bytes, allocates enough memory if needed
Definition: ParsingBuffer.cc:110
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
void appended(const char *, size_t)
remember the new bytes received into the previously provided space()
Definition: ParsingBuffer.cc:47
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63