]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/fileconf.tex
remove C++ comment
[wxWidgets.git] / docs / latex / wx / fileconf.tex
... / ...
CommitLineData
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
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\helpref{wxObject}{wxobject}
28
29\wxheading{Include files}
30
31<wx/fileconf.h>
32
33\wxheading{Library}
34
35\helpref{wxBase}{librarieslist}
36
37
38\helponly{\insertatlevel{2}{\wxheading{Members}}}
39
40\membersection{wxFileConfig::wxFileConfig}\label{wxfileconfigctor}
41
42\func{}{wxFileConfig}{\param{wxInputStream\& }{is}, \param{const wxMBConv\& }{conv = wxConvAuto()}}
43
44Read the config data from the specified stream instead of the associated file,
45as usual.
46
47\wxheading{See also}
48
49\helpref{Save}{wxfileconfigsave}
50
51
52\membersection{wxFileName::GetGlobalFile}\label{wxfilenamegetglobalfile}
53
54\func{static wxFileName}{GetGlobalFile}{\param{const wxString\& }{basename}}
55
56Return the full path to the file which would be used by wxFileConfig as global,
57system-wide, file if it were constructed with \arg{basename} as ``global
58filename'' parameter in the constructor. Notice that this function cannot be
59used if \arg{basename} is already a full path name.
60
61
62\membersection{wxFileName::GetLocalFile}\label{wxfilenamegetlocalfile}
63
64\func{static wxFileName}{GetLocalFile}{\param{const wxString\& }{basename}, \param{int }{style = $0$}}
65
66Return the full path to the file which would be used by wxFileConfig as local,
67user-specific, file if it were constructed with \arg{basename} as ``local
68filename'' parameter in the constructor.
69
70\arg{style} has the same meaning as in \helpref{constructor}{wxconfigbasector}
71and can contain any combination of styles but only wxCONFIG\_USE\_SUBDIR bit is
72examined by this function.
73
74Notice that this function cannot be used if \arg{basename} is already a full
75path name.
76
77
78\membersection{wxFileConfig::Save}\label{wxfileconfigsave}
79
80\func{bool}{Save}{\param{wxOutputStream\& }{os}, \param{const wxMBConv\& }{conv = wxConvAuto()}}
81
82Saves all config data to the given stream, returns \true if data was saved
83successfully or \false on error.
84
85Note the interaction of this function with the internal ``dirty flag'': the
86data is saved unconditionally, i.e. even if the object is not dirty. However
87after saving it successfully, the dirty flag is reset so no changes will be
88written back to the file this object is associated with until you change its
89contents again.
90
91\wxheading{See also}
92
93\helpref{Flush}{wxconfigbaseflush}
94
95
96\membersection{wxFileConfig::SetUmask}\label{wxfileconfigsetumask}
97
98\func{void}{SetUmask}{\param{int }{mode}}
99
100Allows to set the mode to be used for the config file creation. For example, to
101create a config file which is not readable by other users (useful if it stores
102some sensitive information, such as passwords), you could use
103{\tt SetUmask(0077)}.
104
105This function doesn't do anything on non-Unix platforms.
106
107\wxheading{See also}
108
109\helpref{wxCHANGE\_UMASK}{wxchangeumask}
110
111
112