#include <PackableStream.h>


Public Member Functions | |
PackableStreamBuf (Packable &p) | |
virtual | ~PackableStreamBuf ()=default |
Protected Member Functions | |
virtual int_type | overflow (int_type aChar=traits_type::eof()) override |
virtual int | sync () override |
virtual std::streamsize | xsputn (const char *chars, std::streamsize number) override |
Private Member Functions | |
void | lowAppend (const char *s, const std::streamsize n) |
Private Attributes | |
Packable & | buf_ |
Detailed Description
Provides a streambuf interface for writing to Packable objects. Typical use is via a PackableStream rather than direct manipulation
Definition at line 20 of file PackableStream.h.
Constructor & Destructor Documentation
◆ PackableStreamBuf()
|
inlineexplicit |
Definition at line 23 of file PackableStream.h.
References buf_, Packable::buffer(), and ~PackableStreamBuf().
◆ ~PackableStreamBuf()
|
virtualdefault |
Referenced by PackableStreamBuf().
Member Function Documentation
◆ lowAppend()
|
inlineprivate |
Definition at line 62 of file PackableStream.h.
References Packable::append(), and buf_.
Referenced by overflow(), sync(), and xsputn().
◆ overflow()
|
inlineoverrideprotectedvirtual |
flush the current buffer and the character that is overflowing to the Packable.
Definition at line 30 of file PackableStream.h.
References lowAppend(), and sync().
◆ sync()
|
inlineoverrideprotectedvirtual |
push the buffer to the Packable
Definition at line 46 of file PackableStream.h.
References buf_, Packable::flush(), and lowAppend().
Referenced by overflow().
◆ xsputn()
|
inlineoverrideprotectedvirtual |
write multiple characters to the Packable
- this is an optimisation method.
Definition at line 56 of file PackableStream.h.
References lowAppend().
Member Data Documentation
◆ buf_
|
private |
Definition at line 64 of file PackableStream.h.
Referenced by lowAppend(), PackableStreamBuf(), and sync().
The documentation for this class was generated from the following file:
- src/base/PackableStream.h