]>
Commit | Line | Data |
---|---|---|
b36f57c2 GL |
1 | % ----------------------------------------------------------------------------- |
2 | % wxMemoryInputStream | |
3 | % ----------------------------------------------------------------------------- | |
4 | \section{\class{wxMemoryInputStream}}\label{wxmeminputstream} | |
5 | ||
6 | \wxheading{Derived from} | |
7 | ||
8 | \helpref{wxInputStream}{wxinputstream} | |
9 | ||
954b8ae6 JS |
10 | \wxheading{Include files} |
11 | ||
12 | <wx/mstream.h> | |
13 | ||
a7af285d VZ |
14 | \wxheading{Library} |
15 | ||
16 | \helpref{wxBase}{librarieslist} | |
17 | ||
b36f57c2 GL |
18 | \wxheading{See also} |
19 | ||
85ec2f26 | 20 | \helpref{wxStreamBuffer}{wxstreambuffer}, \helpref{wxMemoryOutputStream}{wxmemoutputstream} |
b36f57c2 | 21 | |
b36f57c2 GL |
22 | % ---------- |
23 | % Members | |
24 | % ---------- | |
25 | \latexignore{\rtfignore{\wxheading{Members}}} | |
26 | ||
dcbd177f | 27 | \membersection{wxMemoryInputStream::wxMemoryInputStream}\label{wxmemoryinputstreamctor} |
b36f57c2 GL |
28 | |
29 | \func{}{wxMemoryInputStream}{\param{const char *}{ data}, \param{size\_t}{ len}} | |
30 | ||
31 | Initializes a new read-only memory stream which will use the specified buffer | |
2bf8e4eb | 32 | {\it data} of length {\it len}. The stream does not take ownership of the |
08890e27 | 33 | buffer, i.e. the buffer will not be deleted in its destructor. |
b36f57c2 | 34 | |
96461cc2 VZ |
35 | \func{}{wxMemoryInputStream}{\param{const wxMemoryOutputStream&}{ stream}} |
36 | ||
08890e27 | 37 | Creates a new read-only memory stream, initializing it with the |
96461cc2 VZ |
38 | data from the given output stream \arg{stream}. |
39 | ||
76447155 VZ |
40 | \func{}{wxMemoryInputStream}{\param{wxInputStream\&}{ stream}, \param{wxFileOffset}{ len = wxInvalidOffset}} |
41 | ||
42 | Creates a new read-only memory stream, initializing it with the | |
43 | data from the given input stream \arg{stream}. | |
44 | ||
45 | The \arg{len} argument specifies the amount of data to read from | |
46 | the \arg{stream}. Setting it to {\it wxInvalidOffset} means that | |
47 | the \arg{stream} is to be read entirely (i.e. till the EOF is reached). | |
48 | ||
49 | ||
dcbd177f | 50 | \membersection{wxMemoryInputStream::\destruct{wxMemoryInputStream}}\label{wxmemoryinputstreamdtor} |
b36f57c2 | 51 | |
85ec2f26 | 52 | \func{}{\destruct{wxMemoryInputStream}}{\void} |
b36f57c2 GL |
53 | |
54 | Destructor. | |
55 | ||
96461cc2 VZ |
56 | \membersection{wxMemoryInputStream::GetInputStreamBuffer}\label{wxmemoryinputstreamgetistrmbuf} |
57 | ||
58 | \constfunc{wxStreamBuffer *}{GetInputStreamBuffer}{\void} | |
59 | ||
60 | Returns the pointer to the stream object used as an internal buffer | |
61 | for that stream. | |
62 | ||
b36f57c2 GL |
63 | % ----------------------------------------------------------------------------- |
64 | % wxMemoryOutputStream | |
65 | % ----------------------------------------------------------------------------- | |
66 | \section{\class{wxMemoryOutputStream}}\label{wxmemoutputstream} | |
67 | ||
68 | \wxheading{Derived from} | |
69 | ||
70 | \helpref{wxOutputStream}{wxoutputstream} | |
71 | ||
954b8ae6 JS |
72 | \wxheading{Include files} |
73 | ||
74 | <wx/mstream.h> | |
75 | ||
a7af285d VZ |
76 | \wxheading{Library} |
77 | ||
78 | \helpref{wxBase}{librarieslist} | |
79 | ||
b36f57c2 GL |
80 | \wxheading{See also} |
81 | ||
2bf8e4eb | 82 | \helpref{wxStreamBuffer}{wxstreambuffer} |
b36f57c2 | 83 | |
b36f57c2 GL |
84 | % ---------- |
85 | % Members | |
86 | % ---------- | |
87 | \latexignore{\rtfignore{\wxheading{Members}}} | |
88 | ||
dcbd177f | 89 | \membersection{wxMemoryOutputStream::wxMemoryOutputStream}\label{wxmemoryoutputstreamctor} |
b36f57c2 GL |
90 | |
91 | \func{}{wxMemoryOutputStream}{\param{char *}{ data = NULL}, \param{size\_t}{ length = 0}} | |
92 | ||
605d715d | 93 | If {\it data} is NULL, then it will initialize a new empty buffer which will |
2bf8e4eb | 94 | grow if required. |
b36f57c2 GL |
95 | |
96 | \wxheading{Warning} | |
97 | ||
98 | If the buffer is created, it will be destroyed at the destruction of the | |
99 | stream. | |
100 | ||
dcbd177f | 101 | \membersection{wxMemoryOutputStream::\destruct{wxMemoryOutputStream}}\label{wxmemoryoutputstreamdtor} |
b36f57c2 GL |
102 | |
103 | \func{}{\destruct{wxMemoryOutputStream}}{\void} | |
104 | ||
105 | Destructor. | |
aed0ed3c | 106 | |
dcbd177f | 107 | \membersection{wxMemoryOutputStream::CopyTo}\label{wxmemoryoutputstreamcopyto} |
f439844b GL |
108 | |
109 | \constfunc{size\_t}{CopyTo}{\param{char *}{buffer}, \param{size\_t }{len}} | |
110 | ||
111 | CopyTo allowed you to transfer data from the internal buffer of | |
605d715d | 112 | wxMemoryOutputStream to an external buffer. {\it len} specifies the size of |
f439844b GL |
113 | the buffer. |
114 | ||
115 | \wxheading{Returned value} | |
116 | ||
117 | CopyTo returns the number of bytes copied to the buffer. Generally it is either | |
118 | len or the size of the stream buffer. | |
22d6efa8 | 119 | |
96461cc2 VZ |
120 | \membersection{wxMemoryOutputStream::GetOutputStreamBuffer}\label{wxmemoryoutputstreamgetostrmbuf} |
121 | ||
122 | \constfunc{wxStreamBuffer *}{GetOutputStreamBuffer}{\void} | |
123 | ||
124 | Returns the pointer to the stream object used as an internal buffer | |
125 | for that stream. | |
3a40452d | 126 |