]> git.saurik.com Git - wxWidgets.git/blob - interface/mstream.h
fixed category
[wxWidgets.git] / interface / mstream.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: mstream.h
3 // Purpose: documentation for wxMemoryOutputStream class
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 @seealso
18 wxStreamBuffer
19 */
20 class wxMemoryOutputStream : public wxOutputStream
21 {
22 public:
23 /**
24 If @a data is @NULL, then it will initialize a new empty buffer which will
25 grow if required.
26 */
27 wxMemoryOutputStream(char* data = NULL, size_t length = 0);
28
29 /**
30 Destructor.
31 */
32 ~wxMemoryOutputStream();
33
34 /**
35 CopyTo allowed you to transfer data from the internal buffer of
36 wxMemoryOutputStream to an external buffer. @a len specifies the size of
37 the buffer.
38 */
39 size_t CopyTo(char* buffer, size_t len) const;
40
41 /**
42 Returns the pointer to the stream object used as an internal buffer
43 for that stream.
44 */
45 wxStreamBuffer* GetOutputStreamBuffer() const;
46 };
47
48
49 /**
50 @class wxMemoryInputStream
51 @wxheader{mstream.h}
52
53
54 @library{wxbase}
55 @category{streams}
56
57 @seealso
58 wxStreamBuffer, wxMemoryOutputStream
59 */
60 class wxMemoryInputStream : public wxInputStream
61 {
62 public:
63 //@{
64 /**
65 Creates a new read-only memory stream, initializing it with the
66 data from the given input stream @e stream.
67 The @a len argument specifies the amount of data to read from
68 the @e stream. Setting it to @e wxInvalidOffset means that
69 the @a stream is to be read entirely (i.e. till the EOF is reached).
70 */
71 wxMemoryInputStream(const char* data, size_t len);
72 wxMemoryInputStream(const wxMemoryOutputStream& stream);
73 wxMemoryInputStream(wxInputStream& stream,
74 wxFileOffset len = wxInvalidOffset);
75 //@}
76
77 /**
78 Destructor.
79 */
80 ~wxMemoryInputStream();
81
82 /**
83 Returns the pointer to the stream object used as an internal buffer
84 for that stream.
85 */
86 wxStreamBuffer* GetInputStreamBuffer() const;
87 };