]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/fileconf.tex
Added periods
[wxWidgets.git] / docs / latex / wx / fileconf.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: fileconf.tex
3 %% Purpose: wxFileConfig documentation
4 %% Author: Vadim Zeitlin
5 %% Modified by:
6 %% Created: 2004-10-04
7 %% RCS-ID: $Id$
8 %% Copyright: (c) 2004 Vadim Zeitlin
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 \section{\class{wxFileConfig}}\label{wxfileconfig}
13
14 wxFileConfig implements \helpref{wxConfigBase}{wxconfigbase} interface for
15 storing and retrieving configuration information using plain text files. The
16 files have a simple format reminiscent of Windows INI files with lines of the
17 form \texttt{key = value} defining the keys and lines of special form
18 \texttt{$[$group$]$} indicating the start of each group.
19
20 This class is used by default for wxConfig on Unix platforms but may also be
21 used explicitly if you want to use files and not the registry even under
22 Windows.
23
24 \wxheading{Derived from}
25
26 \helpref{wxConfigBase}{wxconfigbase}
27
28 \wxheading{Include files}
29
30 <wx/fileconf.h>
31
32 \wxheading{Library}
33
34 \helpref{wxBase}{librarieslist}
35
36
37 \helponly{\insertatlevel{2}{\wxheading{Members}}}
38
39 \membersection{wxFileConfig::wxFileConfig}\label{wxfileconfigctor}
40
41 \func{}{wxFileConfig}{\param{wxInputStream\& }{is}, \param{const wxMBConv\& }{conv = wxConvAuto()}}
42
43 Read the config data from the specified stream instead of the associated file,
44 as usual.
45
46 \wxheading{See also}
47
48 \helpref{Save}{wxfileconfigsave}
49
50
51 \membersection{wxFileName::GetGlobalFile}\label{wxfilenamegetglobalfile}
52
53 \func{static wxFileName}{GetGlobalFile}{\param{const wxString\& }{basename}}
54
55 Return the full path to the file which would be used by wxFileConfig as global,
56 system-wide, file if it were constructed with \arg{basename} as ``global
57 filename'' parameter in the constructor. Notice that this function cannot be
58 used if \arg{basename} is already a full path name.
59
60
61 \membersection{wxFileName::GetLocalFile}\label{wxfilenamegetlocalfile}
62
63 \func{static wxFileName}{GetLocalFile}{\param{const wxString\& }{basename}, \param{int }{style = $0$}}
64
65 Return the full path to the file which would be used by wxFileConfig as local,
66 user-specific, file if it were constructed with \arg{basename} as ``local
67 filename'' parameter in the constructor.
68
69 \arg{style} has the same meaning as in \helpref{constructor}{wxconfigbasector}
70 and can contain any combination of styles but only wxCONFIG\_USE\_SUBDIR bit is
71 examined by this function.
72
73 Notice that this function cannot be used if \arg{basename} is already a full
74 path name.
75
76
77 \membersection{wxFileConfig::Save}\label{wxfileconfigsave}
78
79 \func{bool}{Save}{\param{wxOutputStream\& }{os}, \param{const wxMBConv\& }{conv = wxConvAuto()}}
80
81 Saves all config data to the given stream, returns \true if data was saved
82 successfully or \false on error.
83
84 Note the interaction of this function with the internal ``dirty flag'': the
85 data is saved unconditionally, i.e. even if the object is not dirty. However
86 after saving it successfully, the dirty flag is reset so no changes will be
87 written back to the file this object is associated with until you change its
88 contents again.
89
90 \wxheading{See also}
91
92 \helpref{Flush}{wxconfigbaseflush}
93
94
95 \membersection{wxFileConfig::SetUmask}\label{wxfileconfigsetumask}
96
97 \func{void}{SetUmask}{\param{int }{mode}}
98
99 Allows to set the mode to be used for the config file creation. For example, to
100 create a config file which is not readable by other users (useful if it stores
101 some sensitive information, such as passwords), you could use
102 {\tt SetUmask(0077)}.
103
104 This function doesn't do anything on non-Unix platforms.
105
106 \wxheading{See also}
107
108 \helpref{wxCHANGE\_UMASK}{wxchangeumask}
109
110
111