|
| | FileStreamBuffer (const char *pszPath, int nFlags) |
| | Open a file and start the first read.
|
| | ~FileStreamBuffer () override |
| | Close the file and free the read buffer.
|
| void | Poll () override |
| | Append the bytes of a finished read, then read as many bytes as the buffer has room for.
|
| void | Rewind () override |
| | Seek the file back to its start and clear mInputDone.
|
| bool | IsClosed () const |
| | Report whether the file failed to open.
|
| File * | GetFile () const |
| | StreamBuffer (unsigned int size) |
| | Allocate the buffer.
|
| | ~StreamBuffer () override |
| | Free the buffer.
|
| void | SetStatusAddress (void *address) |
| | Record the EE address that receives the free space, and write 1 there.
|
| void | Write (const void *data, unsigned int size, bool endOfStream) override |
| | Append bytes and schedule a notification.
|
| void | Notify () override |
| | Send the free space to the EE when a notification is scheduled and the space is positive.
|
| | StreamBuffer (int nSize) |
| | Allocate a cleared buffer.
|
| virtual | ~StreamBuffer () |
| | Free the buffer.
|
| virtual void | Add (const char *pData, int nBytes, int bLast) |
| | Append bytes behind the write head, wrapping at the end of the buffer.
|
| bool | IsEof () |
| | Report whether the consumer took every byte and the producer has no more.
|
| bool | IsEmpty () |
| | Report whether the consumer has taken every byte appended so far.
|
| char * | AcquireReadRun (int nMaxBytes, int *pnBytes) |
| | Take the next run of bytes, after a Poll().
|
| void | CommitReadRun (char **ppRun) |
| | Release the run AcquireReadRun() handed out, Poll(), and clear the caller's pointer.
|
| int | EmptySpaceForFilling () |
| | Report the room the producer may fill, which keeps mMargin bytes free.
|
| int | BytesAvailable (int *pbInputDone) |
| | Report the bytes the consumer has not taken yet.
|
| int | GetSize () const |
| char * | GetBuffer () const |
| | RingBuffer (unsigned int size) |
| | Allocate and clear a buffer of size bytes, rounded down to whole words, with both pointers at its start.
|
| virtual | ~RingBuffer () |
| | Free the buffer.
|
| virtual void | Reset () |
| | Discard every byte by moving both pointers to the start of the buffer.
|
| bool | IsFinished () const |
| | Report whether the stream has ended and every byte has been read.
|
| unsigned int | ContiguousFree () const |
| | Report the space the writer can fill without wrapping, less the reserve.
|
| bool | IsFull () const |
| | Report whether ContiguousFree() is zero.
|
| bool | IsEmpty () const |
| | Report whether every written byte has been read.
|
| void * | Read (unsigned int maxSize, unsigned int *size) |
| | Notify the writer, then return the next contiguous block of at most maxSize bytes.
|
| void | Release (void **block) |
| | Consume the block Read() returned and notify the writer.
|
| unsigned int | FreeSpace () const |
| | Report the free space, less the reserve.
|
| unsigned int | Used (bool *endOfStream) const |
| | Report the bytes written and not yet read.
|
| void | ClearEndOfStream () |
| | Clear the end-of-stream flag.
|
| bool | EndOfStream () const |
| | Report the end-of-stream flag.
|
StreamBuffer that a file fills with asynchronous reads.
The RTTI includes the class name and records StreamBuffer as the base. The object is 0x38 bytes.