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