|
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) |
|
41 |
|
42 # if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) |
|
43 # define basic_string _STLP_NON_DBG_NO_MEM_T_NAME(str) |
|
44 # else |
|
45 # define basic_string _STLP_NON_DBG_NAME(str) |
|
46 # endif |
|
47 |
|
48 template class _STLP_CLASS_DECLSPEC basic_string<char, char_traits<char>, allocator<char> >; |
|
49 template class _STLP_CLASS_DECLSPEC __construct_checker<basic_string<char, char_traits<char>, allocator<char> > >; |
|
50 |
|
51 # undef basic_string |
|
52 # endif |
|
53 |
|
54 # if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) |
|
55 # define basic_string _STLP_NO_MEM_T_NAME(str) |
|
56 # else |
|
57 _STLP_MOVE_TO_STD_NAMESPACE |
|
58 # endif |
|
59 |
|
60 template class _STLP_CLASS_DECLSPEC basic_string<char, char_traits<char>, allocator<char> >; |
|
61 |
|
62 # if defined (basic_string) |
|
63 _STLP_MOVE_TO_STD_NAMESPACE |
|
64 # undef basic_string |
|
65 # endif |
|
66 |
|
67 # if !defined (_STLP_NO_WCHAR_T) |
|
68 template class _STLP_CLASS_DECLSPEC allocator<wchar_t>; |
|
69 |
|
70 _STLP_MOVE_TO_PRIV_NAMESPACE |
|
71 |
|
72 template class _STLP_CLASS_DECLSPEC _String_base<wchar_t, allocator<wchar_t> >; |
|
73 |
|
74 # if defined (_STLP_DEBUG) && !defined (__SUNPRO_CC) |
|
75 # if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) |
|
76 # define basic_string _STLP_NON_DBG_NO_MEM_T_NAME(str) |
|
77 # else |
|
78 # define basic_string _STLP_NON_DBG_NAME(str) |
|
79 # endif |
|
80 |
|
81 template class _STLP_CLASS_DECLSPEC basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >; |
|
82 template class _STLP_CLASS_DECLSPEC __construct_checker<basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > >; |
|
83 |
|
84 # undef basic_string |
|
85 # endif |
|
86 |
|
87 # if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) |
|
88 # define basic_string _STLP_NO_MEM_T_NAME(str) |
|
89 # else |
|
90 _STLP_MOVE_TO_STD_NAMESPACE |
|
91 # endif |
|
92 |
|
93 template class _STLP_CLASS_DECLSPEC basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >; |
|
94 |
|
95 # if defined (basic_string) |
|
96 _STLP_MOVE_TO_STD_NAMESPACE |
|
97 # undef basic_string |
|
98 # endif |
|
99 # endif |
|
100 #endif |
|
101 |
|
102 _STLP_END_NAMESPACE |