]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/mstream.h
don't make wxGridTableBase::IsEmptyCell() pure virtual, there is really no point...
[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 11
ba1d7a6c 12 @todo describe me.
7c913512 13
23324ae1
FM
14 @library{wxbase}
15 @category{streams}
7c913512 16
e54c96f1 17 @see wxStreamBuffer
23324ae1
FM
18*/
19class wxMemoryOutputStream : public wxOutputStream
20{
21public:
22 /**
4cc4bfaf 23 If @a data is @NULL, then it will initialize a new empty buffer which will
23324ae1 24 grow if required.
ba1d7a6c
FM
25
26 @warning
27 If the buffer is created, it will be destroyed at the destruction of the stream.
23324ae1 28 */
8067ee11 29 wxMemoryOutputStream(void* data = NULL, size_t length = 0);
23324ae1
FM
30
31 /**
32 Destructor.
33 */
adaaa686 34 virtual ~wxMemoryOutputStream();
23324ae1
FM
35
36 /**
ba1d7a6c
FM
37 Allows you to transfer data from the internal buffer of wxMemoryOutputStream
38 to an external buffer. @a len specifies the size of the buffer.
23324ae1 39 */
5267aefd 40 size_t CopyTo(void* buffer, size_t len) const;
23324ae1
FM
41
42 /**
43 Returns the pointer to the stream object used as an internal buffer
44 for that stream.
45 */
328f5751 46 wxStreamBuffer* GetOutputStreamBuffer() const;
23324ae1
FM
47};
48
49
e54c96f1 50
23324ae1
FM
51/**
52 @class wxMemoryInputStream
7c913512 53
ba1d7a6c 54 @todo describe me.
7c913512 55
23324ae1
FM
56 @library{wxbase}
57 @category{streams}
7c913512 58
e54c96f1 59 @see wxStreamBuffer, wxMemoryOutputStream
23324ae1
FM
60*/
61class wxMemoryInputStream : public wxInputStream
62{
63public:
23324ae1 64 /**
ba1d7a6c
FM
65 Initializes a new read-only memory stream which will use the specified
66 buffer data of length len. The stream does not take ownership of the buffer,
67 i.e. the buffer will not be deleted in its destructor.
23324ae1 68 */
0a98423e 69 wxMemoryInputStream(const void* data, size_t len);
ba1d7a6c
FM
70
71 /**
72 Creates a new read-only memory stream, initializing it with the data from
73 the given output stream @a stream.
74 */
7c913512 75 wxMemoryInputStream(const wxMemoryOutputStream& stream);
ba1d7a6c
FM
76
77 /**
78 Creates a new read-only memory stream, initializing it with the
79 data from the given input stream @a stream.
80
81 The @a len argument specifies the amount of data to read from the
82 @a stream. Setting it to @e wxInvalidOffset means that the @a stream
83 is to be read entirely (i.e. till the EOF is reached).
84 */
7c913512
FM
85 wxMemoryInputStream(wxInputStream& stream,
86 wxFileOffset len = wxInvalidOffset);
23324ae1
FM
87
88 /**
89 Destructor.
90 */
adaaa686 91 virtual ~wxMemoryInputStream();
23324ae1
FM
92
93 /**
94 Returns the pointer to the stream object used as an internal buffer
95 for that stream.
96 */
328f5751 97 wxStreamBuffer* GetInputStreamBuffer() const;
23324ae1 98};
e54c96f1 99