|
1 #include "stlport_prefix.h" |
|
2 |
|
3 #include <string> |
|
4 |
|
5 _STLP_BEGIN_NAMESPACE |
|
6 |
|
7 #if defined(_STLP_USE_WIDE_INTERFACE) |
|
8 _STLP_MOVE_TO_PRIV_NAMESPACE |
|
9 |
|
10 wstring __ASCIIToWide(const char *ascii) { |
|
11 size_t size = strlen(ascii); |
|
12 wchar_t* buff = new wchar_t[size+1]; |
|
13 mbstowcs(buff, ascii, size); |
|
14 buff[size] = 0x00; |
|
15 wstring ret(buff); |
|
16 delete[] buff; |
|
17 return ret; |
|
18 } |
|
19 string __WideToASCII(const wchar_t *wide) { |
|
20 size_t size = wcslen(wide); |
|
21 char* buff = new char[size+1]; |
|
22 wcstombs(buff, wide, size); |
|
23 buff[size] = 0; |
|
24 string ret(buff); |
|
25 delete[] buff; |
|
26 return ret; |
|
27 } |
|
28 _STLP_MOVE_TO_STD_NAMESPACE |
|
29 #endif |
|
30 |
|
31 #if !defined (_STLP_NO_FORCE_INSTANTIATE) |
|
32 |
|
33 template class _STLP_CLASS_DECLSPEC allocator<char>; |
|
34 |
|
35 _STLP_MOVE_TO_PRIV_NAMESPACE |
|
36 |
|
37 template class _STLP_CLASS_DECLSPEC _STLP_alloc_proxy<char*, char, allocator<char> >; |
|
38 template class _STLP_CLASS_DECLSPEC _String_base<char, allocator<char> >; |
|
39 |
|
40 # if defined (_STLP_DEBUG) && !defined (__SUNPRO_CC) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) |
|
41 # define basic_string _STLP_NON_DBG_NAME(str) |
|
42 |
|
43 template class _STLP_CLASS_DECLSPEC basic_string<char, char_traits<char>, allocator<char> >; |
|
44 template class _STLP_CLASS_DECLSPEC __construct_checker<basic_string<char, char_traits<char>, allocator<char> > >; |
|
45 |
|
46 # undef basic_string |
|
47 # endif |
|
48 |
|
49 # if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) |
|
50 # define basic_string _STLP_NO_MEM_T_NAME(str) |
|
51 # else |
|
52 _STLP_MOVE_TO_STD_NAMESPACE |
|
53 # endif |
|
54 |
|
55 template class _STLP_CLASS_DECLSPEC basic_string<char, char_traits<char>, allocator<char> >; |
|
56 |
|
57 # if defined (basic_string) |
|
58 _STLP_MOVE_TO_STD_NAMESPACE |
|
59 # undef basic_string |
|
60 # endif |
|
61 |
|
62 # if !defined (_STLP_NO_WCHAR_T) |
|
63 template class _STLP_CLASS_DECLSPEC allocator<wchar_t>; |
|
64 |
|
65 _STLP_MOVE_TO_PRIV_NAMESPACE |
|
66 |
|
67 template class _STLP_CLASS_DECLSPEC _String_base<wchar_t, allocator<wchar_t> >; |
|
68 |
|
69 # if defined (_STLP_DEBUG) && !defined (__SUNPRO_CC) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) |
|
70 # define basic_string _STLP_NON_DBG_NAME(str) |
|
71 |
|
72 template class _STLP_CLASS_DECLSPEC basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >; |
|
73 template class _STLP_CLASS_DECLSPEC __construct_checker<basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > >; |
|
74 |
|
75 # undef basic_string |
|
76 # endif |
|
77 |
|
78 # if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) |
|
79 # define basic_string _STLP_NO_MEM_T_NAME(str) |
|
80 # else |
|
81 _STLP_MOVE_TO_STD_NAMESPACE |
|
82 # endif |
|
83 |
|
84 template class _STLP_CLASS_DECLSPEC basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >; |
|
85 |
|
86 # if defined (basic_string) |
|
87 _STLP_MOVE_TO_STD_NAMESPACE |
|
88 # undef basic_string |
|
89 # endif |
|
90 # endif |
|
91 #endif |
|
92 |
|
93 _STLP_END_NAMESPACE |