FileIO Class Reference

An interface to fstream to allow easy reading and writing of memory blocks. More...

#include <FileIO.h>

Inheritance diagram for FileIO:
QueueAccessFile ConsecutiveReadQueueAccessFile ReadQueueAccessFile WriteQueueAccessFile

List of all members.

Public Member Functions

 FileIO (const char *filename)
 Construct the file stream in input/output mode.
 FileIO (const char *filename, std::ios::openmode mode)
 Construct the file stream in a specified mode.
void open (std::ios::openmode mode)
 Open a previously closed stream.
void close (void)
 Close a file stream.
FILE_POS_TYPE fileSize (void)
 Return the length of the file in bytes.
void readBlock (char *buffer, int blockSize)
 Read a file block of size blockSize bytes.
void writeBlock (char *buffer, int blockSize)
 Write a file block of size blockSize bytes.
FILE_POS_TYPE repositionRead (FILE_POS_TYPE filePos)
 Move the read pointer to position filePos.
FILE_POS_TYPE repositionWrite (FILE_POS_TYPE filePos)
 Move the write pointer to position filePos.
void truncateFile (FILE_POS_TYPE fileSize)
 Truncate (or crop) the file to size fileSize.

Detailed Description

An interface to fstream to allow easy reading and writing of memory blocks.

This class is meant as an example. It is not useful by itself rather its usefulness is only a function of how much it helps the reader. It is in a sense defined by the person who reads it and otherwise does not exist in any real form.

Note:
Attempts at zen rarely work.
Author
lapark
Revision
1.5
Date
2009/10/08 06:41:30

Contact: laurence@parktribe.com

Id
FileIO.h,v 1.5 2009/10/08 06:41:30 lapark Exp

The documentation for this class was generated from the following files:
 All Classes Functions Variables Friends

Generated on Tue Nov 10 14:12:13 2009 for textIR by  doxygen 1.6.1