1999-11-22 14:44:25 -05:00
|
|
|
\section{wxConfig classes overview}\label{wxconfigoverview}
|
1998-09-29 20:48:01 -04:00
|
|
|
|
1998-10-07 07:04:27 -04:00
|
|
|
Classes: \helpref{wxConfig}{wxconfigbase}
|
1998-09-29 20:48:01 -04:00
|
|
|
|
1999-02-06 08:32:46 -05:00
|
|
|
This overview briefly describes what the config classes are and what they are
|
1998-09-29 20:48:01 -04:00
|
|
|
for. All the details about how to use them may be found in the description of
|
|
|
|
the \helpref{wxConfigBase}{wxconfigbase} class and the documentation of the
|
|
|
|
file, registry and INI file based implementations mentions all the
|
|
|
|
features/limitations specific to each one of these versions.
|
|
|
|
|
|
|
|
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:
|
1999-02-28 18:39:59 -05:00
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
\begin{enumerate}\itemsep=0pt
|
1999-02-28 18:39:59 -05:00
|
|
|
\item Typed, i.e. strings or numbers for the moment. You can not store
|
1998-09-29 20:48:01 -04:00
|
|
|
binary data, for example.
|
1999-02-28 18:39:59 -05:00
|
|
|
\item Small. For instance, it is not recommended to use the Windows
|
1998-09-29 20:48:01 -04:00
|
|
|
registry for amounts of data more than a couple of kilobytes.
|
1999-02-28 18:39:59 -05:00
|
|
|
\item Not performance critical, neither from speed nor from a memory
|
1998-09-29 20:48:01 -04:00
|
|
|
consumption point of view.
|
1999-02-28 18:39:59 -05:00
|
|
|
\end{enumerate}
|
1998-09-29 20:48:01 -04:00
|
|
|
|
1999-02-06 08:32:46 -05:00
|
|
|
On the other hand, the features provided make them very useful for storing all
|
2000-07-15 15:51:35 -04:00
|
|
|
kinds of small to medium volumes of hierarchically-organized, heterogeneous
|
1998-09-29 20:48:01 -04:00
|
|
|
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.
|
|
|
|
|
|
|
|
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
|
1999-02-28 18:39:59 -05:00
|
|
|
understand GTK resource files or their analogues on the KDE side.
|
1998-09-29 20:48:01 -04:00
|
|
|
|
1999-02-06 08:32:46 -05:00
|
|
|
In any case, each implementation of wxConfigBase does its best to
|
2005-02-07 19:04:14 -05:00
|
|
|
make the data look the same way everywhere. Due to limitations of the underlying
|
|
|
|
physical storage, it may not implement 100\% of the base class functionality.
|
1999-02-06 08:32:46 -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
|
1998-09-29 20:48:01 -04:00
|
|
|
timestamps is planned) and is identified by the full path to it: something
|
|
|
|
like /MyApp/UserPreferences/Colors/Foreground. The previous elements in the
|
1999-02-06 08:32:46 -05:00
|
|
|
path are the group names, and each name may contain an arbitrary number of entries
|
1998-09-29 20:48:01 -04:00
|
|
|
and subgroups. The path components are {\bf always} separated with a slash,
|
1999-02-06 08:32:46 -05:00
|
|
|
even though some implementations use the backslash internally. Further
|
|
|
|
details (including how to read/write these entries) may be found in
|
|
|
|
the documentation for \helpref{wxConfigBase}{wxconfigbase}.
|
1998-12-28 07:35:49 -05:00
|
|
|
|