An output streambuf for memory access. More...
Public Member Functions | |
in_dynamic ()=default | |
Default construct - empty. More... | |
in_dynamic (const char *s, std::streamsize n) | |
Copy construct from content. More... | |
in_dynamic (::Foam::List< char > &&buffer) | |
Move construct from List. More... | |
template<int SizeMin> | |
in_dynamic (::Foam::DynamicList< char, SizeMin > &&buffer) | |
Move construct from DynamicList (added length only) More... | |
void | sync_gbuffer () |
Sync get buffer pointers to agree with list dimensions. More... | |
void | reset (const char *s, std::streamsize n) |
Reset content (copy) More... | |
void | swap (List< char > &other) |
Exchange buffer content and parameter contents, reset positions. More... | |
template<int SizeMin> | |
void | swap (DynamicList< char, SizeMin > &other) |
Exchange buffer content and parameter contents, reset positions. More... | |
DynamicList< char > | release () |
Reset buffer and return contents. More... | |
Public Member Functions inherited from memorybuf::in_base | |
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... | |
stdFoam::span< const char > | view () const |
void | info (Ostream &os) const |
Some information about the input buffer position/capacity. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from memorybuf::in_base | |
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... | |
An output streambuf for memory access.
Definition at line 265 of file memoryStreamBuffer.H.
|
default |
Default construct - empty.
|
inline |
Copy construct from content.
Definition at line 289 of file memoryStreamBuffer.H.
References UList< T >::data(), n, List< T >::resize_nocopy(), s, and memorybuf::in_dynamic::sync_gbuffer().
|
inline |
Move construct from List.
Definition at line 302 of file memoryStreamBuffer.H.
References memorybuf::in_dynamic::sync_gbuffer().
|
inline |
Move construct from DynamicList (added length only)
Definition at line 313 of file memoryStreamBuffer.H.
References memorybuf::in_dynamic::sync_gbuffer(), and List< T >::transfer().
|
inline |
Sync get buffer pointers to agree with list dimensions.
Sets get pointer to the begin (rewind).
Definition at line 327 of file memoryStreamBuffer.H.
References UList< T >::data(), memorybuf::in_base::resetg(), and UList< T >::size().
Referenced by memorybuf::in_dynamic::in_dynamic(), memorybuf::in_dynamic::release(), memorybuf::in_dynamic::reset(), and memorybuf::in_dynamic::swap().
|
inline |
Reset content (copy)
Definition at line 335 of file memoryStreamBuffer.H.
References List< T >::clear(), UList< T >::data(), n, List< T >::resize_nocopy(), s, and memorybuf::in_dynamic::sync_gbuffer().
Referenced by icharstream::reset().
|
inline |
Exchange buffer content and parameter contents, reset positions.
Definition at line 352 of file memoryStreamBuffer.H.
References UList< T >::swap(), and memorybuf::in_dynamic::sync_gbuffer().
Referenced by icharstream::swap().
|
inline |
Exchange buffer content and parameter contents, reset positions.
Definition at line 362 of file memoryStreamBuffer.H.
References DynamicList< T, SizeMin >::swap(), and memorybuf::in_dynamic::sync_gbuffer().
|
inline |
Reset buffer and return contents.
Definition at line 372 of file memoryStreamBuffer.H.
References memorybuf::in_dynamic::sync_gbuffer().
Referenced by icharstream::release().