The CFfile Class


CFfile Methods
CFfile()
CFfile(string filename, char io)
CFfile(string filein, string fileout)
~CFfile()
bool openR(string INfile)
bool openW(string OUTfile)
bool open (string filename, char io)
void closeR()
void closeW()
void close()
bool exists(string fname)
void backup(string fname, string bname)


CFfile Attributes
ifstream ifile
ofstream ofile




Statistics
3 Constructors
0 Static methods
0 Constant methods
0 Virtual methods
0 Pure virtual methods
9 Other methods

12 Methods total

0 Integer attributes
0 Floating point attributes
0 Boolean attributes
0 Character attributes
0 Arrays of attributes
2 Other attributes

2 Attributes total





Header Source

/* Cfour (C++ Common Console Classes) v1.1
 * Copyright (C) 2001 Jeffrey Bakker
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */


#ifndef _C4_FILE_H
#define _C4_FILE_H

#include <iostream>
#include <fstream>
#include <string>
using namespace std;


class CFfile {

 public:

  CFfile();
  CFfile(string filename, char io);
  CFfile(string filein, string fileout);
  ~CFfile();

  bool openR(string INfile) ;  // open file for reading
  bool openW(string OUTfile);  // open file for writing
  bool open (string filename, char io); // open,specify

  void closeR();  // close the input file
  void closeW();  // close the output file
  void close();   // close

  bool exists(string fname);
  void backup(string fname, string bname); // backup (copy) a file

// protected:

  ifstream ifile;  // input file
  ofstream ofile;  // output file
};

#endif  // _C4_FILE_H