PTLib  Version 2.14.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
textfile.h
Go to the documentation of this file.
1 /*
2  * textfile.h
3  *
4  * A text file I/O channel class.
5  *
6  * Portable Windows Library
7  *
8  * Copyright (c) 1993-1998 Equivalence Pty. Ltd.
9  *
10  * The contents of this file are subject to the Mozilla Public License
11  * Version 1.0 (the "License"); you may not use this file except in
12  * compliance with the License. You may obtain a copy of the License at
13  * http://www.mozilla.org/MPL/
14  *
15  * Software distributed under the License is distributed on an "AS IS"
16  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17  * the License for the specific language governing rights and limitations
18  * under the License.
19  *
20  * The Original Code is Portable Windows Library.
21  *
22  * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
23  *
24  * Portions are Copyright (C) 1993 Free Software Foundation, Inc.
25  * All Rights Reserved.
26  *
27  * Contributor(s): ______________________________________.
28  *
29  * $Revision: 27039 $
30  * $Author: rjongbloed $
31  * $Date: 2012-02-22 18:19:46 +1100 (Wed, 22 Feb 2012) $
32  */
33 
34 #ifndef PTLIB_TEXTFILE_H
35 #define PTLIB_TEXTFILE_H
36 
37 #ifdef P_USE_PRAGMA
38 #pragma interface
39 #endif
40 
41 
43 // Text Files
44 
49 class PTextFile : public PFile
50 {
51  PCLASSINFO(PTextFile, PFile);
52 
53  public:
60  PTextFile();
61 
70  PTextFile(
71  OpenMode mode,
72  OpenOptions opts = ModeDefault
73  );
74 
81  PTextFile(
82  const PFilePath & name,
83  OpenMode mode = ReadWrite,
84  OpenOptions opts = ModeDefault
85  );
87 
100  PString & str
101  );
102 
113  const PString & str
114  );
116 
117 
118 // Include platform dependent part of class
119 #ifdef _WIN32
120 #include "msos/ptlib/textfile.h"
121 #else
122 #include "unix/ptlib/textfile.h"
123 #endif
124 };
125 
126 #endif // PTLIB_TEXTFILE_H
127 
128 
129 // End Of File ///////////////////////////////////////////////////////////////