X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae3c17b4013e80b99976c750c19fca47729517f6..c86b476dd540ac302ad023dc864c7c7d4f9ed823:/interface/wx/mstream.h diff --git a/interface/wx/mstream.h b/interface/wx/mstream.h index 37319f10b2..eec704124a 100644 --- a/interface/wx/mstream.h +++ b/interface/wx/mstream.h @@ -8,8 +8,8 @@ /** @class wxMemoryOutputStream - @wxheader{mstream.h} + @todo describe me. @library{wxbase} @category{streams} @@ -22,20 +22,22 @@ public: /** If @a data is @NULL, then it will initialize a new empty buffer which will grow if required. + + @warning + If the buffer is created, it will be destroyed at the destruction of the stream. */ - wxMemoryOutputStream(char* data = NULL, size_t length = 0); + wxMemoryOutputStream(void* data = NULL, size_t length = 0); /** Destructor. */ - ~wxMemoryOutputStream(); + virtual ~wxMemoryOutputStream(); /** - CopyTo allowed you to transfer data from the internal buffer of - wxMemoryOutputStream to an external buffer. @a len specifies the size of - the buffer. + Allows you to transfer data from the internal buffer of wxMemoryOutputStream + to an external buffer. @a len specifies the size of the buffer. */ - size_t CopyTo(char* buffer, size_t len) const; + size_t CopyTo(void* buffer, size_t len) const; /** Returns the pointer to the stream object used as an internal buffer @@ -48,8 +50,8 @@ public: /** @class wxMemoryInputStream - @wxheader{mstream.h} + @todo describe me. @library{wxbase} @category{streams} @@ -59,24 +61,34 @@ public: class wxMemoryInputStream : public wxInputStream { public: - //@{ /** - Creates a new read-only memory stream, initializing it with the - data from the given input stream @e stream. - The @a len argument specifies the amount of data to read from - the @e stream. Setting it to @e wxInvalidOffset means that - the @a stream is to be read entirely (i.e. till the EOF is reached). + Initializes a new read-only memory stream which will use the specified + buffer data of length len. The stream does not take ownership of the buffer, + i.e. the buffer will not be deleted in its destructor. + */ + wxMemoryInputStream(const void* data, size_t len); + + /** + Creates a new read-only memory stream, initializing it with the data from + the given output stream @a stream. */ - wxMemoryInputStream(const char* data, size_t len); wxMemoryInputStream(const wxMemoryOutputStream& stream); + + /** + Creates a new read-only memory stream, initializing it with the + data from the given input stream @a stream. + + The @a len argument specifies the amount of data to read from the + @a stream. Setting it to @e wxInvalidOffset means that the @a stream + is to be read entirely (i.e. till the EOF is reached). + */ wxMemoryInputStream(wxInputStream& stream, wxFileOffset len = wxInvalidOffset); - //@} /** Destructor. */ - ~wxMemoryInputStream(); + virtual ~wxMemoryInputStream(); /** Returns the pointer to the stream object used as an internal buffer