CAsyncFileReader Class Reference
[Asynchronous I/OI/O BuffersFileIO]

Inheritance diagram for CAsyncFileReader:

Inheritance graph
[legend]
Collaboration diagram for CAsyncFileReader:

Collaboration graph
[legend]

List of all members.


Detailed Description

A class that implements IHandler to provide an asynchronous file reader that uses overlapped I/O to perform reads from the file. Data read from the file is provided in a 'push fashion' via the CAsyncFileReader::Callback interface.

Public Member Functions

 CAsyncFileReader (const JetByteTools::Win32::_tstring &filename, Callback &callback, IIOPool &pool, IAllocateBuffers &allocator)
 Read the specified file asynchronously using overlapped I/O via the threads in the supplied IIOPool into buffers provided by the IAllocateBuffers instance and push the data that is read to the CAsyncFileReader::Callback interface.
 ~CAsyncFileReader ()
virtual HANDLE GetWaitHandle () const
 Access a HANDLE to wait on by passing it to one of the Wait Functions.
virtual void Wait () const
 Wait indefinitely for the object to become signalled.
virtual bool Wait (const Milliseconds timeout) const
 Wait, with a time limit, for the object to become signalled.

Static Public Member Functions

static void Wait (HANDLE handle)
 Wait indefinitely for the supplied handle to become signalled.
static bool Wait (HANDLE handle, const Milliseconds timeout)
 Wait, with a time limit, for the supplied handle to become signalled.

Classes

class  Callback
 An interface for users of the CAsyncFileReader to be notified of the results of the asynchronous read operations on the file. More...

Constructor & Destructor Documentation

CAsyncFileReader ( const JetByteTools::Win32::_tstring filename,
Callback callback,
IIOPool pool,
IAllocateBuffers allocator 
)

Read the specified file asynchronously using overlapped I/O via the threads in the supplied IIOPool into buffers provided by the IAllocateBuffers instance and push the data that is read to the CAsyncFileReader::Callback interface.

~CAsyncFileReader (  ) 


Member Function Documentation

HANDLE GetWaitHandle (  )  const [virtual]

Access a HANDLE to wait on by passing it to one of the Wait Functions.

Implements IWaitable.

void Wait (  )  const [virtual]

Wait indefinitely for the object to become signalled.

Implements IWaitable.

bool Wait ( const Milliseconds  timeout  )  const [virtual]

Wait, with a time limit, for the object to become signalled.

Implements IWaitable.

void Wait ( HANDLE  handle  )  [static, inherited]

Wait indefinitely for the supplied handle to become signalled.

bool Wait ( HANDLE  handle,
const Milliseconds  timeout 
) [static, inherited]

Wait, with a time limit, for the supplied handle to become signalled.


Generated on Tue Oct 2 15:45:24 2007 for JetByte Tools - v5.2 by  doxygen 1.5.3