home *** CD-ROM | disk | FTP | other *** search
- /*
- File: RAMFile.h
-
- Copyright: © 1991-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Part of the AOCE Sample SMSAM Package. Consult the license
- which came with this software for your specific legal rights.
-
- */
-
-
-
- #ifndef __RAMFILE__
- #define __RAMFILE__
-
- #ifndef __ABSTRACTFILE__
- #include "AbstractFile.h"
- #endif
-
- #ifndef __MEMORY__
- #include "Memory.h"
- #endif
-
- /***********************************|****************************************/
-
- class TRamFile : public TAbstractFile
- {
- public:
- TRamFile ( unsigned long initialLength = 0, unsigned long growthRate = 1024 );
- virtual ~TRamFile();
-
- virtual OSErr ReadData ( void*, long& );
- virtual OSErr WriteData ( const void*, long& );
-
- virtual OSErr SetEnd ( long );
- virtual OSErr GetEnd ( long& ) const;
-
- virtual OSErr SetPosition ( short posMode, long posOff );
- virtual OSErr GetPosition ( long& filePos ) const;
-
- protected: TRamFile ( const TRamFile& );
- TRamFile& operator = ( const TRamFile& );
-
- Handle fHandle;
- unsigned long fPosition;
- unsigned long fLogicalLength;
- unsigned long fPhysicalLength;
- unsigned long fGrowthRate;
- };
-
- /***********************************|****************************************/
-
- #endif // __RAMFILE__
-