1 \section{Config classes overview
}\label{wxconfigoverview
}
3 Classes:
\helpref{wxConfig
}{wxconfig
},
\helpref{wxConfigBase
}{wxconfigbase
},
4 \helpref{wxRegConfig
}{wxregconfig
},
\helpref{wxFileConfig
}{wxfileconfig
},
5 \helpref{wxIniConfig
}{wxiniconfig
}
7 This overview briefly describes what the config classes are and what are the
8 for. All the details about how to use them may be found in the description of
9 the
\helpref{wxConfigBase
}{wxconfigbase
} class and the documentation of the
10 file, registry and INI file based implementations mentions all the
11 features/limitations specific to each one of these versions.
13 The config classes provide a way to store some application configuration
14 information. They were especially designed for this usage and, although may
15 probably be used for many other things as well, should be limited to it. It
16 means that this information should be:
18 \item{1.
} Typed, i.e. strings or numbers for the moment. You can not store
19 binary data, for example.
20 \item{2.
} Small. For instance, it is not recommended to use the Windows
21 registry for amounts of data more than a couple of kilobytes.
22 \item{3.
} Not performance critical, neither from speed nor from memory
23 consumption point of view.
26 On the other hand, the provided features make them very useful for storing all
27 kind of small to medioum volumes of hierarchically organized heterogenous
28 data. In short, this is a place where you can conveniently stuff all your data
29 (numbers and strings) organizing it in a tree where you use the
30 filesystem-like paths to specify the location of a piece of data. In
31 particular, these classes were designed to be as easy to use as possible.
33 From another point of view, they provide an interface which hides the
34 differences between the Windows registry and the standard Unix text format
35 configuration files. Other (future) implementations of wxConfigBase might also
36 understand GTK ressource files or their analogues on the KDE side.
38 In any case, each implementation of wxConfigBase does its best (although due
39 to the limitations of the underlying physical storage as in the case of
40 wxIniConfigs it may not implement
100\% of the base class functionality) to
41 make the data look the same way everywhere. So you have the groups of entries
42 and the entries themselves. Each entry contains either a string or a number
43 (or a boolean value... support for other types of data such as dates or
44 timestamps is planned) and is identified by the full path to it: something
45 like /MyApp/UserPreferences/Colors/Foreground. The previous elements in the
46 path are the group names, each name may contain an arbitrary number of entries
47 and subgroups. The path components are
{\bf always
} separated with a slash,
48 even though some implementations use the backslash internally. The further
49 details (including how to read/write these entries) may be found in
50 \helpref{wxConfigBase
}{wxconfigbase
} documentation.