|
wavelength 1.0.0
|
BinStream that collects the bytes written to it in a growing buffer. More...
#include <memstream.h>


Public Member Functions | |
| ~MemStream () override=default | |
| Destroy the object. | |
| MemStream (bool bLittleEndian) | |
| Construct an empty stream with room for 4096 bytes. | |
| void | Read (void *pData, int nBytes) override |
| Copy bytes out from the position. | |
| void | Write (const void *pData, int nBytes) override |
| Copy bytes in at the position, growing the buffer. | |
| void | Flush () override |
| Do nothing, since the bytes stay in memory. | |
| 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 of the bytes. | |
| bool | Fail () override |
| Report whether a transfer failed. | |
| std::vector< char > & | GetBuffer () |
| Public Member Functions inherited from BinStream | |
| 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) |
Additional Inherited Members | |
| Public Types inherited from BinStream | |
| enum | SeekType { kSeekBegin = 0 , kSeekCurrent = 1 , kSeekEnd = 2 , kSeekBegin = 0 , kSeekCurrent = 1 , kSeekEnd = 2 } |
| Origins of Seek(). More... | |
| enum | SeekType { kSeekBegin = 0 , kSeekCurrent = 1 , kSeekEnd = 2 , kSeekBegin = 0 , kSeekCurrent = 1 , kSeekEnd = 2 } |
| The origin of Seek(). More... | |
BinStream that collects the bytes written to it in a growing buffer.
The RTTI includes the class name and records BinStream as the base, and the vtable is at 0x003d6f68. The object is 0x20 bytes. Only the members its callers here use are declared.
|
overridedefault |
Destroy the object.
|
explicit |
Construct an empty stream with room for 4096 bytes.
| bLittleEndian | Store values in the console's byte order. |
|
overridevirtual |
Copy bytes out from the position.
| pData | The destination. |
| nBytes | The number of bytes. |
Implements BinStream.
|
overridevirtual |
Copy bytes in at the position, growing the buffer.
| pData | The source. |
| nBytes | The number of bytes. |
Implements BinStream.
|
overridevirtual |
Do nothing, since the bytes stay in memory.
Implements BinStream.
|
overridevirtual |
Move the position.
| nOffset | The offset in bytes. |
| eFrom | The origin of the offset. |
Implements BinStream.
|
overridevirtual |
Report the position.
Implements BinStream.
|
overridevirtual |
Report whether the position is at the end of the bytes.
Implements BinStream.
|
overridevirtual |
Report whether a transfer failed.
Implements BinStream.
|
inline |