]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/strmmem.tex
Fixed wxMSW arrow key bug, changed wxPoem window to a wxWindow
[wxWidgets.git] / docs / latex / wx / strmmem.tex
1 % -----------------------------------------------------------------------------
2 % wxMemoryInputStream
3 % -----------------------------------------------------------------------------
4 \section{\class{wxMemoryInputStream}}\label{wxmeminputstream}
5
6 \wxheading{Derived from}
7
8 \helpref{wxInputStream}{wxinputstream}
9
10 \wxheading{Include files}
11
12 <wx/mstream.h>
13
14 \wxheading{See also}
15
16 \helpref{wxStreamBuffer}{wxstreamBuffer}
17
18 \wxheading{Remark}
19
20 You can create a similar stream by this way:
21
22 \begin{verbatim}
23 wxStreamBuffer *sb = new wxStreamBuffer(wxStreamBuffer::read);
24 wxInputStream *input = new wxInputStream(sb);
25
26 sb->SetBufferIO(data, data\_end);
27 \end{verbatim}
28
29 % ----------
30 % Members
31 % ----------
32 \latexignore{\rtfignore{\wxheading{Members}}}
33
34 \membersection{wxMemoryInputStream::wxMemoryInputStream}
35
36 \func{}{wxMemoryInputStream}{\param{const char *}{ data}, \param{size\_t}{ len}}
37
38 Initializes a new read-only memory stream which will use the specified buffer
39 \it{data} of length \it{len}.
40
41 \membersection{wxMemoryInputStream::\destruct{wxMemoryInputStream}}
42
43 \func{}{\destruct{wxFileInputStream}}{\void}
44
45 Destructor.
46
47 % -----------------------------------------------------------------------------
48 % wxMemoryOutputStream
49 % -----------------------------------------------------------------------------
50 \section{\class{wxMemoryOutputStream}}\label{wxmemoutputstream}
51
52 \wxheading{Derived from}
53
54 \helpref{wxOutputStream}{wxoutputstream}
55
56 \wxheading{Include files}
57
58 <wx/mstream.h>
59
60 \wxheading{See also}
61
62 \helpref{wxStreamBuffer}{wxstreamBuffer}
63
64 \wxheading{Remark}
65
66 You can create a similar stream by this way:
67
68 \begin{verbatim}
69 wxStreamBuffer *sb = new wxStreamBuffer(wxStreamBuffer::write);
70 wxOutputStream *input = new wxOutputStream(sb);
71
72 // If there are data
73 sb->SetBufferIO(data, data\_end);
74 // Else
75 sb->Fixed(FALSE);
76 \end{verbatim}
77
78 This way is also useful to create read/write memory stream:
79
80 \begin{verbatim}
81 wxStreamBuffer *sb = new wxStreamBuffer(wxStreamBuffer::read\_write);
82 wxOutputStream *output = new wxOutputStream(sb);
83 wxInputStream *input = new wxInputStream(sb);
84
85 // If there are data
86 sb->SetBufferIO(data, data\_end);
87 // Else
88 sb->Fixed(FALSE);
89 \end{verbatim}
90
91 % ----------
92 % Members
93 % ----------
94 \latexignore{\rtfignore{\wxheading{Members}}}
95
96 \membersection{wxMemoryOutputStream::wxMemoryOutputStream}
97
98 \func{}{wxMemoryOutputStream}{\param{char *}{ data = NULL}, \param{size\_t}{ length = 0}}
99
100 If \it{data} is NULL, then it will initialize a new empty buffer which will
101 grow when it needs.
102
103 \wxheading{Warning}
104
105 If the buffer is created, it will be destroyed at the destruction of the
106 stream.
107
108 \membersection{wxMemoryOutputStream::\destruct{wxMemoryOutputStream}}
109
110 \func{}{\destruct{wxMemoryOutputStream}}{\void}
111
112 Destructor.
113