An stream/stream-buffer output allocator with DynamicList-like storage. More...
Public Member Functions | |
const UList< char > | list () const |
Const UList access to the characters written (shallow copy). More... | |
UList< char > | list () |
Non-const UList access to the characters written (shallow copy). More... | |
label | capacity () const |
The current list output capacity. More... | |
label | size () const |
void | reserve (const std::streamsize n) |
Reserve output space for at least this amount. More... | |
void | setBlockSize (int n) |
Adjust block size for output. More... | |
void | swap (List< char > &other) |
Transfer list contents to other List. More... | |
template<int SizeMin> | |
void | swap (DynamicList< char, SizeMin > &other) |
Transfer list contents to a DynamicList. More... | |
void | shrink () |
Shrink to addressed space, should not affect stream. More... | |
void | clearStorage () |
Clear storage. More... | |
void | rewind () |
Move to buffer start, clear errors. More... | |
Protected Types | |
typedef std::ostream | stream_type |
Protected Member Functions | |
OListStreamAllocator (size_t nbytes=512) | |
Default construct, with initial reserved number of bytes. More... | |
OListStreamAllocator (List< char > &&buffer) | |
Move construct from List. More... | |
template<int SizeMin> | |
OListStreamAllocator (DynamicList< char, SizeMin > &&buffer) | |
Move construct from DynamicList. More... | |
void | printBufInfo (Ostream &os) const |
Protected Attributes | |
dynbuf | buf_ |
The stream buffer. More... | |
stream_type | stream_ |
The stream. More... | |
An stream/stream-buffer output allocator with DynamicList-like storage.
Definition at line 64 of file OListStream.H.
|
protected |
Definition at line 266 of file OListStream.H.
|
inlineprotected |
Default construct, with initial reserved number of bytes.
Definition at line 278 of file OListStream.H.
|
inlineprotected |
Move construct from List.
Definition at line 285 of file OListStream.H.
|
inlineprotected |
Move construct from DynamicList.
Definition at line 293 of file OListStream.H.
|
inlineprotected |
Definition at line 302 of file OListStream.H.
References OListStreamAllocator::buf_, and os().
|
inline |
Const UList access to the characters written (shallow copy).
Definition at line 314 of file OListStream.H.
References OListStreamAllocator::buf_.
|
inline |
Non-const UList access to the characters written (shallow copy).
Definition at line 320 of file OListStream.H.
References OListStreamAllocator::buf_.
|
inline |
The current list output capacity.
Definition at line 326 of file OListStream.H.
References OListStreamAllocator::buf_.
|
inline |
The current output position in the buffer, which is also the addressed list size
Definition at line 333 of file OListStream.H.
References OListStreamAllocator::buf_.
|
inline |
Reserve output space for at least this amount.
Definition at line 339 of file OListStream.H.
References OListStreamAllocator::buf_, and n.
|
inline |
Adjust block size for output.
Definition at line 350 of file OListStream.H.
References OListStreamAllocator::buf_, and n.
|
inline |
Transfer list contents to other List.
Definition at line 356 of file OListStream.H.
References OListStreamAllocator::buf_.
|
inline |
Transfer list contents to a DynamicList.
Definition at line 363 of file OListStream.H.
References OListStreamAllocator::buf_.
|
inline |
Shrink to addressed space, should not affect stream.
Definition at line 369 of file OListStream.H.
References OListStreamAllocator::buf_.
|
inline |
Clear storage.
Definition at line 375 of file OListStream.H.
References OListStreamAllocator::buf_, and OListStreamAllocator::stream_.
|
inline |
Move to buffer start, clear errors.
Definition at line 382 of file OListStream.H.
References OListStreamAllocator::buf_, and OListStreamAllocator::stream_.
Referenced by OListStream::rewind().
|
protected |
The stream buffer.
Definition at line 269 of file OListStream.H.
Referenced by OListStreamAllocator::capacity(), OListStreamAllocator::clearStorage(), OListStreamAllocator::list(), OListStreamAllocator::printBufInfo(), OListStreamAllocator::reserve(), OListStreamAllocator::rewind(), OListStreamAllocator::setBlockSize(), OListStreamAllocator::shrink(), OListStreamAllocator::size(), and OListStreamAllocator::swap().
|
protected |
The stream.
Definition at line 272 of file OListStream.H.
Referenced by OListStreamAllocator::clearStorage(), and OListStreamAllocator::rewind().