Double ended buffer combining vector and stream‐like interfaces.
Synopsis
Declared in <streams.h>
class DataStream;
Description
>> and << read and write unformatted data using the above serialization templates. Fills with data in linear time; some stringstream implementations take Nˆ2 time.
Type Aliases
Name |
Description |
Allocator type of the underlying container. |
|
Const iterator over the stream's elements. |
|
Const reference to an element of the stream. |
|
Signed difference type of the underlying container. |
|
Mutable iterator over the stream's elements. |
|
Reference to an element of the stream. |
|
Reverse iterator over the stream's elements. |
|
Unsigned size type of the underlying container. |
|
Element type stored in the stream. |
Member Functions
Name |
Description |
|
Constructors |
Compute total memory usage of this object (own memory + any dynamic memory). |
|
|
|
Empty the stream and reset the read position. |
|
|
|
Return true if no unread elements remain. |
|
|
|
Skip |
|
Deserialize an object from the front of the stream and return this stream. |
|
Subscript operators |
|
Read bytes from the front of the stream into |
|
Reserve capacity for |
|
Resize the unread region to |
|
Return the number of unread elements. |
|
Return the unread contents of the stream as a std::string. |
|
Append a buffer of bytes to the end of the stream. |
|
Serialize an object to the end of the stream and return this stream. |
Protected Type Aliases
Name |
Description |
Underlying byte container type backing the stream. |
Protected Data Members
Name |
Description |
Offset of the first unread byte within vch. |
|
Backing buffer holding both already‐read and unread bytes. |
Created with MrDocs