Cortex  10.0.0-a4
Public Member Functions | List of all members
IECore::MemoryStream Class Reference

A boost.iostreams "device" for reading to/writing from memory. More...

#include <MemoryStream.h>

Inherited by IECore::MemoryStreamSink [private], and IECore::MemoryStreamSource [private].

Public Member Functions

 MemoryStream (char *buf, std::streamsize sz, bool ownsBuf=false)
 
std::streamsize read (char *s, std::streamsize n)
 Read from the stream.
 
std::streamsize write (const char *s, std::streamsize n)
 Write to the stream.
 
void get (char *&data, std::streamsize &sz) const
 Retrieve a reference to the contents of the stream.
 

Detailed Description

A boost.iostreams "device" for reading to/writing from memory.

Constructor & Destructor Documentation

IECore::MemoryStream::MemoryStream ( char *  buf,
std::streamsize  sz,
bool  ownsBuf = false 
)

Construct a new stream pointing to the existing buffer. Optionally, ownership of this buffer can be passed to the stream. In this case it is assumed that it was allocated with new[] and can safely be deleted with delete[].


The documentation for this class was generated from the following file: