]>
Commit | Line | Data |
---|---|---|
842d6c94 RR |
1 | % ----------------------------------------------------------------------------- |
2 | % wxFFileInputStream | |
3 | % ----------------------------------------------------------------------------- | |
4 | \section{\class{wxFFileInputStream}}\label{wxffileinputstream} | |
5 | ||
6 | This class represents data read in from a file. There are actually | |
fa482912 | 7 | two such groups of classes: this one is based on \helpref{wxFFile}{wxffile} |
842d6c94 RR |
8 | whereas \helpref{wxFileInputStream}{wxfileinputstream} is based in |
9 | the \helpref{wxFile}{wxfile} class. | |
10 | ||
11 | Note that \helpref{wxFile}{wxfile} and \helpref{wxFFile}{wxffile} differ | |
12 | in one aspect, namely when to report that the end of the file has been | |
13 | reached. This is documented in \helpref{wxFile::Eof}{wxfileeof} and | |
14 | \helpref{wxFFile::Eof}{wxffileeof} and the behaviour of the stream | |
15 | classes reflects this difference, i.e. wxFileInputStream will report | |
605d715d VS |
16 | wxSTREAM\_EOF after having read the last byte whereas wxFFileInputStream |
17 | will report wxSTREAM\_EOF after trying to read {\it past} the last byte. | |
a84e46f2 VS |
18 | Related to EOF behavior, note that \helpref{SeekI()}{wxinputstreamseeki} |
19 | can seek beyond the end of the stream (file) and will thus not return | |
20 | {\it wxInvalidOffset} for that. | |
842d6c94 RR |
21 | |
22 | \wxheading{Derived from} | |
23 | ||
24 | \helpref{wxInputStream}{wxinputstream} | |
25 | ||
26 | \wxheading{Include files} | |
27 | ||
28 | <wx/wfstream.h> | |
29 | ||
30 | \wxheading{See also} | |
31 | ||
32 | \helpref{wxBufferedInputStream}{wxbufferedinputstream}, \helpref{wxFFileOutputStream}{wxffileoutputstream}, \helpref{wxFileOutputStream}{wxfileoutputstream} | |
33 | ||
34 | % ---------- | |
35 | % Members | |
36 | % ---------- | |
37 | \latexignore{\rtfignore{\wxheading{Members}}} | |
38 | ||
b236c10f | 39 | \membersection{wxFFileInputStream::wxFFileInputStream}\label{wxffileinputstreamctor} |
842d6c94 | 40 | |
5fec5bb6 | 41 | \func{}{wxFFileInputStream}{\param{const wxString\&}{ filename}, \param{const wxChar *}{ mode = "rb"}} |
842d6c94 | 42 | |
5fec5bb6 | 43 | Opens the specified file using its {\it filename} name using the specified mode. |
842d6c94 RR |
44 | |
45 | \func{}{wxFFileInputStream}{\param{wxFFile\&}{ file}} | |
46 | ||
47 | Initializes a file stream in read-only mode using the file I/O object {\it file}. | |
48 | ||
49 | \func{}{wxFFileInputStream}{\param{FILE *}{ fp}} | |
50 | ||
51 | Initializes a file stream in read-only mode using the specified file pointer {\it fp}. | |
52 | ||
b236c10f | 53 | \membersection{wxFFileInputStream::\destruct{wxFFileInputStream}}\label{wxffileinputstreamdtor} |
842d6c94 RR |
54 | |
55 | \func{}{\destruct{wxFFileInputStream}}{\void} | |
56 | ||
57 | Destructor. | |
58 | ||
b236c10f | 59 | \membersection{wxFFileInputStream::Ok}\label{wxffileinputstreamok} |
842d6c94 RR |
60 | |
61 | \constfunc{bool}{Ok}{\void} | |
62 | ||
cc81d32f | 63 | Returns true if the stream is initialized and ready. |
842d6c94 RR |
64 | |
65 | % ----------------------------------------------------------------------------- | |
66 | % wxFFileOutputStream | |
67 | % ----------------------------------------------------------------------------- | |
68 | \section{\class{wxFFileOutputStream}}\label{wxffileoutputstream} | |
69 | ||
70 | This class represents data written to a file. There are actually | |
fa482912 | 71 | two such groups of classes: this one is based on \helpref{wxFFile}{wxffile} |
842d6c94 RR |
72 | whereas \helpref{wxFileInputStream}{wxffileinputstream} is based in |
73 | the \helpref{wxFile}{wxfile} class. | |
74 | ||
75 | Note that \helpref{wxFile}{wxfile} and \helpref{wxFFile}{wxffile} differ | |
76 | in one aspect, namely when to report that the end of the file has been | |
77 | reached. This is documented in \helpref{wxFile::Eof}{wxfileeof} and | |
78 | \helpref{wxFFile::Eof}{wxffileeof} and the behaviour of the stream | |
79 | classes reflects this difference, i.e. wxFileInputStream will report | |
605d715d VS |
80 | wxSTREAM\_EOF after having read the last byte whereas wxFFileInputStream |
81 | will report wxSTREAM\_EOF after trying to read {\it past} the last byte. | |
a84e46f2 VS |
82 | Related to EOF behavior, note that \helpref{SeekO()}{wxoutputstreamseeko} |
83 | can seek beyond the end of the stream (file) and will thus not return | |
84 | {\it wxInvalidOffset} for that. | |
842d6c94 RR |
85 | |
86 | \wxheading{Derived from} | |
87 | ||
88 | \helpref{wxOutputStream}{wxoutputstream} | |
89 | ||
90 | \wxheading{Include files} | |
91 | ||
92 | <wx/wfstream.h> | |
93 | ||
94 | \wxheading{See also} | |
95 | ||
96 | \helpref{wxBufferedOutputStream}{wxbufferedoutputstream}, \helpref{wxFFileInputStream}{wxffileinputstream}, \helpref{wxFileInputStream}{wxfileinputstream} | |
97 | ||
98 | % ---------- | |
99 | % Members | |
100 | % ---------- | |
101 | \latexignore{\rtfignore{\wxheading{Members}}} | |
102 | ||
b236c10f | 103 | \membersection{wxFFileOutputStream::wxFFileOutputStream}\label{wxffileoutputstreamctor} |
842d6c94 | 104 | |
5fec5bb6 | 105 | \func{}{wxFFileOutputStream}{\param{const wxString\&}{ filename}, \param{const wxChar *}{ mode="w+b"}} |
842d6c94 | 106 | |
5fec5bb6 | 107 | Opens the file with the given {\it filename} name in the specified mode. |
842d6c94 RR |
108 | |
109 | \func{}{wxFFileOutputStream}{\param{wxFFile\&}{ file}} | |
110 | ||
111 | Initializes a file stream in write-only mode using the file I/O object {\it file}. | |
112 | ||
113 | \func{}{wxFFileOutputStream}{\param{FILE *}{ fp}} | |
114 | ||
115 | Initializes a file stream in write-only mode using the file descriptor {\it fp}. | |
116 | ||
b236c10f | 117 | \membersection{wxFFileOutputStream::\destruct{wxFFileOutputStream}}\label{wxffileoutputstreamdtor} |
842d6c94 RR |
118 | |
119 | \func{}{\destruct{wxFFileOutputStream}}{\void} | |
120 | ||
121 | Destructor. | |
122 | ||
b236c10f | 123 | \membersection{wxFFileOutputStream::Ok}\label{wxffileoutputstreamok} |
842d6c94 RR |
124 | |
125 | \constfunc{bool}{Ok}{\void} | |
126 | ||
cc81d32f | 127 | Returns true if the stream is initialized and ready. |
842d6c94 RR |
128 | |
129 | % ----------------------------------------------------------------------------- | |
130 | % wxFFileStream | |
131 | % ----------------------------------------------------------------------------- | |
569ef72a | 132 | \section{\class{wxFFileStream}}\label{wxffilestream} |
842d6c94 RR |
133 | |
134 | \wxheading{Derived from} | |
135 | ||
c0ffb626 | 136 | \helpref{wxFFileOutputStream}{wxffileoutputstream}, \helpref{wxFFileInputStream}{wxffileinputstream} |
842d6c94 RR |
137 | |
138 | \wxheading{Include files} | |
139 | ||
140 | <wx/wfstream.h> | |
141 | ||
142 | \wxheading{See also} | |
143 | ||
c0ffb626 | 144 | \helpref{wxStreamBuffer}{wxstreambuffer} |
842d6c94 RR |
145 | |
146 | \latexignore{\rtfignore{\wxheading{Members}}} | |
147 | ||
b236c10f | 148 | \membersection{wxFFileStream::wxFFileStream}\label{wxffilestreamctor} |
842d6c94 RR |
149 | |
150 | \func{}{wxFFileStream}{\param{const wxString\&}{ iofileName}} | |
151 | ||
152 | Initializes a new file stream in read-write mode using the specified | |
605d715d | 153 | {\it iofilename} name. |
842d6c94 RR |
154 | |
155 |