]>
Commit | Line | Data |
---|---|---|
23324ae1 FM |
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} | |
7c913512 FM |
12 | |
13 | ||
23324ae1 FM |
14 | @library{wxbase} |
15 | @category{streams} | |
7c913512 | 16 | |
23324ae1 FM |
17 | @seealso |
18 | wxStreamBuffer | |
19 | */ | |
20 | class wxMemoryOutputStream : public wxOutputStream | |
21 | { | |
22 | public: | |
23 | /** | |
4cc4bfaf | 24 | If @a data is @NULL, then it will initialize a new empty buffer which will |
23324ae1 FM |
25 | grow if required. |
26 | */ | |
4cc4bfaf | 27 | wxMemoryOutputStream(char* data = NULL, size_t length = 0); |
23324ae1 FM |
28 | |
29 | /** | |
30 | Destructor. | |
31 | */ | |
32 | ~wxMemoryOutputStream(); | |
33 | ||
34 | /** | |
35 | CopyTo allowed you to transfer data from the internal buffer of | |
4cc4bfaf | 36 | wxMemoryOutputStream to an external buffer. @a len specifies the size of |
23324ae1 FM |
37 | the buffer. |
38 | */ | |
328f5751 | 39 | size_t CopyTo(char* buffer, size_t len) const; |
23324ae1 FM |
40 | |
41 | /** | |
42 | Returns the pointer to the stream object used as an internal buffer | |
43 | for that stream. | |
44 | */ | |
328f5751 | 45 | wxStreamBuffer* GetOutputStreamBuffer() const; |
23324ae1 FM |
46 | }; |
47 | ||
48 | ||
49 | /** | |
50 | @class wxMemoryInputStream | |
51 | @wxheader{mstream.h} | |
7c913512 FM |
52 | |
53 | ||
23324ae1 FM |
54 | @library{wxbase} |
55 | @category{streams} | |
7c913512 | 56 | |
23324ae1 FM |
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. | |
4cc4bfaf | 67 | The @a len argument specifies the amount of data to read from |
23324ae1 | 68 | the @e stream. Setting it to @e wxInvalidOffset means that |
4cc4bfaf | 69 | the @a stream is to be read entirely (i.e. till the EOF is reached). |
23324ae1 | 70 | */ |
4cc4bfaf | 71 | wxMemoryInputStream(const char* data, size_t len); |
7c913512 FM |
72 | wxMemoryInputStream(const wxMemoryOutputStream& stream); |
73 | wxMemoryInputStream(wxInputStream& stream, | |
74 | wxFileOffset len = wxInvalidOffset); | |
23324ae1 FM |
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 | */ | |
328f5751 | 86 | wxStreamBuffer* GetInputStreamBuffer() const; |
23324ae1 | 87 | }; |