/src/wxwidgets/include/wx/memconf.h
Line | Count | Source (jump to first uncovered line) |
1 | | /////////////////////////////////////////////////////////////////////////////// |
2 | | // Name: wx/memconf.h |
3 | | // Purpose: wxMemoryConfig class: a wxConfigBase implementation which only |
4 | | // stores the settings in memory (thus they are lost when the |
5 | | // program terminates) |
6 | | // Author: Vadim Zeitlin |
7 | | // Created: 22.01.00 |
8 | | // Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> |
9 | | // Licence: wxWindows licence |
10 | | /////////////////////////////////////////////////////////////////////////////// |
11 | | |
12 | | /* |
13 | | * NB: I don't see how this class may possibly be useful to the application |
14 | | * program (as the settings are lost on program termination), but it is |
15 | | * handy to have it inside wxWidgets. So for now let's say that this class |
16 | | * is private and should only be used by wxWidgets itself - this might |
17 | | * change in the future. |
18 | | */ |
19 | | |
20 | | #ifndef _WX_MEMCONF_H_ |
21 | | #define _WX_MEMCONF_H_ |
22 | | |
23 | | #include "wx/defs.h" |
24 | | |
25 | | #if wxUSE_CONFIG |
26 | | |
27 | | #include "wx/fileconf.h" // the base class |
28 | | |
29 | | // ---------------------------------------------------------------------------- |
30 | | // wxMemoryConfig: a config class which stores settings in non-persistent way |
31 | | // ---------------------------------------------------------------------------- |
32 | | |
33 | | // notice that we inherit from wxFileConfig which already stores its data in |
34 | | // memory and just disable file reading/writing - this is probably not optimal |
35 | | // and might be changed in future as well (this class will always deriev from |
36 | | // wxConfigBase though) |
37 | | class wxMemoryConfig : public wxFileConfig |
38 | | { |
39 | | public: |
40 | | // default (and only) ctor |
41 | 0 | wxMemoryConfig() : wxFileConfig(wxEmptyString, // default app name |
42 | 0 | wxEmptyString, // default vendor name |
43 | 0 | wxEmptyString, // no local config file |
44 | 0 | wxEmptyString, // no system config file |
45 | 0 | 0) // don't use any files |
46 | 0 | { |
47 | 0 | } |
48 | | |
49 | | wxDECLARE_NO_COPY_CLASS(wxMemoryConfig); |
50 | | }; |
51 | | |
52 | | #endif // wxUSE_CONFIG |
53 | | |
54 | | #endif // _WX_MEMCONF_H_ |