Last change
on this file since 17 was
2,
checked in by Sam Hocevar, 17 years ago
|
- imported original 0.7.0 tarball
|
File size:
681 bytes
|
Rev | Line | |
---|
[2] | 1 | |
---|
| 2 | |
---|
| 3 | #ifndef __RAM_FILE_HPP_ |
---|
| 4 | #define __RAM_FILE_HPP_ |
---|
| 5 | |
---|
| 6 | #include "specs.hpp" |
---|
| 7 | |
---|
| 8 | class 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.