]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/tempfilestrm.tex
Removed wxDataViewViewColumn since it is redundant.
[wxWidgets.git] / docs / latex / wx / tempfilestrm.tex
1 %
2 % automatically generated by HelpGen $Revision$ from
3 % wx/wfstream.h at 07/Mar/05 20:45:33
4 %
5
6 \section{\class{wxTempFileOutputStream}}\label{wxtempfileoutputstream}
7
8 wxTempFileOutputStream is an output stream based on \helpref{wxTempFile}{wxtempfile}. It
9 provides a relatively safe way to replace the contents of the
10 existing file.
11
12 \wxheading{Derived from}
13
14 \helpref{wxOutputStream}{wxoutputstream}
15
16 \wxheading{Include files}
17
18 <wx/wfstream.h>
19
20 \wxheading{See also}
21
22 \helpref{wxTempFile}{wxtempfile}
23
24 \latexignore{\rtfignore{\wxheading{Members}}}
25
26
27 \membersection{wxTempFileOutputStream::wxTempFileOutputStream}\label{wxtempfileoutputstreamwxtempfileoutputstream}
28
29 \func{}{wxTempFileOutputStream}{\param{const wxString\& }{fileName}}
30
31 Associates wxTempFileOutputStream with the file to be replaced and opens it. You should use
32 \helpref{IsOk}{wxstreambaseisok} to verify if the constructor succeeded.
33
34 Call \helpref{Commit()}{wxtempfileoutputstreamcommit} or \helpref{Close()}{wxoutputstreamclose} to
35 replace the old file and close this one. Calling \helpref{Discard()}{wxtempfileoutputstreamdiscard}
36 (or allowing the destructor to do it) will discard the changes.
37
38
39 \membersection{wxTempFileOutputStream::Commit}\label{wxtempfileoutputstreamcommit}
40
41 \func{bool}{Commit}{\void}
42
43 Validate changes: deletes the old file of the given name and renames the new
44 file to the old name. Returns {\tt true} if both actions succeeded. If {\tt false} is
45 returned it may unfortunately mean two quite different things: either that
46 either the old file couldn't be deleted or that the new file couldn't be renamed
47 to the old name.
48
49
50 \membersection{wxTempFileOutputStream::Discard}\label{wxtempfileoutputstreamdiscard}
51
52 \func{void}{Discard}{\void}
53
54 Discard changes: the old file contents are not changed, the temporary file is
55 deleted.
56