]> git.saurik.com Git - wxWidgets.git/blame - interface/mstream.h
Commented out appearance sections in docs temporarily until screenshots are added.
[wxWidgets.git] / interface / mstream.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: mstream.h
e54c96f1 3// Purpose: interface of wxMemoryOutputStream
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxMemoryOutputStream
11 @wxheader{mstream.h}
7c913512
FM
12
13
23324ae1
FM
14 @library{wxbase}
15 @category{streams}
7c913512 16
e54c96f1 17 @see wxStreamBuffer
23324ae1
FM
18*/
19class wxMemoryOutputStream : public wxOutputStream
20{
21public:
22 /**
4cc4bfaf 23 If @a data is @NULL, then it will initialize a new empty buffer which will
23324ae1
FM
24 grow if required.
25 */
4cc4bfaf 26 wxMemoryOutputStream(char* data = NULL, size_t length = 0);
23324ae1
FM
27
28 /**
29 Destructor.
30 */
31 ~wxMemoryOutputStream();
32
33 /**
34 CopyTo allowed you to transfer data from the internal buffer of
4cc4bfaf 35 wxMemoryOutputStream to an external buffer. @a len specifies the size of
23324ae1
FM
36 the buffer.
37 */
328f5751 38 size_t CopyTo(char* buffer, size_t len) const;
23324ae1
FM
39
40 /**
41 Returns the pointer to the stream object used as an internal buffer
42 for that stream.
43 */
328f5751 44 wxStreamBuffer* GetOutputStreamBuffer() const;
23324ae1
FM
45};
46
47
e54c96f1 48
23324ae1
FM
49/**
50 @class wxMemoryInputStream
51 @wxheader{mstream.h}
7c913512
FM
52
53
23324ae1
FM
54 @library{wxbase}
55 @category{streams}
7c913512 56
e54c96f1 57 @see wxStreamBuffer, wxMemoryOutputStream
23324ae1
FM
58*/
59class wxMemoryInputStream : public wxInputStream
60{
61public:
62 //@{
63 /**
64 Creates a new read-only memory stream, initializing it with the
65 data from the given input stream @e stream.
4cc4bfaf 66 The @a len argument specifies the amount of data to read from
23324ae1 67 the @e stream. Setting it to @e wxInvalidOffset means that
4cc4bfaf 68 the @a stream is to be read entirely (i.e. till the EOF is reached).
23324ae1 69 */
4cc4bfaf 70 wxMemoryInputStream(const char* data, size_t len);
7c913512
FM
71 wxMemoryInputStream(const wxMemoryOutputStream& stream);
72 wxMemoryInputStream(wxInputStream& stream,
73 wxFileOffset len = wxInvalidOffset);
23324ae1
FM
74 //@}
75
76 /**
77 Destructor.
78 */
79 ~wxMemoryInputStream();
80
81 /**
82 Returns the pointer to the stream object used as an internal buffer
83 for that stream.
84 */
328f5751 85 wxStreamBuffer* GetInputStreamBuffer() const;
23324ae1 86};
e54c96f1 87