File: wx139.htm

package info (click to toggle)
wxwin2-doc 2.01-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 6,540 kB
  • ctags: 5,968
  • sloc: cpp: 15,157; makefile: 434; sh: 6
file content (61 lines) | stat: -rw-r--r-- 2,238 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<HTML>
<head><title>wxMemoryOutputStream</title></head>

<BODY BGCOLOR=#FFFFFF>
<A NAME="wxmemoutputstream"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx138.htm#wxmeminputstream"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx140.htm#wxmenu"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>

<H2>wxMemoryOutputStream</H2>
<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
<A HREF="wx160.htm#wxoutputstream">wxOutputStream</A><P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/mstream.h&gt;<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
wxStreamBuffer (REF NOT FOUND)<P>
<B><FONT COLOR="#FF0000">Remark</FONT></B><P>
You can create a similar stream by this way:<P>
<PRE>
  wxStreamBuffer *sb = new wxStreamBuffer(wxStreamBuffer::write);
  wxOutputStream *input = new wxOutputStream(sb);

  // If there are data
    sb-&gt;SetBufferIO(data, data\_end);
  // Else
    sb-&gt;Fixed(FALSE);
</PRE>
This way is also useful to create read/write memory stream:<P>
<PRE>
  wxStreamBuffer *sb = new wxStreamBuffer(wxStreamBuffer::read\_write);
  wxOutputStream *output = new wxOutputStream(sb);
  wxInputStream *input = new wxInputStream(sb);

  // If there are data
    sb-&gt;SetBufferIO(data, data\_end);
  // Else
    sb-&gt;Fixed(FALSE);
</PRE>
<B><FONT COLOR="#FF0000">Members</FONT></B><P>
<A HREF="#topic557">wxMemoryOutputStream::wxMemoryOutputStream</A><BR>
<A HREF="#topic558">wxMemoryOutputStream::~wxMemoryOutputStream</A><BR>
<P>

<HR>
<A NAME="topic557"></A>
<H3>wxMemoryOutputStream::wxMemoryOutputStream</H3>
<P>
<B></B> <B>wxMemoryOutputStream</B>(<B>char *</B><I> data = NULL</I>, <B>size_t</B><I> length = 0</I>)<P>
If <I>data</I> is NULL, then it will initialize a new empty buffer which will
grow when it needs.<P>
<B><FONT COLOR="#FF0000">Warning</FONT></B><P>
If the buffer is created, it will be destroyed at the destruction of the
stream.<P>

<HR>
<A NAME="topic558"></A>
<H3>wxMemoryOutputStream::~wxMemoryOutputStream</H3>
<P>
<B></B> <B>~wxMemoryOutputStream</B>()<P>
Destructor.<P>

</BODY></HTML>