|
|
1.1 ! root 1: /* ! 2: Copyright (C) 1993 Free Software Foundation ! 3: ! 4: This file is part of the GNU IO Library. This library is free ! 5: software; you can redistribute it and/or modify it under the ! 6: terms of the GNU General Public License as published by the ! 7: Free Software Foundation; either version 2, or (at your option) ! 8: any later version. ! 9: ! 10: This library is distributed in the hope that it will be useful, ! 11: but WITHOUT ANY WARRANTY; without even the implied warranty of ! 12: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! 13: GNU General Public License for more details. ! 14: ! 15: You should have received a copy of the GNU General Public License ! 16: along with GNU CC; see the file COPYING. If not, write to ! 17: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ! 18: ! 19: As a special exception, if you link this library with files ! 20: compiled with a GNU compiler to produce an executable, this does not cause ! 21: the resulting executable to be covered by the GNU General Public License. ! 22: This exception does not however invalidate any other reasons why ! 23: the executable file might be covered by the GNU General Public License. */ ! 24: ! 25: #ifndef _BUILTINBUF_H ! 26: #define _BUILTINBUF_H ! 27: ! 28: #ifdef __GNUC__ ! 29: #pragma interface ! 30: #pragma cplusplus ! 31: #endif ! 32: ! 33: #include <streambuf.h> ! 34: ! 35: // A builtinbuf a a streambuf where all the virtual operations ! 36: // call the _IO_jump_t table. ! 37: ! 38: class builtinbuf : public streambuf { ! 39: friend ios; ! 40: virtual int overflow(int); ! 41: virtual int underflow(); ! 42: virtual streamsize xsgetn(char *, streamsize); ! 43: virtual streamsize xsputn(const char *, streamsize); ! 44: virtual streambuf* setbuf(char*, int); ! 45: virtual int doallocate(); ! 46: virtual ~builtinbuf(); ! 47: virtual int sync(); ! 48: ! 49: virtual streampos seekoff(streamoff, _seek_dir, int mode=ios::in|ios::out); ! 50: virtual streampos seekpos(streampos pos, int mode = ios::in|ios::out); ! 51: virtual int pbackfail(int c); ! 52: virtual streamsize sys_read(char* buf, streamsize size); ! 53: virtual streampos sys_seek(streamoff, _seek_dir); ! 54: virtual streamsize sys_write(const char*, streamsize); ! 55: virtual int sys_stat(void*); // Actually, a (struct stat*) ! 56: virtual int sys_close(); ! 57: #if 0 ! 58: virtual int get_column(); ! 59: virtual int set_column(int); ! 60: #endif ! 61: friend const void *get_builtin_vtable(); ! 62: static const void *vtable; ! 63: private: ! 64: builtinbuf() { } ! 65: }; ! 66: #endif _BUILTINBUF_H
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.