An output streambuf for memory access. More...
Public Member Functions | |
out_base ()=default | |
Default construct. More... | |
out_base (char *s, std::streamsize n) | |
Construct for character array (can be nullptr) and number of bytes. More... | |
void | resetp (char *s, std::streamsize n) |
Reset put buffer with character data (can be nullptr) and count. More... | |
std::streamsize | span_tellp () const |
The current buffer put position. More... | |
std::streamsize | span_capacity () const |
The put buffer capacity. More... | |
char * | data_bytes () const |
The span data (start of output characters) More... | |
std::streamsize | size_bytes () const |
The span size (size of output buffer) More... | |
stdFoam::span< const char > | view () const |
void | info (Ostream &os) const |
Some information about the output buffer position/capacity. More... | |
Protected Member Functions | |
virtual std::streamsize | xsputn (const char *s, std::streamsize n) |
Put sequence of characters to a fixed region. More... | |
Protected Member Functions inherited from memorybuf | |
virtual std::streampos | seekoff (std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out) |
Set position pointer to relative position. More... | |
virtual std::streampos | seekpos (std::streampos pos, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out) |
Set position pointer to absolute position. More... | |
An output streambuf for memory access.
Definition at line 388 of file memoryStreamBuffer.H.
|
default |
Default construct.
|
inline |
Construct for character array (can be nullptr) and number of bytes.
Definition at line 420 of file memoryStreamBuffer.H.
References n, memorybuf::out_base::resetp(), and s.
|
inlineprotectedvirtual |
Put sequence of characters to a fixed region.
Reimplemented in memorybuf::out_dynamic.
Definition at line 397 of file memoryStreamBuffer.H.
References Foam::BitOps::count(), n, and s.
|
inline |
Reset put buffer with character data (can be nullptr) and count.
Sets put pointer to the begin.
Definition at line 436 of file memoryStreamBuffer.H.
Referenced by memorybuf::out_base::out_base(), ospanstream::reset(), and memorybuf::out_dynamic::sync_pbuffer().
|
inline |
The current buffer put position.
Definition at line 453 of file memoryStreamBuffer.H.
Referenced by memorybuf::out_base::info(), ocharstream::output_pos(), ospanstream::output_pos(), memorybuf::out_dynamic::overflow(), memorybuf::out_dynamic::release(), memorybuf::out_dynamic::reserve(), memorybuf::out_dynamic::shrink(), memorybuf::out_dynamic::swap(), and memorybuf::out_dynamic::xsputn().
|
inline |
The put buffer capacity.
Definition at line 458 of file memoryStreamBuffer.H.
Referenced by ocharstream::capacity(), ospanstream::capacity(), and memorybuf::out_base::info().
|
inline |
The span data (start of output characters)
Definition at line 463 of file memoryStreamBuffer.H.
Referenced by ocharstream::list(), ospanstream::list(), ocharstream::str(), ospanstream::str(), and memorybuf::out_base::view().
|
inline |
The span size (size of output buffer)
Definition at line 468 of file memoryStreamBuffer.H.
Referenced by ocharstream::count(), ospanstream::count(), ocharstream::list(), ospanstream::list(), ocharstream::str(), ospanstream::str(), and memorybuf::out_base::view().
|
inline |
Definition at line 476 of file memoryStreamBuffer.H.
References memorybuf::out_base::data_bytes(), and memorybuf::out_base::size_bytes().
Referenced by ocharstream::view(), and ospanstream::view().
|
inline |
Some information about the output buffer position/capacity.
Definition at line 485 of file memoryStreamBuffer.H.
References os(), memorybuf::out_base::span_capacity(), and memorybuf::out_base::span_tellp().