]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wfstream.h
added a unit test for input/output file streams and fixed the problem it exposed...
[wxWidgets.git] / interface / wfstream.h
index b9bc3e7e6a66591390a22dfb3cec07b3be9ed669..de501d0490d6041b2cc723c23d4d1188cccdffd4 100644 (file)
@@ -1,6 +1,6 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        wfstream.h
-// Purpose:     documentation for wxTempFileOutputStream class
+// Purpose:     interface of wxTempFileOutputStream
 // Author:      wxWidgets team
 // RCS-ID:      $Id$
 // Licence:     wxWindows license
@@ -17,8 +17,7 @@
     @library{wxbase}
     @category{streams}
 
-    @seealso
-    wxTempFile
+    @see wxTempFile
 */
 class wxTempFileOutputStream : public wxOutputStream
 {
@@ -50,6 +49,7 @@ public:
 };
 
 
+
 /**
     @class wxFFileOutputStream
     @wxheader{wfstream.h}
@@ -66,8 +66,7 @@ public:
     @library{wxbase}
     @category{streams}
 
-    @seealso
-    wxBufferedOutputStream, wxFFileInputStream, wxFileInputStream
+    @see wxBufferedOutputStream, wxFFileInputStream, wxFileInputStream
 */
 class wxFFileOutputStream : public wxOutputStream
 {
@@ -77,7 +76,7 @@ public:
         Initializes a file stream in write-only mode using the file descriptor @e fp.
     */
     wxFFileOutputStream(const wxString& filename,
-                        const wxString& mode = "w+b");
+                        const wxString& mode = "wb");
     wxFFileOutputStream(wxFFile& file);
     wxFFileOutputStream(FILE* fp);
     //@}
@@ -90,10 +89,11 @@ public:
     /**
         Returns @true if the stream is initialized and ready.
     */
-    bool IsOk();
+    bool IsOk() const;
 };
 
 
+
 /**
     @class wxFileOutputStream
     @wxheader{wfstream.h}
@@ -110,8 +110,7 @@ public:
     @library{wxbase}
     @category{streams}
 
-    @seealso
-    wxBufferedOutputStream, wxFileInputStream, wxFFileInputStream
+    @see wxBufferedOutputStream, wxFileInputStream, wxFFileInputStream
 */
 class wxFileOutputStream : public wxOutputStream
 {
@@ -133,10 +132,11 @@ public:
     /**
         Returns @true if the stream is initialized and ready.
     */
-    bool IsOk();
+    bool IsOk() const;
 };
 
 
+
 /**
     @class wxFileInputStream
     @wxheader{wfstream.h}
@@ -153,8 +153,7 @@ public:
     @library{wxbase}
     @category{streams}
 
-    @seealso
-    wxBufferedInputStream, wxFileOutputStream, wxFFileOutputStream
+    @see wxBufferedInputStream, wxFileOutputStream, wxFFileOutputStream
 */
 class wxFileInputStream : public wxInputStream
 {
@@ -176,10 +175,11 @@ public:
     /**
         Returns @true if the stream is initialized and ready.
     */
-    bool IsOk();
+    bool IsOk() const;
 };
 
 
+
 /**
     @class wxFFileInputStream
     @wxheader{wfstream.h}
@@ -196,8 +196,7 @@ public:
     @library{wxbase}
     @category{streams}
 
-    @seealso
-    wxBufferedInputStream, wxFFileOutputStream, wxFileOutputStream
+    @see wxBufferedInputStream, wxFFileOutputStream, wxFileOutputStream
 */
 class wxFFileInputStream : public wxInputStream
 {
@@ -221,10 +220,11 @@ public:
     /**
         Returns @true if the stream is initialized and ready.
     */
-    bool IsOk();
+    bool IsOk() const;
 };
 
 
+
 /**
     @class wxFFileStream
     @wxheader{wfstream.h}
@@ -233,8 +233,7 @@ public:
     @library{wxbase}
     @category{FIXME}
 
-    @seealso
-    wxStreamBuffer
+    @see wxStreamBuffer
 */
 class wxFFileStream : public wxFFileOutputStream
 {
@@ -243,10 +242,11 @@ public:
         Initializes a new file stream in read-write mode using the specified
         @e iofilename name.
     */
-    wxFFileStream(const wxString& iofileName);
+    wxFFileStream(const wxString& iofileName, const wxString& mode = "w+b");
 };
 
 
+
 /**
     @class wxFileStream
     @wxheader{wfstream.h}
@@ -255,8 +255,7 @@ public:
     @library{wxbase}
     @category{FIXME}
 
-    @seealso
-    wxStreamBuffer
+    @see wxStreamBuffer
 */
 class wxFileStream : public wxFileOutputStream
 {
@@ -267,3 +266,4 @@ public:
     */
     wxFileStream(const wxString& iofileName);
 };
+