Write to free portions of a file in blocks. More...
#include <WriteQueueAccessFile.h>
Public Member Functions | |
WriteQueueAccessFile (char *filename, std::ios::openmode mode=(std::ios::openmode) 0) | |
Initialise class to access the given file. | |
WriteQueueAccessFile (char *filename, FileBlockQueue *sQueue, FileBlockQueue *uQueue) | |
Initialise class to access the given file, with the currently read list uQueue and the unread list sQueue. | |
void | nextFileBlock (char *buffer, int blockSize) |
Write the buffer to the next free block with the given block size. |
Write to free portions of a file in blocks.
This class is used to access a file in write mode using FileIO in blocks. Queues are maintained to keep track of which parts of the file have been written to and which have not. By doing this, multiple QueueAccessFiles can have access to the same file as long as they all report to each other which blocks are availble and which are not.