Writing to a outFileQ is performed by inserting pointer to an object of type FileData into the appropriate outFileQ. The structure of a FileData is as follows:
struct FileData {
VTime time; // The time at which the data is written
int length; // The number of bytes pointed to by the pointer 'line'
char *line; // Pointer to the data to be written
};
When the simulation object needs to write a line to a file, it must allocate an object of type FileData and fill in all three fields of the structure. FileData::line is somewhat of a misnomer; output is not limited to a single line, although that is a common amount to write at once. WARPED will accept any arbitrary string of bytes of length FileData::length and pointed to by FileData::line in a FileData struct.
The outFileQ stores all lines generated in its internal data structure. When GVT is updated, all lines in the queue with time fields less than or equal to GVT are physically written to the disk file. If uncommitted lines are rolled back, the FileData structures for the rolled back lines are deleted from the outFileQ. As the simulation progress forward again, it will regenerate suitable replacements for the cancelled lines, causing only the appropriate output to eventually be written to the file.