50 #ifndef COMMON_MEMWRITESTREAM_H 51 #define COMMON_MEMWRITESTREAM_H 53 #include <boost/noncopyable.hpp> 75 size_t write(
const void *dataPtr,
size_t dataSize);
103 size_t write(
const void *dataPtr,
size_t dataSize);
131 #endif // COMMON_MEMWRITESTREAM_H
MemoryWriteStream(byte(&array)[N])
Template constructor to create a MemoryWriteStream around an array buffer.
A stream that dynamically grows as it's written to.
size_t seek(ptrdiff_t offset, Origin whence=kOriginBegin)
Seek offset bytes from the origin whence.
MemoryWriteStreamDynamic(bool disposeMemory=false, size_t capacity=0)
size_t seek(ptrdiff_t offset, Origin whence=kOriginBegin)
Seek offset bytes from the origin whence.
DisposableArray< byte > _data
size_t size() const
Return the number of bytes written to this stream in total.
Basic writing stream interfaces.
Low-level type definitions to handle fixed width types portably.
~MemoryWriteStreamDynamic()
void setDisposable(bool disposeMemory)
size_t write(const void *dataPtr, size_t dataSize)
Write data into the stream.
size_t size() const
Return the total size of the memory block.
void ensureCapacity(size_t newLen)
A smart pointer with a deletion flag.
size_t write(const void *dataPtr, size_t dataSize)
Write data into the stream.
Origin
The position a seeking offset takes as a base.
MemoryWriteStream(byte *buf, size_t len)
size_t pos() const
Return the current writing position within the stream.
size_t pos() const
Return the current writing position within the memory block.
Simple memory based 'stream', which implements the SeekableWriteStream interface for a plain memory b...
Seek from the begin of the stream.