/** * LogFileWriter.h * Copyright (C) 2004 Nate * * This file is part of DigitalWatch, a free DTV watching and recording * program for the VisionPlus DVB-T. * * DigitalWatch 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. * * DigitalWatch 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 DigitalWatch; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef LOGFILEWRITER_H #define LOGFILEWRITER_H #include "StdAfx.h" class LogFileWriter { public: LogFileWriter(); virtual ~LogFileWriter(); BOOL Open(LPCWSTR filename, BOOL append = FALSE); void Close(); LogFileWriter& operator<< (const int& val); LogFileWriter& operator<< (const double& val); LogFileWriter& operator<< (const __int64& val); LogFileWriter& operator<< (const char& val); LogFileWriter& operator<< (const wchar_t& val); LogFileWriter& operator<< (const LPSTR& val); LogFileWriter& operator<< (const LPWSTR& val); LogFileWriter& operator<< (const LPCSTR& val); LogFileWriter& operator<< (const LPCWSTR& val); struct LogFileWriterEOL { } EOL; LogFileWriter& operator<< (const LogFileWriterEOL& val); private: HANDLE m_hFile; }; #endif