00001 #ifndef _MONDOCRD_H_INCLUDED_ 00002 #define _MONDOCRD_H_INCLUDED_ 00003 //********************************************************************** 00004 // * 00005 // Filename: mondocrd.h * 00006 // Date: 16 Feb 2002 * 00007 // File Version: 1 * 00008 // * 00009 // Author: Chris White (whitecf@bcs.org.uk) * 00010 // Company: Monitor Computing Services Ltd. * 00011 // * 00012 //********************************************************************** 00013 // * 00014 // Copyright (C) 2002 Monitor Computing Services Ltd. * 00015 // * 00016 // This program is free software; you can redistribute it and/or * 00017 // modify it under the terms of the GNU General Public License * 00018 // as published by the Free Software Foundation; either version 2 * 00019 // of the License, or any later version. * 00020 // * 00021 // This program is distributed in the hope that it will be useful, * 00022 // but WITHOUT ANY WARRANTY; without even the implied warranty of * 00023 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00024 // GNU General Public License for more details. * 00025 // * 00026 // You should have received a copy of the GNU General Public * 00027 // License (http://www.gnu.org/copyleft/gpl.html) along with this * 00028 // program; if not, write to: * 00029 // The Free Software Foundation Inc., * 00030 // 59 Temple Place - Suite 330, * 00031 // Boston, MA 02111-1307, * 00032 // USA. * 00033 // * 00034 //********************************************************************** 00035 // * 00036 // Notes: * 00037 // * 00038 //********************************************************************** 00039 00040 #include <cstring.h> 00041 00042 00043 class MonDocReader 00044 { 00045 public: 00046 00047 virtual ~MonDocReader() {;} 00048 00049 virtual void convert() = 0; 00050 virtual void convertCommand() = 0; 00051 00052 protected: 00053 00054 MonDocReader(class ifstream *newSource, 00055 class MonDocWriter *newWriter, 00056 void *newTraceObj = 0, 00057 void (*newTraceFunc)(void*, const char*) = 0); 00058 MonDocReader(MonDocReader&) {;} 00059 MonDocReader(MonDocReader*) {;} 00060 00061 int convertInteger(); 00062 00063 void traceAdd(char newChar); 00064 void traceAdd(int newChar); 00065 void traceWrite(); 00066 void traceWrite(char *traceText); 00067 00068 class ifstream *source; 00069 class MonDocWriter *writer; 00070 void *traceObj; 00071 void (*traceFunc)(void*, const char*); 00072 string traceString; 00073 00074 00075 }; 00076 00077 00078 #endif