source: abuse/tags/pd/abuse/inc/ramfile.hpp @ 49

Last change on this file since 49 was 49, checked in by Sam Hocevar, 11 years ago
  • Imported original public domain release, for future reference.
File size: 681 bytes
Line 
1
2
3#ifndef __RAM_FILE_HPP_
4#define __RAM_FILE_HPP_
5
6#include "specs.hpp"
7
8class ram_file : public bFILE
9{
10  uchar *buf;
11  int buf_size;
12  int buf_end;
13
14  virtual int allow_read_buffering();
15  virtual int allow_write_buffering();
16  public :
17  ram_file();
18  virtual int open_failure();
19  virtual int unbuffered_read(void *buf, size_t count);       // returns number of bytes read
20  virtual int unbuffered_write(void *buf, size_t count);      // returns number of bytes written
21  virtual int unbuffered_seek(long offset, int whence);  // whence=SEEK_SET, SEEK_CUR, SEEK_END, ret=0=success
22  virtual int unbuffered_tell();
23  virtual int file_size();
24  virtual ~ram_file();
25} ;
26
27#endif
Note: See TracBrowser for help on using the repository browser.