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