2008-02-18 19:04:03 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2008-02-22 17:05:22 -05:00
|
|
|
// Name: config.h
|
2008-02-18 19:04:03 -05:00
|
|
|
// Purpose: topic overview
|
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/*!
|
2008-02-19 08:28:24 -05:00
|
|
|
|
2008-02-22 17:05:22 -05:00
|
|
|
@page overview_config wxConfig classes overview
|
2008-02-19 08:28:24 -05:00
|
|
|
|
2008-02-25 17:29:37 -05:00
|
|
|
Classes: wxConfigBase
|
2008-02-22 17:05:22 -05:00
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
This overview briefly describes what the config classes are and what they are
|
|
|
|
for. All the details about how to use them may be found in the description of
|
2008-02-25 17:29:37 -05:00
|
|
|
the wxConfigBase class and the documentation of the
|
2008-02-18 19:04:03 -05:00
|
|
|
file, registry and INI file based implementations mentions all the
|
|
|
|
features/limitations specific to each one of these versions.
|
2008-02-22 17:05:22 -05:00
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
The config classes provide a way to store some application configuration
|
|
|
|
information. They were especially designed for this usage and, although may
|
|
|
|
probably be used for many other things as well, should be limited to it. It
|
|
|
|
means that this information should be:
|
2008-02-19 08:28:24 -05:00
|
|
|
|
2008-02-22 17:05:22 -05:00
|
|
|
@li Typed, i.e. strings or numbers for the moment.
|
|
|
|
You can not store binary data, for example.
|
|
|
|
@li Small. For instance, it is not recommended to use the Windows
|
|
|
|
registry for amounts of data more than a couple of kilobytes.
|
|
|
|
@li Not performance critical, neither from speed nor from a memory
|
|
|
|
consumption point of view.
|
2008-02-19 08:28:24 -05:00
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
On the other hand, the features provided make them very useful for storing all
|
|
|
|
kinds of small to medium volumes of hierarchically-organized, heterogeneous
|
|
|
|
data. In short, this is a place where you can conveniently stuff all your data
|
|
|
|
(numbers and strings) organizing it in a tree where you use the
|
|
|
|
filesystem-like paths to specify the location of a piece of data. In
|
|
|
|
particular, these classes were designed to be as easy to use as possible.
|
2008-02-22 17:05:22 -05:00
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
From another point of view, they provide an interface which hides the
|
|
|
|
differences between the Windows registry and the standard Unix text format
|
|
|
|
configuration files. Other (future) implementations of wxConfigBase might also
|
|
|
|
understand GTK resource files or their analogues on the KDE side.
|
2008-02-22 17:05:22 -05:00
|
|
|
|
2008-02-18 19:04:03 -05:00
|
|
|
In any case, each implementation of wxConfigBase does its best to
|
2008-02-19 08:28:24 -05:00
|
|
|
make the data look the same way everywhere. Due to limitations of the underlying
|
2008-02-18 19:04:03 -05:00
|
|
|
physical storage, it may not implement 100% of the base class functionality.
|
2008-02-22 17:05:22 -05:00
|
|
|
|
|
|
|
There are groups of entries and the entries themselves. Each entry contains either
|
|
|
|
a string or a number (or a boolean value; support for other types of data such as
|
|
|
|
dates or timestamps is planned) and is identified by the full path to it: something
|
2008-02-25 17:29:37 -05:00
|
|
|
like @c /MyApp/UserPreferences/Colors/Foreground.
|
2008-02-22 17:05:22 -05:00
|
|
|
|
|
|
|
The previous elements in the path are the group names, and each name may
|
|
|
|
contain an arbitrary number of entries and subgroups.
|
|
|
|
|
|
|
|
The path components are @b always separated with a slash,
|
2008-02-18 19:04:03 -05:00
|
|
|
even though some implementations use the backslash internally. Further
|
2008-02-19 08:28:24 -05:00
|
|
|
details (including how to read/write these entries) may be found in
|
2008-02-25 17:29:37 -05:00
|
|
|
the documentation for wxConfigBase.
|
2008-02-19 08:28:24 -05:00
|
|
|
|
2008-02-22 17:05:22 -05:00
|
|
|
*/
|