00001 /* 00002 * textfile.h 00003 * 00004 * A text file I/O channel class. 00005 * 00006 * Portable Windows Library 00007 * 00008 * Copyright (c) 1993-1998 Equivalence Pty. Ltd. 00009 * 00010 * The contents of this file are subject to the Mozilla Public License 00011 * Version 1.0 (the "License"); you may not use this file except in 00012 * compliance with the License. You may obtain a copy of the License at 00013 * http://www.mozilla.org/MPL/ 00014 * 00015 * Software distributed under the License is distributed on an "AS IS" 00016 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00017 * the License for the specific language governing rights and limitations 00018 * under the License. 00019 * 00020 * The Original Code is Portable Windows Library. 00021 * 00022 * The Initial Developer of the Original Code is Equivalence Pty. Ltd. 00023 * 00024 * Portions are Copyright (C) 1993 Free Software Foundation, Inc. 00025 * All Rights Reserved. 00026 * 00027 * Contributor(s): ______________________________________. 00028 * 00029 * $Revision: 21788 $ 00030 * $Author: rjongbloed $ 00031 * $Date: 2008-12-11 23:42:13 -0600 (Thu, 11 Dec 2008) $ 00032 */ 00033 00034 #ifndef PTLIB_TEXTFILE_H 00035 #define PTLIB_TEXTFILE_H 00036 00037 #ifdef P_USE_PRAGMA 00038 #pragma interface 00039 #endif 00040 00041 00043 // Text Files 00044 00049 class PTextFile : public PFile 00050 { 00051 PCLASSINFO(PTextFile, PFile); 00052 00053 public: 00060 PTextFile(); 00061 00070 PTextFile( 00071 OpenMode mode, 00072 int opts = ModeDefault 00073 ); 00074 00081 PTextFile( 00082 const PFilePath & name, 00083 OpenMode mode = ReadWrite, 00084 int opts = ModeDefault 00085 ); 00087 00099 PBoolean ReadLine( 00100 PString & str 00101 ); 00102 00112 PBoolean WriteLine( 00113 const PString & str 00114 ); 00116 00117 00118 // Include platform dependent part of class 00119 #ifdef _WIN32 00120 #include "msos/ptlib/textfile.h" 00121 #else 00122 #include "unix/ptlib/textfile.h" 00123 #endif 00124 }; 00125 00126 #endif // PTLIB_TEXTFILE_H 00127 00128 00129 // End Of File ///////////////////////////////////////////////////////////////