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