Sometimes it's useful to have some code used only if wxConfig is defined as wxRegConfig or only if it is defined as wxFileConfig and testing for these symbols is more clear than testing for the platform (and more correct, considering that setting wxUSE_CONFIG_NATIVE to 0 may result in wxFileConfig being used even under Windows).
35 lines
1.1 KiB
C
35 lines
1.1 KiB
C
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/config.h
|
|
// Purpose: wxConfig base header
|
|
// Author: Julian Smart
|
|
// Created:
|
|
// Copyright: (c) Julian Smart
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_CONFIG_H_BASE_
|
|
#define _WX_CONFIG_H_BASE_
|
|
|
|
#include "wx/confbase.h"
|
|
|
|
#if wxUSE_CONFIG
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// define the native wxConfigBase implementation
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// under Windows we prefer to use the native implementation but can be forced
|
|
// to use the file-based one
|
|
#if defined(__WINDOWS__) && wxUSE_CONFIG_NATIVE
|
|
#include "wx/msw/regconf.h"
|
|
#define wxConfig wxRegConfig
|
|
#define wxHAS_CONFIG_AS_REGCONFIG
|
|
#else // either we're under Unix or wish to always use config files
|
|
#include "wx/fileconf.h"
|
|
#define wxConfig wxFileConfig
|
|
#define wxHAS_CONFIG_AS_FILECONFIG
|
|
#endif
|
|
|
|
#endif // wxUSE_CONFIG
|
|
|
|
#endif // _WX_CONFIG_H_BASE_
|