Public Types | |
enum | ReadOptions { WaitToStartReading = 0x00, BeginReadingNow = 0x01, ManuallyIssueNewReads = 0x00, AutomaticallyIssueNewReads = 0x10, AutomaticallyReadWholeFile = 0x11 } |
Public Member Functions | |
CAsyncFileReader (const JetByteTools::Core::_tstring &filename, Callback &callback, const IIOPool &pool, IAllocateBuffers &allocator, int readOptions=AutomaticallyReadWholeFile) | |
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 (const JetByteTools::Core::_tstring &filename, Callback &callback, const IIOPool &pool, IAllocateBuffers &allocator, IMonitorAsyncFileReader &monitor, int readOptions=AutomaticallyReadWholeFile) | |
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. Monitor the read using the supplied monitor. | |
CAsyncFileReader (HANDLE hFile, Callback &callback, const IIOPool &pool, IAllocateBuffers &allocator, int readOptions=AutomaticallyReadWholeFile) | |
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. Note: that the file MUST have been opened in overlapped mode! Note: takes ownership of the file, the handle will be closed when the object is destroyed. | |
CAsyncFileReader (HANDLE hFile, Callback &callback, const IIOPool &pool, IAllocateBuffers &allocator, IMonitorAsyncFileReader &monitor, int readOptions=AutomaticallyReadWholeFile) | |
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. Monitor the read using the supplied monitor. Note: that the file MUST have been opened in overlapped mode! Note: takes ownership of the file, the handle will be closed when the object is destroyed. | |
CAsyncFileReader (const CAsyncFileReader &rhs) | |
~CAsyncFileReader () override | |
CAsyncFileReader & | operator= (const CAsyncFileReader &rhs) |
void | SetNextReadOffset (LARGE_INTEGER nextReadOffset) |
void | SetMaxReadSize (IBuffer::BufferSize size) |
void | StartReading () |
bool | TryStartReading () |
void | Close () |
HANDLE | GetWaitHandle () const override |
void | Wait () const override |
bool | Wait (Milliseconds timeout) const override |
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... |
enum ReadOptions |
CAsyncFileReader | ( | const JetByteTools::Core::_tstring & | filename, | |
Callback & | callback, | |||
const IIOPool & | pool, | |||
IAllocateBuffers & | allocator, | |||
int | readOptions = AutomaticallyReadWholeFile | |||
) |
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 | ( | const JetByteTools::Core::_tstring & | filename, | |
Callback & | callback, | |||
const IIOPool & | pool, | |||
IAllocateBuffers & | allocator, | |||
IMonitorAsyncFileReader & | monitor, | |||
int | readOptions = AutomaticallyReadWholeFile | |||
) |
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. Monitor the read using the supplied monitor.
CAsyncFileReader | ( | HANDLE | hFile, | |
Callback & | callback, | |||
const IIOPool & | pool, | |||
IAllocateBuffers & | allocator, | |||
int | readOptions = AutomaticallyReadWholeFile | |||
) |
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. Note: that the file MUST have been opened in overlapped mode! Note: takes ownership of the file, the handle will be closed when the object is destroyed.
CAsyncFileReader | ( | HANDLE | hFile, | |
Callback & | callback, | |||
const IIOPool & | pool, | |||
IAllocateBuffers & | allocator, | |||
IMonitorAsyncFileReader & | monitor, | |||
int | readOptions = AutomaticallyReadWholeFile | |||
) |
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. Monitor the read using the supplied monitor. Note: that the file MUST have been opened in overlapped mode! Note: takes ownership of the file, the handle will be closed when the object is destroyed.
CAsyncFileReader | ( | const CAsyncFileReader & | rhs | ) |
~CAsyncFileReader | ( | ) | [override] |
CAsyncFileReader& operator= | ( | const CAsyncFileReader & | rhs | ) |
void SetNextReadOffset | ( | LARGE_INTEGER | nextReadOffset | ) |
void SetMaxReadSize | ( | IBuffer::BufferSize | size | ) |
void StartReading | ( | ) |
bool TryStartReading | ( | ) |
void Close | ( | ) |
HANDLE GetWaitHandle | ( | ) | const [override] |
void Wait | ( | ) | const [override] |
bool Wait | ( | Milliseconds | timeout | ) | const [override] |