VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CMemoryStream Class Reference

Memory input and output stream. More...

`#include <cstream.h>`

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 () noexcept override
uint32_t | writeRaw (const void *buffer, uint32_t size) override
uint32_t | readRaw (void *buffer, uint32_t size) override
int64_t | seek (int64_t pos, SeekMode mode) override
| returns -1 if seek fails otherwise new position More...
int64_t | tell () const override
void | rewind () override
const int8_t * | getBuffer () const
bool | operator<< (const std::string &str) override
bool | operator>> (std::string &string) override
bool | end ()
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)
virtual bool | operator<< (const std::string &str)=0
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)
virtual bool | operator>> (std::string &string)=0
Public Member Functions inherited from OutputStream
| OutputStream (ByteOrder byteOrder=kNativeByteOrder)
virtual | ~OutputStream () noexcept=default
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)
virtual bool | operator<< (const std::string &str)=0
virtual uint32_t | writeRaw (const void *buffer, uint32_t size)=0
Public Member Functions inherited from InputStream
| InputStream (ByteOrder byteOrder=kNativeByteOrder)
virtual | ~InputStream () noexcept=default
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)
virtual bool | operator>> (std::string &string)=0
virtual uint32_t | readRaw (void *buffer, uint32_t size)=0
Public Member Functions inherited from SeekableStream
virtual | ~SeekableStream () noexcept=default
virtual int64_t | seek (int64_t pos, SeekMode mode)=0
| returns -1 if seek fails otherwise new position More...
virtual int64_t | tell () const =0
virtual void | rewind ()=0
Public Member Functions inherited from ReferenceCounted< T >
| ReferenceCounted ()=default
virtual | ~ReferenceCounted () noexcept=default
| ReferenceCounted (const ReferenceCounted &)
ReferenceCounted & | operator= (const ReferenceCounted &)
void | forget () override
| decrease refcount and delete object if refcount == 0 More...
void | remember () override
| increase refcount More...
virtual int32_t | getNbReference () const
| get refcount More...
virtual void | forget ()=0
| decrease refcount and delete object if refcount == 0 More...
virtual void | remember ()=0
| increase refcount More...

## Protected Member Functions
bool | resize (uint32_t newSize)

## Protected Attributes
int8_t * | buffer
uint32_t | bufferSize
uint32_t | size
uint32_t | pos
uint32_t | delta
bool | binaryMode
bool | ownsBuffer

## Additional Inherited Members
Public Types inherited from SeekableStream
enum | SeekMode { kSeekSet , kSeekCurrent , kSeekEnd }

## Detailed Description

Memory input and output stream.

## Constructor & Destructor Documentation

## ◆ CMemoryStream() [1/2]

CMemoryStream | ( | uint32_t | initialSize = `1024`,
|  | uint32_t | delta = `1024`,
|  | bool | binaryMode = `true`,
|  | ByteOrder | byteOrder = `kNativeByteOrder`
| ) |  |

## ◆ CMemoryStream() [2/2]

CMemoryStream | ( | const int8_t * | buffer,
|  | uint32_t | bufferSize,
|  | bool | binaryMode = `true`,
|  | ByteOrder | byteOrder = `kNativeByteOrder`
| ) |  |

## ◆ ~CMemoryStream()

~CMemoryStream | ( |  | ) |
| override noexcept

## Member Function Documentation

## ◆ end()

bool end | ( |  | ) |

## ◆ getBuffer()

const int8_t * getBuffer | ( |  | ) | const
| inline

## ◆ operator<<() [1/11]

bool operator<< | ( | const double & | input | ) |

## ◆ operator<<() [2/11]

bool operator<< | ( | const int16_t & | input | ) |

## ◆ operator<<() [3/11]

bool operator<< | ( | const int32_t & | input | ) |

## ◆ operator<<() [4/11]

bool operator<< | ( | const int64_t & | input | ) |

## ◆ operator<<() [5/11]

bool operator<< | ( | const int8_t & | input | ) |

## ◆ operator<<() [6/11]

bool operator<< | ( | const std::string & | str | ) |
| override virtual

Implements OutputStream.

## ◆ operator<<() [7/11]

virtual bool operator<< | ( | const std::string & | str | ) |
| virtual

Implements OutputStream.

## ◆ operator<<() [8/11]

bool operator<< | ( | const uint16_t & | input | ) |

## ◆ operator<<() [9/11]

bool operator<< | ( | const uint32_t & | input | ) |

## ◆ operator<<() [10/11]

bool operator<< | ( | const uint64_t & | input | ) |

## ◆ operator<<() [11/11]

bool operator<< | ( | const uint8_t & | input | ) |

## ◆ operator>>() [1/11]

bool operator>> | ( | double & | output | ) |

## ◆ operator>>() [2/11]

bool operator>> | ( | int16_t & | output | ) |

## ◆ operator>>() [3/11]

bool operator>> | ( | int32_t & | output | ) |

## ◆ operator>>() [4/11]

bool operator>> | ( | int64_t & | output | ) |

## ◆ operator>>() [5/11]

bool operator>> | ( | int8_t & | output | ) |

## ◆ operator>>() [6/11]

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

Implements InputStream.

## ◆ operator>>() [7/11]

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

Implements InputStream.

## ◆ operator>>() [8/11]

bool operator>> | ( | uint16_t & | output | ) |

## ◆ operator>>() [9/11]

bool operator>> | ( | uint32_t & | output | ) |

## ◆ operator>>() [10/11]

bool operator>> | ( | uint64_t & | output | ) |

## ◆ operator>>() [11/11]

bool operator>> | ( | uint8_t & | output | ) |

## ◆ readRaw()

uint32_t readRaw | ( | void * | buffer,
|  | uint32_t | size
| ) |  |
| override virtual

Implements InputStream.

## ◆ resize()

bool resize | ( | uint32_t | newSize | ) |
| protected

## ◆ rewind()

void rewind | ( |  | ) |
| inline override virtual

Implements SeekableStream.

Reimplemented in MemoryContentProvider.

## ◆ seek()

int64_t seek | ( | int64_t | pos,
|  | SeekMode | mode
| ) |  |
| override virtual

returns -1 if seek fails otherwise new position

Implements SeekableStream.

## ◆ tell()

int64_t tell | ( |  | ) | const
| inline override virtual

Implements SeekableStream.

## ◆ writeRaw()

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

Implements OutputStream.

## Member Data Documentation

## ◆ binaryMode

bool binaryMode
| protected

## ◆ buffer

int8_t* buffer
| protected

## ◆ bufferSize

uint32_t bufferSize
| protected

## ◆ delta

uint32_t delta
| protected

## ◆ ownsBuffer

bool ownsBuffer
| protected

## ◆ pos

uint32_t pos
| protected

## ◆ size

uint32_t size
| protected

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

- cstream.h
- cstream.cpp