|
| | FileStream (const char *pszPath, bool bWrite, bool bLittleEndian, int nFlags) |
| | Open a file.
|
| | ~FileStream () override |
| | Close the file.
|
| void | Read (void *pData, int nBytes) override |
| | Read bytes, recording a failure when fewer arrive.
|
| void | Write (const void *pData, int nBytes) override |
| | Write bytes, recording a failure when fewer are written.
|
| void | Flush () override |
| | Write out buffered data.
|
| void | Seek (int nOffset, SeekType eFrom) override |
| | Move the position.
|
| int | Tell () override |
| | Report the position.
|
| bool | Eof () override |
| | Report whether the position is at the end.
|
| bool | Fail () override |
| | Report whether an operation failed.
|
| File * | GetFile () const |
| | FileStream (const char *file, FileType type, bool littleEndian, int flags) |
| | Open a file.
|
| virtual | ~FileStream () |
| | Close the file.
|
| virtual void | Read (void *data, int bytes) |
| | Read bytes.
|
| virtual void | Write (const void *data, int bytes) |
| | Write bytes.
|
| virtual void | Flush () |
| | Write out the file's buffered data.
|
| virtual void | Seek (int offset, SeekType type) |
| | Move the position.
|
| virtual int | Tell () |
| virtual bool | Eof () |
| virtual bool | Fail () |
| | BinStream (bool bLittleEndian) |
| | Construct a stream.
|
| virtual | ~BinStream () |
| | Release the stream.
|
| virtual void | Mark (const char *pszMark) |
| | Receive a named mark in the data, such as the end of a chunk.
|
| void | ReadString (char *pszBuffer, int nSize) |
| | Read a length-prefixed string into a buffer and terminate it.
|
| void | ReadString (String &text) |
| | Read a length-prefixed string.
|
| BinStream & | WriteString (const char *pszText) |
| | Write a string with its length first.
|
| void | ReadEndian (void *pData, int nBytes) |
| | Read a value of 2, 4, 8, or 16 bytes, reversing its bytes unless the stream is little endian.
|
| void | WriteEndian (const void *pData, int nBytes) |
| | Write a value of 2, 4, 8, or 16 bytes, reversing its bytes unless the stream is little endian.
|
| | BinStream (bool littleEndian) |
| | Set the byte order.
|
| virtual | ~BinStream () |
| | Destroy the stream.
|
| virtual void | NoOp (int) |
| | Do nothing.
|
| void | ReadEndian (void *data, int bytes) |
| | Read a value, swapping its bytes into the host order.
|
| void | WriteEndian (const void *data, int bytes) |
| | Write a value, swapping its bytes into the stream order.
|
| BinStream & | operator<< (const char *str) |
| | Write text as its length followed by its characters, without a terminator.
|
| BinStream & | operator>> (String &str) |
| | Read text written by operator<<(const char *).
|
| void | ReadString (char *buffer, int bufSize) |
| | Read text written by operator<<(const char *) into a buffer, and terminate it.
|
| BinStream & | operator<< (char c) |
| BinStream & | operator<< (unsigned char c) |
| BinStream & | operator<< (short s) |
| BinStream & | operator<< (unsigned short s) |
| BinStream & | operator<< (int i) |
| BinStream & | operator<< (unsigned int i) |
| BinStream & | operator<< (float f) |
| BinStream & | operator>> (char &c) |
| BinStream & | operator>> (unsigned char &c) |
| BinStream & | operator>> (short &s) |
| BinStream & | operator>> (unsigned short &s) |
| BinStream & | operator>> (int &i) |
| BinStream & | operator>> (unsigned int &i) |
| BinStream & | operator>> (float &f) |
BinStream that reads or writes a file.
Stream over a file.
The RTTI includes the class name and records BinStream as the base. Only the members its callers here use are declared.
The RTTI records the class as deriving from BinStream. The object is 0x10 bytes. Every transfer asserts that no earlier one failed.