Torque3D Documentation / _generateds / IAsyncInputStream

IAsyncInputStream

Engine/source/core/stream/tStream.h

An input stream over elements of type "T" that works in the background.

More...

Public Types

T
ElementType 
OffsetType 
Parent 

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:

This method invalidates the given handle.

Parameters:
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.

return:

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:

This method invalidates the given handle.

Parameters:
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.

return:

the final operation status.