An output streambuf for memory access. More...
#include <memoryStreamBuffer.H>


Public Member Functions | |
| out_base ()=default | |
| Default construct. | |
| out_base (char *s, std::streamsize n) | |
| Construct for character array (can be nullptr) and number of bytes. | |
| void | resetp (char *s, std::streamsize n) |
| Reset put buffer with character data (can be nullptr) and count. | |
| std::streamsize | span_tellp () const |
| The current buffer put position. | |
| std::streamsize | span_capacity () const |
| The put buffer capacity. | |
| char * | data_bytes () const |
| The span data (start of output characters). | |
| std::streamsize | size_bytes () const |
| The span size (size of output buffer). | |
| bool | in_range (std::streampos pos) const |
| True if position is within the current output range. | |
| auto | view () const |
| A string view of the current output region. | |
| auto | view (size_t pos, size_t len) const |
| A sub-slice string view of the current output region. | |
| void | pop_back (int n=1) |
| Decrease the put area by 1 or more elements. | |
| void | overwrite (std::streampos pos, const char *data, std::streamsize count) |
| Overwrite a sub-slice with character content. | |
| void | overwrite (std::streampos pos, char c) |
| Overwrite a single character. | |
| void | info (Ostream &os) const |
| Some information about the output buffer position/capacity. | |
Protected Member Functions | |
| virtual std::streamsize | xsputn (const char *s, std::streamsize n) |
| Put sequence of characters to a fixed region. | |
| 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. | |
| 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. | |
An output streambuf for memory access.
Definition at line 422 of file memoryStreamBuffer.H.
|
default |
Default construct.
|
inline |
Construct for character array (can be nullptr) and number of bytes.
Definition at line 454 of file memoryStreamBuffer.H.
References n, resetp(), and s().

|
inlineprotectedvirtual |
Put sequence of characters to a fixed region.
Reimplemented in memorybuf::out_dynamic.
Definition at line 431 of file memoryStreamBuffer.H.

|
inline |
Reset put buffer with character data (can be nullptr) and count.
Sets put pointer to the begin.
Definition at line 470 of file memoryStreamBuffer.H.
Referenced by out_base(), ospanstream::reset(), ospanstream::reset(), and memorybuf::out_dynamic::sync_pbuffer().


|
inline |
The current buffer put position.
Definition at line 487 of file memoryStreamBuffer.H.
Referenced by memorybuf::out_dynamic::extend(), memorybuf::out_dynamic::extend_exact(), in_range(), info(), ocharstream::output_pos(), ospanstream::output_pos(), overwrite(), memorybuf::out_dynamic::release(), memorybuf::out_dynamic::reserve(), memorybuf::out_dynamic::reserve_exact(), memorybuf::out_dynamic::shrink_to_fit(), memorybuf::out_dynamic::swap(), and memorybuf::out_dynamic::swap().

|
inline |
The put buffer capacity.
Definition at line 492 of file memoryStreamBuffer.H.
Referenced by ocharstream::capacity(), ospanstream::capacity(), and info().

|
inline |
The span data (start of output characters).
Definition at line 497 of file memoryStreamBuffer.H.
Referenced by ocharstream::cdata_bytes(), ospanstream::cdata_bytes(), ocharstream::data_bytes(), ospanstream::data_bytes(), ocharstream::list(), ospanstream::list(), overwrite(), overwrite(), ocharstream::str(), ospanstream::str(), view(), and view().

|
inline |
The span size (size of output buffer).
Definition at line 502 of file memoryStreamBuffer.H.
Referenced by ocharstream::count(), ospanstream::count(), ocharstream::list(), ospanstream::list(), ocharstream::size_bytes(), ospanstream::size_bytes(), ocharstream::str(), ospanstream::str(), view(), and view().

|
inline |
True if position is within the current output range.
Definition at line 507 of file memoryStreamBuffer.H.
References Foam::pos(), and span_tellp().
Referenced by overwrite(), overwrite(), ocharstream::seek(), ospanstream::seek(), and view().


|
inline |
A string view of the current output region.
Definition at line 515 of file memoryStreamBuffer.H.
References data_bytes(), and size_bytes().
Referenced by ocharstream::view(), ocharstream::view(), ospanstream::view(), and ospanstream::view().


|
inline |
A sub-slice string view of the current output region.
Definition at line 523 of file memoryStreamBuffer.H.
References data_bytes(), in_range(), Foam::pos(), and size_bytes().

|
inline |
Decrease the put area by 1 or more elements.
Definition at line 551 of file memoryStreamBuffer.H.
References n.
Referenced by ocharstream::pop_back().

|
inline |
Overwrite a sub-slice with character content.
Definition at line 562 of file memoryStreamBuffer.H.
References data_bytes(), in_range(), Foam::pos(), and span_tellp().
Referenced by ocharstream::overwrite(), ocharstream::overwrite(), ospanstream::overwrite(), and ospanstream::overwrite().


|
inline |
Overwrite a single character.
Definition at line 583 of file memoryStreamBuffer.H.
References data_bytes(), in_range(), and Foam::pos().

|
inline |
Some information about the output buffer position/capacity.
Definition at line 594 of file memoryStreamBuffer.H.
References os(), span_capacity(), and span_tellp().
