Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

textfile.h

Go to the documentation of this file.
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  * $Log: textfile.h,v $
00030  * Revision 1.19  2003/09/17 05:41:59  csoutheren
00031  * Removed recursive includes
00032  *
00033  * Revision 1.18  2003/09/17 01:18:02  csoutheren
00034  * Removed recursive include file system and removed all references
00035  * to deprecated coooperative threading support
00036  *
00037  * Revision 1.17  2002/09/16 01:08:59  robertj
00038  * Added #define so can select if #pragma interface/implementation is used on
00039  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00040  *
00041  * Revision 1.16  2001/05/22 12:49:32  robertj
00042  * Did some seriously wierd rewrite of platform headers to eliminate the
00043  *   stupid GNU compiler warning about braces not matching.
00044  *
00045  * Revision 1.15  1999/03/09 02:59:51  robertj
00046  * Changed comments to doc++ compatible documentation.
00047  *
00048  * Revision 1.14  1999/02/16 08:11:17  robertj
00049  * MSVC 6.0 compatibility changes.
00050  *
00051  * Revision 1.13  1998/09/23 06:21:39  robertj
00052  * Added open source copyright license.
00053  *
00054  * Revision 1.12  1995/07/31 12:15:49  robertj
00055  * Removed PContainer from PChannel ancestor.
00056  *
00057  * Revision 1.11  1995/06/17 11:13:34  robertj
00058  * Documentation update.
00059  *
00060  * Revision 1.10  1995/03/14 12:42:48  robertj
00061  * Updated documentation to use HTML codes.
00062  *
00063  * Revision 1.9  1995/01/14  06:19:42  robertj
00064  * Documentation
00065  *
00066  * Revision 1.8  1994/08/23  11:32:52  robertj
00067  * Oops
00068  *
00069  * Revision 1.7  1994/08/22  00:46:48  robertj
00070  * Added pragma fro GNU C++ compiler.
00071  *
00072  * Revision 1.6  1994/04/20  12:17:44  robertj
00073  * PFilePath addition
00074  *
00075  * Revision 1.5  1994/04/01  14:17:26  robertj
00076  * Fixed container for text file.
00077  *
00078  * Revision 1.4  1994/01/03  04:42:23  robertj
00079  * Mass changes to common container classes and interactors etc etc etc.
00080  *
00081  * Revision 1.3  1993/08/21  01:50:33  robertj
00082  * Made Clone() function optional, default will assert if called.
00083  *
00084  * Revision 1.2  1993/07/14  12:49:16  robertj
00085  * Fixed RCS keywords.
00086  *
00087  */
00088 
00089 #ifndef _PTEXTFILE
00090 #define _PTEXTFILE
00091 
00092 #ifdef P_USE_PRAGMA
00093 #pragma interface
00094 #endif
00095 
00096 
00098 // Text Files
00099 
00104 class PTextFile : public PFile
00105 {
00106   PCLASSINFO(PTextFile, PFile);
00107 
00108   public:
00115     PTextFile();
00116 
00125     PTextFile(
00126       OpenMode mode,          
00127       int opts = ModeDefault  
00128     );
00129       
00136     PTextFile(
00137       const PFilePath & name,    
00138       OpenMode mode = ReadWrite, 
00139       int opts = ModeDefault     
00140     );
00142 
00154     BOOL ReadLine(
00155       PString & str  
00156     );
00157 
00167     BOOL WriteLine(
00168       const PString & str  
00169     );
00171 
00172 
00173 // Include platform dependent part of class
00174 #ifdef _WIN32
00175 #include "msos/ptlib/textfile.h"
00176 #else
00177 #include "unix/ptlib/textfile.h"
00178 #endif
00179 };
00180 
00181 #endif
00182 
00183 
00184 // End Of File ///////////////////////////////////////////////////////////////

Generated on Sat Dec 22 16:46:51 2007 for PWLib by  doxygen 1.4.2