00001 #ifndef STRING_CONVERSION_GROUP
00002 #define STRING_CONVERSION_GROUP
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include <basis/convert_utf.h>
00019 #include <basis/istring.h>
00020 #include <basis/portable.h>
00021
00022 #ifdef __WIN32__
00023 #ifndef _MANAGED
00024 #ifndef __MINGW32__
00025 #include <comdef.h>
00026 #endif
00027 #endif
00028 #endif
00029
00030
00031 class _bstr_t;
00032
00034
00035 namespace string_convert
00036 {
00037
00038 #ifdef _AFXDLL
00040 inline istring to_istring(const CString &original)
00041 { return istring(from_unicode_temp(original)); }
00042
00044 inline CString to_CString(const istring &original)
00045 { return CString(to_unicode_temp(original)); }
00046 #endif
00047
00048 #ifdef WIN32
00049 #ifndef _MANAGED
00050 #ifndef __MINGW32__
00052 inline istring to_istring(const _bstr_t &original) {
00053 return istring(istring::UNTERMINATED, (const char *)original,
00054 original.length());
00055 }
00056
00058 inline _bstr_t to_bstr_t(const istring &original)
00059 { return _bstr_t(original.s()); }
00060 #endif
00061 #endif
00062 #endif
00063
00064
00065
00066 }
00067
00068 #endif
00069