2
* Copyright (C) 2001 by Holger Rapp
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27
* this works for binary files
46
// Constructor, Deconstructor
50
// File specific functions
51
virtual void open(const char*, For)=0;
52
virtual void close()=0;
53
virtual int read(char*, int)=0;
54
virtual int write(char*, int)=0;
60
void set_state(State);
63
// This functions can't be called with files
64
File& operator=(const File&);
70
/** A Ascii file is a file containing nothing but ascii letters
72
* This class makes sure that ascii files are treated the same under
75
* A Ascii File can also be read linewise
77
class Ascii_file : public File {
82
void read_line(char*, unsigned int);
84
void open(const char*, For);
87
int write(char*, int);
95
* Binary files are just normal files. nothing special about them
97
class Binary_file : public File {
102
void open(const char*, For);
104
int read(char*, int);
105
int write(char*, int);
112
#endif /* __S__MYFILE_H */