home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample SMSAM / SampleSMSAM Source / VirtualFile / FileInFile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-28  |  1.3 KB  |  53 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        FileInFile.h
  3.  
  4.     Copyright:    © 1991-1994 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Part of the AOCE Sample SMSAM Package.  Consult the license
  8.     which came with this software for your specific legal rights.
  9.  
  10. */
  11.  
  12.  
  13.  
  14. #ifndef __FILEINFILE__
  15. #define __FILEINFILE__
  16.  
  17. #ifndef __VIRTUALFILE__
  18. #include "VirtualFile.h"
  19. #endif
  20.  
  21. /***********************************|****************************************/
  22.  
  23. class TFileInFile : public TVirtualFile 
  24. {
  25. public:        
  26.             TFileInFile ( TVirtualFile* sharedParentFile, long offset, long theSize );
  27.     virtual    ~TFileInFile();
  28.  
  29.     virtual OSErr                     SetPosition ( short mode, long offset );
  30.     virtual OSErr                     GetPosition ( long& offset ) const;
  31.  
  32.     virtual OSErr                     ReadData (void* buffer,long& count);
  33.     virtual OSErr                     WriteData (const void* buffer, long& count);
  34.  
  35.     virtual OSErr                     SetEnd (long logEof);
  36.     virtual OSErr                     GetEnd (long& logEof) const;
  37.  
  38. private:    TFileInFile ( const TFileInFile& );
  39.             TFileInFile&             operator = ( const TFileInFile& );
  40.  
  41.             OSErr                    SaveParent ();
  42.             OSErr                    RestoreParent ();
  43.             
  44.             TVirtualFile&             fParentFile;
  45.             long                     fParentOffset;
  46.             long                     fSubSize;
  47.             long                    fSubPosition;
  48. };
  49.  
  50. /***********************************|****************************************/
  51.  
  52. #endif    // __FILEINFILE__
  53.