]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/stream.h
document recently added enums
[wxWidgets.git] / interface / wx / stream.h
index 1a2e0531bd4bdb6aa953a7e0860faed3f5f461a1..7ff04991aab4baeaa164d8dfd9cb071743fef684 100644 (file)
@@ -99,12 +99,16 @@ public:
 /**
     @class wxStreamBuffer
 
-    @todo WRITE A DESCRIPTION
+    wxStreamBuffer is a cache manager for wxStreamBase: it manages a stream buffer
+    linked to a stream.
+
+    Each stream always has one autoinitialized stream buffer, but you may
+    attach more of them to the same stream.
 
     @library{wxbase}
     @category{streams}
 
-    @see wxStreamBase
+    @see wxStreamBase, @ref overview_stream
 */
 class wxStreamBuffer
 {
@@ -127,7 +131,9 @@ public:
 
         @code
         streambuffer.Read(...);
-        streambuffer2.Read(...); // This call erases previous error messages set by 'streambuffer'
+        streambuffer2.Read(...);
+            // This call erases previous error messages set by 'streambuffer'
+            // assuming that both instances are stream buffers for the same stream
         @endcode
 
         @see SetBufferIO()
@@ -498,7 +504,7 @@ enum wxStreamProtocolType
     @code
         factory = wxFilterClassFactory::Find(filename, wxSTREAM_FILEEXT);
         if (factory)
-            stream = factory-NewStream(new wxFFileInputStream(filename));
+            stream = factory->NewStream(new wxFFileInputStream(filename));
     @endcode
 
     wxFilterClassFactory::Find can also search for a factory by MIME type,
@@ -555,7 +561,7 @@ public:
         GetFirst()/GetNext() return a pointer to a factory or @NULL if no more
         are available. They do not give away ownership of the factory.
     */
-    static const wxFilterClassFactory* GetFirst() const;
+    static const wxFilterClassFactory* GetFirst();
     const wxFilterClassFactory* GetNext() const;
     //@}
 
@@ -589,10 +595,10 @@ public:
         If the parent stream is passed as a pointer then the new filter stream
         takes ownership of it. If it is passed by reference then it does not.
     */
-    wxFilterInputStream*  NewStream(wxInputStream& stream) const;
-    wxFilterOutputStream* NewStream(wxOutputStream& stream) const;
-    wxFilterInputStream*  NewStream(wxInputStream* stream) const;
-    wxFilterOutputStream* NewStream(wxOutputStream* stream) const;
+    virtual wxFilterInputStream*  NewStream(wxInputStream& stream) const = 0;
+    virtual wxFilterOutputStream* NewStream(wxOutputStream& stream) const = 0;
+    virtual wxFilterInputStream*  NewStream(wxInputStream* stream) const = 0;
+    virtual wxFilterOutputStream* NewStream(wxOutputStream* stream) const = 0;
     //@}
 
     /**
@@ -795,6 +801,8 @@ public:
     /**
         Returns the first character in the input queue and removes it,
         blocking until it appears if necessary.
+
+        On success returns a value between 0 - 255; on end of file returns @c wxEOF.
     */
     int GetC();