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

Generated on Fri Mar 7 06:25:03 2008 for PTLib by  doxygen 1.5.1