home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / STORM2.DMS / in.adf / Includes.LHA / fstream.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-28  |  972 b   |  55 lines

  1. #ifndef _INCLUDE_FSTREAM_H
  2. #define _INCLUDE_FSTREAM_H
  3.  
  4. /*
  5. **  $VER: fstream.h 10.1 (19.7.95)
  6. **  Includes Release 40.15
  7. **
  8. **  (C) Copyright 1995 Haage & Partner
  9. **     All Rights Reserved
  10. */
  11.  
  12. #ifndef _INCLUDE_STREAM_H
  13. #include <stream.h>
  14. #endif
  15.  
  16. typedef long streampos;
  17. typedef long streamoff;
  18.  
  19. class fstreambase: public virtual ios
  20. { protected:
  21.    fstreambase(FILE *f=0);
  22.    ~fstreambase();
  23.   public:
  24.    FILE *open(const char*, int);
  25.    void close();
  26.    int buffer(unsigned s);
  27.    void flush();
  28.    int seekg(long, int=ios::beg);
  29.    long tellg();
  30. };
  31.  
  32. class ofstream: public ostream, public fstreambase
  33. { public:
  34.    ofstream();
  35.    ofstream(const char*, int = ios::out);
  36.    ~ofstream();
  37. };
  38.  
  39. class ifstream: public istream, public fstreambase
  40. {
  41.   public:
  42.    ifstream();
  43.    ifstream(const char*, int = ios::in);
  44.    ~ifstream();
  45. };
  46.  
  47. class fstream: public ostream, public istream, public fstreambase
  48. { public:
  49.    fstream();
  50.    fstream(const char*, int);
  51.    ~fstream();
  52. };
  53. #endif
  54.  
  55.