]> git.saurik.com Git - wxWidgets.git/blame - interface/mstream.h
adjusted indentation with astyle; added Id keyword
[wxWidgets.git] / interface / mstream.h
CommitLineData
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*/
20class wxMemoryOutputStream : public wxOutputStream
21{
22public:
23 /**
24 If @e 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. @e len specifies the size of
37 the buffer.
38 */
39 size_t CopyTo(char * buffer, size_t len);
40
41 /**
42 Returns the pointer to the stream object used as an internal buffer
43 for that stream.
44 */
45 wxStreamBuffer * GetOutputStreamBuffer();
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*/
60class wxMemoryInputStream : public wxInputStream
61{
62public:
63 //@{
64 /**
65 Creates a new read-only memory stream, initializing it with the
66 data from the given input stream @e stream.
67
68 The @e len argument specifies the amount of data to read from
69 the @e stream. Setting it to @e wxInvalidOffset means that
70 the @e stream is to be read entirely (i.e. till the EOF is reached).
71 */
72 wxMemoryInputStream(const char * data, size_t len);
7c913512
FM
73 wxMemoryInputStream(const wxMemoryOutputStream& stream);
74 wxMemoryInputStream(wxInputStream& stream,
75 wxFileOffset len = wxInvalidOffset);
23324ae1
FM
76 //@}
77
78 /**
79 Destructor.
80 */
81 ~wxMemoryInputStream();
82
83 /**
84 Returns the pointer to the stream object used as an internal buffer
85 for that stream.
86 */
87 wxStreamBuffer * GetInputStreamBuffer();
88};