home *** CD-ROM | disk | FTP | other *** search
- /*
- File: FileInFile.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 __FILEINFILE__
- #define __FILEINFILE__
-
- #ifndef __VIRTUALFILE__
- #include "VirtualFile.h"
- #endif
-
- /***********************************|****************************************/
-
- class TFileInFile : public TVirtualFile
- {
- public:
- TFileInFile ( TVirtualFile* sharedParentFile, long offset, long theSize );
- virtual ~TFileInFile();
-
- virtual OSErr SetPosition ( short mode, long offset );
- virtual OSErr GetPosition ( long& offset ) const;
-
- virtual OSErr ReadData (void* buffer,long& count);
- virtual OSErr WriteData (const void* buffer, long& count);
-
- virtual OSErr SetEnd (long logEof);
- virtual OSErr GetEnd (long& logEof) const;
-
- private: TFileInFile ( const TFileInFile& );
- TFileInFile& operator = ( const TFileInFile& );
-
- OSErr SaveParent ();
- OSErr RestoreParent ();
-
- TVirtualFile& fParentFile;
- long fParentOffset;
- long fSubSize;
- long fSubPosition;
- };
-
- /***********************************|****************************************/
-
- #endif // __FILEINFILE__
-