61 char *
GetData(
int *pnPosition,
int *pnBytesAvailable);
65 static constexpr unsigned int kNumBuffers = 2;
77 std::unique_ptr<File> mFile;
78 char *mBuffers[kNumBuffers];
79 unsigned int mCurBuffer;
LazyFileStream(const String &filename, int nBufferSize)
Open a file, allocate the buffers, and start the first read.
char * GetData(int *pnPosition, int *pnBytesAvailable)
Take the buffer of the completed read, and start the next read unless the file ended.
bool ReadDone()
Report whether the read in flight is complete, recording how many bytes arrived.
~LazyFileStream()
Close the file and free the buffers.
bool Eof() const
Report whether the last read reached the end of the file.
Growable text buffer that is also a PrnStream.
Definition string.h:19