Similar to std::istringstream, but with an externally managed input buffer. More...
Public Member Functions | |
uiliststream (const char *buffer, size_t nbytes) | |
Construct for character array and number of bytes. More... | |
void | reset (char *buffer, size_t nbytes) |
Reset buffer pointers. More... | |
void | rewind () |
Rewind the stream, clearing any old errors. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from memorybuf::in | |
in ()=default | |
Default construct. More... | |
virtual std::streamsize | xsgetn (char *s, std::streamsize n) |
Get sequence of characters. More... | |
in (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 for character array (can be nullptr) and number of bytes. More... | |
std::streamsize | capacity () const |
The buffer capacity. More... | |
const UList< char > | list () const |
Const UList access to the input characters (shallow copy). More... | |
UList< char > | list () |
Non-const UList access to the input characters (shallow copy). More... | |
void | printBufInfo (Ostream &os) const |
Some information about the input buffer position/capacity. More... | |
std::streamsize | tellg () const |
The buffer get position. 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... | |
std::streamsize | tellg () const |
std::streamsize | tellp () const |
Similar to std::istringstream, but with an externally managed input buffer.
This allows the input buffer to be filled or refilled from various sources without copying.
Definition at line 79 of file UIListStream.H.
|
inline |
Construct for character array and number of bytes.
Definition at line 90 of file UIListStream.H.
|
inline |
Reset buffer pointers.
Definition at line 99 of file UIListStream.H.
References memorybuf::in::resetg().
|
inline |
Rewind the stream, clearing any old errors.
Definition at line 107 of file UIListStream.H.
References clear().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.