VSTGUI: CFileStream Class Reference

VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
CFileStream Class Reference

File input and output stream. More...

`#include <cstream.h>`

Inheritance diagram for CFileStream:

## Public Types
enum | { kReadMode = 1 << 0 , kWriteMode = 1 << 1 , kTruncateMode = 1 << 2 , kBinaryMode = 1 << 3 }
Public Types inherited from SeekableStream
enum | SeekMode { kSeekSet , kSeekCurrent , kSeekEnd }

## Public Member Functions
| CFileStream ()
| ~CFileStream () noexcept override
bool | open (UTF8StringPtr path, int32_t mode, ByteOrder byteOrder=kNativeByteOrder)
bool | isEndOfFile () const
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
int64_t | tell () const override
void | rewind () override
bool | operator<< (const std::string &str) override
bool | operator>> (std::string &string) override
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)
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 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)
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)
Public Member Functions inherited from SeekableStream
virtual | ~SeekableStream () noexcept=default
Public Member Functions inherited from ReferenceCounted< std::atomic< int32_t > >
| ReferenceCounted ()=default
virtual | ~ReferenceCounted () noexcept=default
| ReferenceCounted (const ReferenceCounted &)
ReferenceCounted & | operator= (const ReferenceCounted &)
| ReferenceCounted ()=default
| ReferenceCounted (const ReferenceCounted &)
virtual | ~ReferenceCounted () noexcept=default
ReferenceCounted & | operator= (const ReferenceCounted &)
void | forget () override
| decrease refcount and delete object if refcount == 0
void | remember () override
| increase refcount
virtual int32_t | getNbReference () const
| get refcount
void | forget () override
| decrease refcount and delete object if refcount == 0
void | remember () override
| increase refcount
virtual int32_t | getNbReference () const
| get refcount

## Protected Attributes
FILE * | stream
int32_t | openMode

## Detailed Description

File input and output stream.

## Member Enumeration Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
kReadMode |
kWriteMode |
kTruncateMode |
kBinaryMode |

## Constructor & Destructor Documentation

## ◆ CFileStream()

CFileStream | ( |  | ) |

## ◆ ~CFileStream()

~CFileStream | ( |  | ) |
| overridenoexcept

## Member Function Documentation

## ◆ isEndOfFile()

bool isEndOfFile | ( |  | ) | const

## ◆ open()

bool open | ( | UTF8StringPtr | path,
|  | int32_t | mode,
|  | ByteOrder | byteOrder = kNativeByteOrder )

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

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

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

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

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

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

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

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

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

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

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

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

Implements OutputStream.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Implements InputStream.

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

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

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

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

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

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

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

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

## ◆ readRaw()

uint32_t readRaw | ( | void * | buffer,
|  | uint32_t | size )
| overridevirtual

Implements InputStream.

## ◆ rewind()

void rewind | ( |  | ) |
| overridevirtual

Implements SeekableStream.

## ◆ seek()

int64_t seek | ( | int64_t | pos,
|  | SeekMode | mode )
| overridevirtual

returns -1 if seek fails otherwise new position

Implements SeekableStream.

## ◆ tell()

int64_t tell | ( |  | ) | const
| overridevirtual

Implements SeekableStream.

## ◆ writeRaw()

uint32_t writeRaw | ( | const void * | buffer,
|  | uint32_t | size )
| overridevirtual

Implements OutputStream.

## Member Data Documentation

## ◆ openMode

int32_t openMode
| protected

## ◆ stream

FILE* stream
| protected

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

- cstream.h
- cstream.cpp