X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fafb2b05314c0b4166c58a77ca9a4482681718be..31cc5049d386913adeba034e499e3c181ad54a50:/include/wx/confbase.h diff --git a/include/wx/confbase.h b/include/wx/confbase.h index 91871da380..ff50f65f4b 100644 --- a/include/wx/confbase.h +++ b/include/wx/confbase.h @@ -43,8 +43,6 @@ class WXDLLIMPEXP_FWD_BASE wxArrayString; #if wxUSE_CONFIG -#include "wx/string.h" - /// should we use registry instead of configuration files under Windows? // (i.e. whether wxConfigBase::Create() will create a wxFileConfig (if it's // false) or wxRegConfig (if it's true and we're under Win32)) @@ -52,6 +50,15 @@ class WXDLLIMPEXP_FWD_BASE wxArrayString; #define wxUSE_CONFIG_NATIVE 1 #endif +// not all compilers can deal with template Read/Write() methods, define this +// symbol if the template functions are available +#if (!defined(__VISUALC__) || __VISUALC__ > 1200) && \ + !defined( __VMS ) && \ + !(defined(__HP_aCC) && defined(__hppa)) && \ + !defined (__DMC__) + #define wxHAS_CONFIG_TEMPLATE_RW +#endif + // Style flags for constructor style parameter enum { @@ -185,8 +192,7 @@ public: // no default version since it does not make sense for binary data #endif // wxUSE_BASE64 - // Causes ambiguities in VC++ 6 and OpenVMS (at least) -#if ( (!defined(__VISUALC__) || __VISUALC__ > 1200) && !defined( __VMS ) && !defined (__DMC__)) +#ifdef wxHAS_CONFIG_TEMPLATE_RW // read other types, for which wxFromString is defined template bool Read(const wxString& key, T* value) const @@ -209,7 +215,7 @@ public: } return found; } -#endif +#endif // wxHAS_CONFIG_TEMPLATE_RW // convenience functions returning directly the value wxString Read(const wxString& key, @@ -430,7 +436,7 @@ private: m_strOldPath; // saved path bool m_bChanged; // was the path changed? - DECLARE_NO_COPY_CLASS(wxConfigPathChanger) + wxDECLARE_NO_COPY_CLASS(wxConfigPathChanger); };