/home/ntakagi/work/STLport-5.1.5/src/string.cpp

Go to the documentation of this file.
00001 #include "stlport_prefix.h"
00002 
00003 #include <string>
00004 
00005 _STLP_BEGIN_NAMESPACE
00006 
00007 #if defined(_STLP_USE_WIDE_INTERFACE)
00008 _STLP_MOVE_TO_PRIV_NAMESPACE
00009 
00010 wstring __ASCIIToWide(const char *ascii) {
00011     size_t size = strlen(ascii);
00012     wchar_t* buff = new wchar_t[size+1];
00013     mbstowcs(buff, ascii, size);
00014     buff[size] = 0x00;
00015     wstring ret(buff);
00016     delete[] buff;
00017     return ret;
00018 }
00019 string __WideToASCII(const wchar_t *wide) {
00020     size_t size = wcslen(wide);
00021     char* buff = new char[size+1];
00022     wcstombs(buff, wide, size);
00023     buff[size] = 0;
00024     string ret(buff);
00025     delete[] buff;
00026     return ret;
00027 }
00028 _STLP_MOVE_TO_STD_NAMESPACE
00029 #endif
00030 
00031 #if !defined (_STLP_NO_FORCE_INSTANTIATE)
00032 
00033 template class _STLP_CLASS_DECLSPEC allocator<char>;
00034 
00035 _STLP_MOVE_TO_PRIV_NAMESPACE
00036 
00037 template class _STLP_CLASS_DECLSPEC _STLP_alloc_proxy<char*, char, allocator<char> >;
00038 template class _STLP_CLASS_DECLSPEC _String_base<char, allocator<char> >;
00039 
00040 #  if defined (_STLP_DEBUG) && !defined (__SUNPRO_CC)
00041 
00042 #    if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
00043 #      define basic_string _STLP_NON_DBG_NO_MEM_T_NAME(str)
00044 #    else
00045 #      define basic_string _STLP_NON_DBG_NAME(str)
00046 #    endif
00047 
00048 template class _STLP_CLASS_DECLSPEC basic_string<char, char_traits<char>, allocator<char> >;
00049 template class _STLP_CLASS_DECLSPEC __construct_checker<basic_string<char, char_traits<char>, allocator<char> > >;
00050 
00051 #    undef basic_string
00052 #  endif
00053 
00054 #  if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
00055 #    define basic_string _STLP_NO_MEM_T_NAME(str)
00056 #  else
00057 _STLP_MOVE_TO_STD_NAMESPACE
00058 #  endif
00059 
00060 template class _STLP_CLASS_DECLSPEC basic_string<char, char_traits<char>, allocator<char> >;
00061 
00062 #  if defined (basic_string)
00063 _STLP_MOVE_TO_STD_NAMESPACE
00064 #    undef basic_string
00065 #  endif
00066 
00067 #  if !defined (_STLP_NO_WCHAR_T)
00068 template class _STLP_CLASS_DECLSPEC allocator<wchar_t>;
00069 
00070 _STLP_MOVE_TO_PRIV_NAMESPACE
00071 
00072 template class _STLP_CLASS_DECLSPEC _String_base<wchar_t, allocator<wchar_t> >;
00073 
00074 #    if defined (_STLP_DEBUG) && !defined (__SUNPRO_CC)
00075 #      if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
00076 #        define basic_string _STLP_NON_DBG_NO_MEM_T_NAME(str)
00077 #      else
00078 #        define basic_string _STLP_NON_DBG_NAME(str)
00079 #      endif
00080 
00081 template class _STLP_CLASS_DECLSPEC basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >;
00082 template class _STLP_CLASS_DECLSPEC __construct_checker<basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > >;
00083 
00084 #      undef basic_string
00085 #    endif
00086 
00087 #    if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
00088 #      define basic_string _STLP_NO_MEM_T_NAME(str)
00089 #    else
00090 _STLP_MOVE_TO_STD_NAMESPACE
00091 #    endif
00092 
00093 template class _STLP_CLASS_DECLSPEC basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >;
00094 
00095 #    if defined (basic_string)
00096 _STLP_MOVE_TO_STD_NAMESPACE
00097 #      undef basic_string
00098 #    endif
00099 #  endif
00100 #endif
00101 
00102 _STLP_END_NAMESPACE



Generated on Mon Mar 10 15:32:17 2008 by  doxygen 1.5.1