template<typename Alloc>
class BasicMemoryOutputStream
Inherited from: OutputStream.
Required header: <Eclog/MemoryOutputStream.h>
The BasicMemoryOutputStream class is an in-memory OutputStream that writes bytes to an auto-growing byte buffer.
A typedef for the default allocator is provided:
typedef BasicMemoryOutputStream<ECLOG_DEFAULT_ALLOCATOR> MemoryOutputStream;
Alloc
Allocator type used to allocate internal storage.
Name | Description |
---|---|
size | Returns the number of bytes that have been written to the buffer. |
data | Returns a pointer to the first byte in the buffer. |
size_t size() const;
Returns the number of bytes that have been written to the buffer.
size_t
Number of bytes.
char* data();
const char* data() const;
Returns a pointer to the first byte in the buffer.
char*
Pointer to the first byte.
const char*
Pointer to the first byte.