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