class c4_Strategy

A strategy encapsulates code dealing with the I/O system interface.

Public members
c4_Strategy ();
virtual ~c4_Strategy ();
virtual bool IsValid () const;
True if we can do I/O with this object
virtual void DataSeek (t4_i32 position_);
Set file position
virtual int DataRead (void* buffer_, int length_);
Read a number of bytes
void DataLoad (void* buffer_, int length_);
Read an exact number of bytes
virtual bool DataWrite (const void* buffer_, int length_);
Write a number of bytes, return true if successful
virtual void DataCommit (t4_i32 newSize_);
Flush and truncate file
virtual void ResetFileMapping ();
Override to support memory-mapped files
bool _keepAfterCommit;
Keep data in memory after each commit (default is false)
bool _bytesFlipped;
True if the storage format is not native (default is false)
int _failure;
Error code of last failed I/O operation, zero if I/O was ok
const t4_byte* _mapStart;
First byte in file mapping, zero if not active
const t4_byte* _mapLimit;
Past last byte in file mapping, zero if not active


Header file "mk4.h"   --   Dec 9, 1999