From 6371c7e8e7c2106ebfef03ec2830d2638d25e8fa Mon Sep 17 00:00:00 2001 From: Jonathan Campbell Date: Wed, 20 Mar 2019 13:06:23 -0700 Subject: [PATCH] comments --- experiments/iconv/iconvpp.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/experiments/iconv/iconvpp.hpp b/experiments/iconv/iconvpp.hpp index 58367268b..da257d713 100644 --- a/experiments/iconv/iconvpp.hpp +++ b/experiments/iconv/iconvpp.hpp @@ -39,6 +39,7 @@ # define ENABLE_ICONV_WIN32 1 #endif +/* common code to any templated version of _IconvBase */ class _Iconv_CommonBase { public: static const char *errstring(int x); @@ -64,6 +65,7 @@ protected: template class _Iconv; +/* base _Iconv implementation, common to all implementations */ template class _IconvBase : public _Iconv_CommonBase { public: /* NTS: The C++ standard defines std::string as std::basic_string. @@ -215,6 +217,7 @@ protected: #if defined(ENABLE_ICONV) # include +/* _Iconv implementation of _IconvBase using GNU libiconv or GLIBC iconv, for Linux and Mac OS X systems */ template class _Iconv : public _IconvBase { protected: using pclass = _IconvBase; @@ -316,7 +319,7 @@ protected: * * Linux and other OSes however define wchar_t as a 32-bit integer, but do not use wchar_t APIs, and often * instead use UTF-8 for unicode, so the wchar_t versions will not see much use there. */ -typedef _Iconv Iconv; +typedef _Iconv Iconv; typedef _Iconv IconvToW; typedef _Iconv IconvFromW; @@ -328,6 +331,8 @@ typedef _Iconv IconvFromW; /* Alternative implementation (char to WCHAR, or WCHAR to char only) using Microsoft Win32 APIs instead of libiconv. * For use with embedded or low memory Windows installations or environments where the added load of libiconv would * be undesirable. */ + +/* _IconvWin32 implementation of _IconvBase using Microsoft Win32 code page and WCHAR support functions for Windows 2000/XP/Vista/7/8/10/etc */ template class _IconvWin32 : public _IconvBase { protected: using pclass = _IconvBase;