IAsyncInputStream
Engine/source/core/stream/tStream.h
An input stream over elements of type "T" that works in the background.
Public Functions
cancelReadAt(void * handle)
Cancel the given asynchronous read operation.
void *
issueReadAt(OffsetType offset, T * buffer, U32 num)
Queue a read of "num" elements at "offset" into "buffer".
tryCompleteReadAt(void * handle, U32 & outNumRead, bool wait)
Try moving the given asynchronous read operation to ASYNC_IO_Complete.
Detailed Description
An input stream over elements of type "T" that works in the background.
Public Types
typedef T ElementType
typedef Offset OffsetType
typedef void Parent
Public Functions
cancelReadAt(void * handle)
Cancel the given asynchronous read operation.
note:Parameters:This method invalidates the given handle.
handle | Handle returned by "issueReadAt". |
issueReadAt(OffsetType offset, T * buffer, U32 num)
Queue a read of "num" elements at "offset" into "buffer".
Parameters:
offset | The offset in the stream from which to read. |
buffer | The buffer into which the elements are stored. |
num | Number of elements to read. |
a handle for the asynchronous read operation or NULL if the operation could not be queued.
tryCompleteReadAt(void * handle, U32 & outNumRead, bool wait)
Try moving the given asynchronous read operation to ASYNC_IO_Complete.
note:Parameters:This method invalidates the given handle.
handle | Handle returned by "issueReadAt". |
outNumRead | Reference that receives the number of bytes actually read in the operation. |
wait | If true, the method waits until the given operation either fails or completes successfully before returning. |
the final operation status.