VSTGUI  4.4
Graphical User Interface Framework not only for VST plugins
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
CMemoryStream Class Reference

Memory input and output stream. More...

+ Inheritance diagram for CMemoryStream:

Public Member Functions

 CMemoryStream (uint32_t initialSize=1024, uint32_t delta=1024, bool binaryMode=true, ByteOrder byteOrder=kNativeByteOrder)
 
 CMemoryStream (const int8_t *buffer, uint32_t bufferSize, bool binaryMode=true, ByteOrder byteOrder=kNativeByteOrder)
 
 ~CMemoryStream ()
 
uint32_t writeRaw (const void *buffer, uint32_t size)
 
uint32_t readRaw (void *buffer, uint32_t size)
 
int64_t seek (int64_t pos, SeekMode mode)
 returns -1 if seek fails otherwise new position More...
 
int64_t tell () const
 
void rewind ()
 
const int8_t * getBuffer () const
 
virtual bool operator<< (const std::string &str)
 
virtual bool operator>> (std::string &string)
 
bool end ()
 
- Public Member Functions inherited from OutputStream
 OutputStream (ByteOrder byteOrder=kNativeByteOrder)
 
virtual ~OutputStream ()
 
ByteOrder getByteOrder () const
 
void setByteOrder (ByteOrder newByteOrder)
 
bool operator<< (const int8_t &input)
 
bool operator<< (const uint8_t &input)
 
bool operator<< (const int16_t &input)
 
bool operator<< (const uint16_t &input)
 
bool operator<< (const int32_t &input)
 
bool operator<< (const uint32_t &input)
 
bool operator<< (const int64_t &input)
 
bool operator<< (const uint64_t &input)
 
bool operator<< (const double &input)
 
- Public Member Functions inherited from InputStream
 InputStream (ByteOrder byteOrder=kNativeByteOrder)
 
virtual ~InputStream ()
 
ByteOrder getByteOrder () const
 
void setByteOrder (ByteOrder newByteOrder)
 
bool operator>> (int8_t &output)
 
bool operator>> (uint8_t &output)
 
bool operator>> (int16_t &output)
 
bool operator>> (uint16_t &output)
 
bool operator>> (int32_t &output)
 
bool operator>> (uint32_t &output)
 
bool operator>> (int64_t &output)
 
bool operator>> (uint64_t &output)
 
bool operator>> (double &output)
 
- Public Member Functions inherited from SeekableStream
virtual ~SeekableStream ()
 
- Public Member Functions inherited from CBaseObject
 CBaseObject ()
 
virtual ~CBaseObject ()
 
virtual void beforeDelete ()
 
virtual void forget ()
 decrease refcount and delete object if refcount == 0 More...
 
virtual void remember ()
 increase refcount More...
 
virtual int32_t getNbReference () const
 get refcount More...
 
virtual CMessageResult notify (CBaseObject *sender, IdStringPtr message)
 

Protected Member Functions

bool resize (uint32_t newSize)
 

Protected Attributes

bool binaryMode
 
bool ownsBuffer
 
int8_t * buffer
 
uint32_t bufferSize
 
uint32_t size
 
uint32_t pos
 
uint32_t delta
 

Additional Inherited Members

- Public Types inherited from SeekableStream
enum  SeekMode { kSeekSet, kSeekCurrent, kSeekEnd }
 

Detailed Description

Memory input and output stream.

Constructor & Destructor Documentation

CMemoryStream ( uint32_t  initialSize = 1024,
uint32_t  delta = 1024,
bool  binaryMode = true,
ByteOrder  byteOrder = kNativeByteOrder 
)
CMemoryStream ( const int8_t *  buffer,
uint32_t  bufferSize,
bool  binaryMode = true,
ByteOrder  byteOrder = kNativeByteOrder 
)

Member Function Documentation

bool end ( )
const int8_t* getBuffer ( ) const
inline
bool operator<< ( const std::string &  str)
virtual

Implements OutputStream.

bool operator>> ( std::string &  string)
virtual

Implements InputStream.

uint32_t readRaw ( void *  buffer,
uint32_t  size 
)
virtual

Implements InputStream.

bool resize ( uint32_t  newSize)
protected
void rewind ( )
inlinevirtual

Implements SeekableStream.

Reimplemented in MemoryContentProvider.

int64_t seek ( int64_t  pos,
SeekMode  mode 
)
virtual

returns -1 if seek fails otherwise new position

Implements SeekableStream.

int64_t tell ( ) const
inlinevirtual

Implements SeekableStream.

uint32_t writeRaw ( const void *  buffer,
uint32_t  size 
)
virtual

Implements OutputStream.

Member Data Documentation

bool binaryMode
protected
int8_t* buffer
protected
uint32_t bufferSize
protected
uint32_t delta
protected
bool ownsBuffer
protected
uint32_t pos
protected
uint32_t size
protected

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