]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/mstream.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxMemoryOutputStream
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
10 @class wxMemoryOutputStream
19 class wxMemoryOutputStream
: public wxOutputStream
23 If @a data is @NULL, then it will initialize a new empty buffer which will
27 If the buffer is created, it will be destroyed at the destruction of the stream.
29 wxMemoryOutputStream(void* data
= NULL
, size_t length
= 0);
34 virtual ~wxMemoryOutputStream();
37 Allows you to transfer data from the internal buffer of wxMemoryOutputStream
38 to an external buffer. @a len specifies the size of the buffer.
40 size_t CopyTo(char* buffer
, size_t len
) const;
43 Returns the pointer to the stream object used as an internal buffer
46 wxStreamBuffer
* GetOutputStreamBuffer() const;
52 @class wxMemoryInputStream
59 @see wxStreamBuffer, wxMemoryOutputStream
61 class wxMemoryInputStream
: public wxInputStream
65 Initializes a new read-only memory stream which will use the specified
66 buffer data of length len. The stream does not take ownership of the buffer,
67 i.e. the buffer will not be deleted in its destructor.
69 wxMemoryInputStream(const char* data
, size_t len
);
72 Creates a new read-only memory stream, initializing it with the data from
73 the given output stream @a stream.
75 wxMemoryInputStream(const wxMemoryOutputStream
& stream
);
78 Creates a new read-only memory stream, initializing it with the
79 data from the given input stream @a stream.
81 The @a len argument specifies the amount of data to read from the
82 @a stream. Setting it to @e wxInvalidOffset means that the @a stream
83 is to be read entirely (i.e. till the EOF is reached).
85 wxMemoryInputStream(wxInputStream
& stream
,
86 wxFileOffset len
= wxInvalidOffset
);
91 virtual ~wxMemoryInputStream();
94 Returns the pointer to the stream object used as an internal buffer
97 wxStreamBuffer
* GetInputStreamBuffer() const;