]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/mstream.h
Restore wxFile docs
[wxWidgets.git] / interface / wx / mstream.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: mstream.h
e54c96f1 3// Purpose: interface of wxMemoryOutputStream
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxMemoryOutputStream
7c913512
FM
11
12
23324ae1
FM
13 @library{wxbase}
14 @category{streams}
7c913512 15
e54c96f1 16 @see wxStreamBuffer
23324ae1
FM
17*/
18class wxMemoryOutputStream : public wxOutputStream
19{
20public:
21 /**
4cc4bfaf 22 If @a data is @NULL, then it will initialize a new empty buffer which will
23324ae1
FM
23 grow if required.
24 */
4cc4bfaf 25 wxMemoryOutputStream(char* data = NULL, size_t length = 0);
23324ae1
FM
26
27 /**
28 Destructor.
29 */
30 ~wxMemoryOutputStream();
31
32 /**
33 CopyTo allowed you to transfer data from the internal buffer of
4cc4bfaf 34 wxMemoryOutputStream to an external buffer. @a len specifies the size of
23324ae1
FM
35 the buffer.
36 */
328f5751 37 size_t CopyTo(char* buffer, size_t len) const;
23324ae1
FM
38
39 /**
40 Returns the pointer to the stream object used as an internal buffer
41 for that stream.
42 */
328f5751 43 wxStreamBuffer* GetOutputStreamBuffer() const;
23324ae1
FM
44};
45
46
e54c96f1 47
23324ae1
FM
48/**
49 @class wxMemoryInputStream
7c913512
FM
50
51
23324ae1
FM
52 @library{wxbase}
53 @category{streams}
7c913512 54
e54c96f1 55 @see wxStreamBuffer, wxMemoryOutputStream
23324ae1
FM
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.
4cc4bfaf 64 The @a len argument specifies the amount of data to read from
23324ae1 65 the @e stream. Setting it to @e wxInvalidOffset means that
4cc4bfaf 66 the @a stream is to be read entirely (i.e. till the EOF is reached).
23324ae1 67 */
4cc4bfaf 68 wxMemoryInputStream(const char* data, size_t len);
7c913512
FM
69 wxMemoryInputStream(const wxMemoryOutputStream& stream);
70 wxMemoryInputStream(wxInputStream& stream,
71 wxFileOffset len = wxInvalidOffset);
23324ae1
FM
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 */
328f5751 83 wxStreamBuffer* GetInputStreamBuffer() const;
23324ae1 84};
e54c96f1 85