memconf.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. // Modified by:
  8. // Created: 22.01.00
  9. // Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
  10. // Licence: wxWindows licence
  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. #ifndef _WX_MEMCONF_H_
  20. #define _WX_MEMCONF_H_
  21. #if wxUSE_CONFIG
  22. #include "wx/fileconf.h" // the base class
  23. // ----------------------------------------------------------------------------
  24. // wxMemoryConfig: a config class which stores settings in non-persistent way
  25. // ----------------------------------------------------------------------------
  26. // notice that we inherit from wxFileConfig which already stores its data in
  27. // memory and just disable file reading/writing - this is probably not optimal
  28. // and might be changed in future as well (this class will always deriev from
  29. // wxConfigBase though)
  30. class wxMemoryConfig : public wxFileConfig
  31. {
  32. public:
  33. // default (and only) ctor
  34. wxMemoryConfig() : wxFileConfig(wxEmptyString, // default app name
  35. wxEmptyString, // default vendor name
  36. wxEmptyString, // no local config file
  37. wxEmptyString, // no system config file
  38. 0) // don't use any files
  39. {
  40. }
  41. wxDECLARE_NO_COPY_CLASS(wxMemoryConfig);
  42. };
  43. #endif // wxUSE_CONFIG
  44. #endif // _WX_MEMCONF_H_