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