]>
Commit | Line | Data |
---|---|---|
15b6757b | 1 | ///////////////////////////////////////////////////////////////////////////// |
d54cf7ff | 2 | // Name: config.h |
15b6757b FM |
3 | // Purpose: topic overview |
4 | // Author: wxWidgets team | |
5 | // RCS-ID: $Id$ | |
6 | // Licence: wxWindows license | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | /*! | |
36c9828f | 10 | |
d54cf7ff | 11 | @page overview_config wxConfig classes overview |
36c9828f | 12 | |
15b6757b | 13 | Classes: #wxConfig |
d54cf7ff | 14 | |
15b6757b FM |
15 | This overview briefly describes what the config classes are and what they are |
16 | for. All the details about how to use them may be found in the description of | |
17 | the #wxConfigBase class and the documentation of the | |
18 | file, registry and INI file based implementations mentions all the | |
19 | features/limitations specific to each one of these versions. | |
d54cf7ff | 20 | |
15b6757b FM |
21 | The config classes provide a way to store some application configuration |
22 | information. They were especially designed for this usage and, although may | |
23 | probably be used for many other things as well, should be limited to it. It | |
24 | means that this information should be: | |
36c9828f | 25 | |
d54cf7ff FM |
26 | @li Typed, i.e. strings or numbers for the moment. |
27 | You can not store binary data, for example. | |
28 | @li Small. For instance, it is not recommended to use the Windows | |
29 | registry for amounts of data more than a couple of kilobytes. | |
30 | @li Not performance critical, neither from speed nor from a memory | |
31 | consumption point of view. | |
36c9828f | 32 | |
15b6757b FM |
33 | On the other hand, the features provided make them very useful for storing all |
34 | kinds of small to medium volumes of hierarchically-organized, heterogeneous | |
35 | data. In short, this is a place where you can conveniently stuff all your data | |
36 | (numbers and strings) organizing it in a tree where you use the | |
37 | filesystem-like paths to specify the location of a piece of data. In | |
38 | particular, these classes were designed to be as easy to use as possible. | |
d54cf7ff | 39 | |
15b6757b FM |
40 | From another point of view, they provide an interface which hides the |
41 | differences between the Windows registry and the standard Unix text format | |
42 | configuration files. Other (future) implementations of wxConfigBase might also | |
43 | understand GTK resource files or their analogues on the KDE side. | |
d54cf7ff | 44 | |
15b6757b | 45 | In any case, each implementation of wxConfigBase does its best to |
36c9828f | 46 | make the data look the same way everywhere. Due to limitations of the underlying |
15b6757b | 47 | physical storage, it may not implement 100% of the base class functionality. |
d54cf7ff FM |
48 | |
49 | There are groups of entries and the entries themselves. Each entry contains either | |
50 | a string or a number (or a boolean value; support for other types of data such as | |
51 | dates or timestamps is planned) and is identified by the full path to it: something | |
52 | like /MyApp/UserPreferences/Colors/Foreground. | |
53 | ||
54 | The previous elements in the path are the group names, and each name may | |
55 | contain an arbitrary number of entries and subgroups. | |
56 | ||
57 | The path components are @b always separated with a slash, | |
15b6757b | 58 | even though some implementations use the backslash internally. Further |
36c9828f | 59 | details (including how to read/write these entries) may be found in |
15b6757b | 60 | the documentation for #wxConfigBase. |
36c9828f | 61 | |
d54cf7ff | 62 | */ |