1 /************************************************************************** 2 **sA Network Connection Profiler [sancp] - A TCP/IP statistical/collection tool 3 * ************************************************************************ 4 * * Copyright (C) 2003 John Curry <john.curry@metre.net> 5 * * 6 * * This program is distributed under the terms of version 1.0 of the 7 * * Q Public License. See LICENSE.QPL for further details. 8 * * 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. 12 * * 13 * ***********************************************************************/ 14 15 #ifndef FILEHANDLE_H 16 #include "fileHandle.h" 17 #endif 18 19 #define OUTPUTFILEHANDLE_H 20 21 class outputFileHandle : public fileHandle { 22 23 public: 24 outputFileHandle(); 25 26 outputFileHandle(const char *newfilename, char * fmt, int fmtlen, int mode ); 27 28 outputFileHandle(FILE *, int mode, char *fmt, int fmtlen); 29 30 outputFileHandle * attach(); 31 32 33 char * setFormat(char *ifmt, int len); 34 char * getFormat(); 35 int getFormatLen(); 36 void setDelimiter(char); 37 char getDelimiter(); 38 void setEor(char); 39 char getEor(); 40 41 42 43 protected: 44 ~outputFileHandle(); 45 46 private: 47 char *fmt; 48 int fmtlen; 49 char delimiter; 50 char eor; 51 52 }; 53 54