Create a new wxStringBase class, providing a STL-like API, using

the current wxString implementation.
  Derive wxString from one of wxStringBase, std::string, std::wstring
depending on wxUSE_STL/wxUSE_UNICODE settings. wxString provides
full compatibility with the old wxString in both wxUSE_STL=0 and
wxUSE_STL=1 modes (except for [Un]getWriteBuffer).
  Add some configure checks for std::string features.
  Add tests for STL API in console sample.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2003-07-24 19:44:57 +00:00
parent 7918efb247
commit e87b783352
7 changed files with 1751 additions and 974 deletions

View File

@@ -230,7 +230,7 @@ typedef int wxWindowID;
// check for explicit keyword support
#ifndef HAVE_EXPLICIT
#if defined(__VISUALC__) && (__VISUALC__ >= 1100)
// VC++ 6.0 and 5.0 have explicit (what about the earlier versions?)
// VC++ 6.0 and 5.0 have explicit (what about earlier versions?)
#define HAVE_EXPLICIT
#elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \
&& wxCHECK_GCC_VERSION(2, 95)
@@ -256,7 +256,7 @@ typedef int wxWindowID;
// check for static/const/reinterpret_cast<>()
#ifndef HAVE_STATIC_CAST
#if defined(__VISUALC__) && (__VISUALC__ >= 1100)
// VC++ 6.0 and 5.0 have C++ casts (what about the earlier versions?)
// VC++ 6.0 and 5.0 have C++ casts (what about earlier versions?)
#define HAVE_CXX_CASTS
#elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \
&& wxCHECK_GCC_VERSION(2, 95)
@@ -271,6 +271,30 @@ typedef int wxWindowID;
#endif
#endif // HAVE_CXX_CASTS
#ifndef HAVE_STD_WSTRING
#if defined(__VISUALC__) && (__VISUALC__ >= 1100)
// VC++ 6.0 and 5.0 have std::wstring (what about earlier versions?)
#define HAVE_STD_WSTRING
#elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \
&& wxCHECK_GCC_VERSION(3, 1)
// GCC 3.1 has std::wstring; 3.0 never was in MinGW, 2.95 hasn't it
#define HAVE_STD_WSTRING
#endif
#endif
#ifndef HAVE_STD_STRING_COMPARE
#if defined(__VISUALC__) && (__VISUALC__ >= 1100)
// VC++ 6.0 and 5.0 have std::string::compare
// (what about earlier versions?)
#define HAVE_STD_STRING_COMPARE
#elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \
&& wxCHECK_GCC_VERSION(3, 1)
// GCC 3.1 has std::string::compare;
// 3.0 never was in MinGW, 2.95 hasn't it
#define HAVE_STD_STRING_COMPARE
#endif
#endif
// ----------------------------------------------------------------------------
// portable calling conventions macros
// ----------------------------------------------------------------------------