The base input streambuf with memory access. More...


Public Member Functions | |
| in_base ()=default | |
| Default construct. More... | |
| in_base (char *s, std::streamsize n) | |
| Construct for character array (can be nullptr) and number of bytes. More... | |
| void | resetg (char *s, std::streamsize n) |
| Reset get buffer with character data (can be nullptr) and count. More... | |
| std::streamsize | span_tellg () const |
| The current buffer get position. More... | |
| std::streamsize | span_capacity () const |
| The get buffer capacity. More... | |
| std::streamsize | span_remaining () const |
| The number of characters remaining in the get area. More... | |
| char * | data_bytes () const |
| The span data (start of input characters) More... | |
| std::streamsize | size_bytes () const |
| The span size (number of input characters) More... | |
| bool | in_range (std::streampos pos) const |
| True if position is within the current input range. More... | |
| auto | view () const |
| A string view of the current input region. More... | |
| auto | view (size_t pos, size_t len) const |
| A sub-slice string view of the current input region. More... | |
| void | info (Ostream &os) const |
| Some information about the input buffer position/capacity. More... | |
Protected Member Functions | |
| virtual std::streamsize | xsgetn (char *s, std::streamsize n) |
| Get sequence of characters from 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... | |
The base input streambuf with memory access.
Definition at line 149 of file memoryStreamBuffer.H.
|
default |
Default construct.
|
inline |
Construct for character array (can be nullptr) and number of bytes.
Definition at line 181 of file memoryStreamBuffer.H.
References n, memorybuf::in_base::resetg(), and s.

|
inlineprotectedvirtual |
Get sequence of characters from a fixed region.
Definition at line 158 of file memoryStreamBuffer.H.
References Foam::BitOps::count(), n, and s.

|
inline |
Reset get buffer with character data (can be nullptr) and count.
Sets get pointer to the begin.
Definition at line 197 of file memoryStreamBuffer.H.
Referenced by memorybuf::in_base::in_base(), ispanstream::reset(), and memorybuf::in_dynamic::sync_gbuffer().

|
inline |
The current buffer get position.
Definition at line 212 of file memoryStreamBuffer.H.
Referenced by memorybuf::in_base::info(), icharstream::input_pos(), and ispanstream::input_pos().

|
inline |
The get buffer capacity.
Definition at line 217 of file memoryStreamBuffer.H.
Referenced by icharstream::capacity(), ispanstream::capacity(), memorybuf::in_base::in_range(), and memorybuf::in_base::info().

|
inline |
The number of characters remaining in the get area.
Definition at line 222 of file memoryStreamBuffer.H.
Referenced by icharstream::remaining(), and ispanstream::remaining().

|
inline |
The span data (start of input characters)
Definition at line 230 of file memoryStreamBuffer.H.
Referenced by icharstream::list(), ispanstream::list(), icharstream::str(), ispanstream::str(), and memorybuf::in_base::view().

|
inline |
The span size (number of input characters)
Definition at line 235 of file memoryStreamBuffer.H.
Referenced by icharstream::list(), ispanstream::list(), icharstream::str(), ispanstream::str(), and memorybuf::in_base::view().

|
inline |
True if position is within the current input range.
Definition at line 240 of file memoryStreamBuffer.H.
References Foam::pos(), and memorybuf::in_base::span_capacity().
Referenced by icharstream::seek(), ispanstream::seek(), and memorybuf::in_base::view().


|
inline |
A string view of the current input region.
Definition at line 248 of file memoryStreamBuffer.H.
References memorybuf::in_base::data_bytes(), and memorybuf::in_base::size_bytes().
Referenced by icharstream::view(), and ispanstream::view().


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

|
inline |
Some information about the input buffer position/capacity.
Definition at line 284 of file memoryStreamBuffer.H.
References memorybuf::in_base::span_capacity(), and memorybuf::in_base::span_tellg().
