msvcp90: Added ctype_base class implementation.

oldstable
Piotr Caban 2011-12-16 11:31:45 +01:00 committed by Alexandre Julliard
parent 19fe3f0c77
commit 3cc08032fc
2 changed files with 109 additions and 8 deletions

View File

@ -86,6 +86,10 @@ typedef struct {
_Collvec coll;
} collate;
typedef struct {
locale_facet facet;
} ctype_base;
/* ?_Id_cnt@id@locale@std@@0HA */
int locale_id__Id_cnt = 0;
@ -628,6 +632,65 @@ basic_string_wchar __thiscall collate_wchar_transform(const collate *this,
return ret;
}
/* ??_7ctype_base@std@@6B@ */
extern const vtable_ptr MSVCP_ctype_base_vtable;
/* ??0ctype_base@std@@QAE@I@Z */
/* ??0ctype_base@std@@QEAA@_K@Z */
DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs, 8)
ctype_base* __thiscall ctype_base_ctor_refs(ctype_base *this, MSVCP_size_t refs)
{
TRACE("(%p %lu)\n", this, refs);
locale_facet_ctor_refs(&this->facet, refs);
this->facet.vtable = &MSVCP_ctype_base_vtable;
return this;
}
/* ??_Fctype_base@std@@QAEXXZ */
/* ??_Fctype_base@std@@QEAAXXZ */
DEFINE_THISCALL_WRAPPER(ctype_base_ctor, 4)
ctype_base* __thiscall ctype_base_ctor(ctype_base *this)
{
TRACE("(%p)\n", this);
locale_facet_ctor_refs(&this->facet, 0);
this->facet.vtable = &MSVCP_ctype_base_vtable;
return this;
}
/* ??1ctype_base@std@@UAE@XZ */
/* ??1ctype_base@std@@UEAA@XZ */
DEFINE_THISCALL_WRAPPER(ctype_base_dtor, 4)
void __thiscall ctype_base_dtor(ctype_base *this)
{
TRACE("(%p)\n", this);
}
DEFINE_THISCALL_WRAPPER(MSVCP_ctype_base_vector_dtor, 8)
ctype_base* __thiscall MSVCP_ctype_base_vector_dtor(ctype_base *this, unsigned int flags)
{
TRACE("(%p %x)\n", this, flags);
if(flags & 2) {
/* we have an array, with the number of elements stored before the first object */
int i, *ptr = (int *)this-1;
for(i=*ptr-1; i>=0; i--)
ctype_base_dtor(this+i);
MSVCRT_operator_delete(ptr);
} else {
ctype_base_dtor(this);
if(flags & 1)
MSVCRT_operator_delete(this);
}
return this;
}
/* ?_Xran@ctype_base@std@@KAXXZ */
void __cdecl ctype_base__Xran(void)
{
throw_exception(EXCEPTION_OUT_OF_RANGE, "out of range in ctype<T>");
}
/* ??0_Locimp@locale@std@@AAE@_N@Z */
/* ??0_Locimp@locale@std@@AEAA@_N@Z */
DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent, 8)
@ -1525,6 +1588,43 @@ const rtti_object_locator collate_short_rtti = {
&collate_short_hierarchy
};
static const type_info ctype_base_type_info = {
&MSVCP_ctype_base_vtable,
NULL,
".?AUctype_base@std@@"
};
static const rtti_base_descriptor ctype_base_rtti_base_descriptor = {
&ctype_base_type_info,
1,
{ 0, -1, 0},
64
};
static const rtti_base_array ctype_base_rtti_base_array = {
{
&ctype_base_rtti_base_descriptor,
&locale_facet_rtti_base_descriptor,
NULL,
NULL
}
};
static const rtti_object_hierarchy ctype_base_hierarchy = {
0,
0,
2,
&ctype_base_rtti_base_array
};
const rtti_object_locator ctype_base_rtti = {
0,
0,
0,
&ctype_base_type_info,
&ctype_base_hierarchy
};
#ifndef __GNUC__
void __asm_dummy_vtables(void) {
#endif
@ -1540,6 +1640,7 @@ void __asm_dummy_vtables(void) {
VTABLE_ADD_FUNC(collate_wchar_do_compare)
VTABLE_ADD_FUNC(collate_wchar_do_transform)
VTABLE_ADD_FUNC(collate_wchar_do_hash));
__ASM_VTABLE(ctype_base, "");
#ifndef __GNUC__
}
#endif

View File

@ -1094,8 +1094,8 @@
@ stub -arch=win64 ??0_Winit@std@@QEAA@XZ
@ stub -arch=win32 ??0codecvt_base@std@@QAE@I@Z
@ stub -arch=win64 ??0codecvt_base@std@@QEAA@_K@Z
@ stub -arch=win32 ??0ctype_base@std@@QAE@I@Z
@ stub -arch=win64 ??0ctype_base@std@@QEAA@_K@Z
@ thiscall -arch=win32 ??0ctype_base@std@@QAE@I@Z(ptr long) ctype_base_ctor_refs
@ cdecl -arch=win64 ??0ctype_base@std@@QEAA@_K@Z(ptr long) ctype_base_ctor_refs
@ thiscall -arch=win32 ??0facet@locale@std@@IAE@I@Z(ptr long) locale_facet_ctor_refs
@ cdecl -arch=win64 ??0facet@locale@std@@IEAA@_K@Z(ptr long) locale_facet_ctor_refs
@ thiscall -arch=win32 ??0id@locale@std@@QAE@I@Z(ptr long) locale_id_ctor_id
@ -1328,8 +1328,8 @@
@ stub -arch=win64 ??1_Winit@std@@QEAA@XZ
@ stub -arch=win32 ??1codecvt_base@std@@UAE@XZ
@ stub -arch=win64 ??1codecvt_base@std@@UEAA@XZ
@ stub -arch=win32 ??1ctype_base@std@@UAE@XZ
@ stub -arch=win64 ??1ctype_base@std@@UEAA@XZ
@ thiscall -arch=win32 ??1ctype_base@std@@UAE@XZ(ptr) ctype_base_dtor
@ cdecl -arch=win64 ??1ctype_base@std@@UEAA@XZ(ptr) ctype_base_dtor
@ thiscall -arch=win32 ??1facet@locale@std@@UAE@XZ(ptr) locale_facet_dtor
@ cdecl -arch=win64 ??1facet@locale@std@@UEAA@XZ(ptr) locale_facet_dtor
@ thiscall -arch=win32 ??1ios_base@std@@UAE@XZ(ptr) ios_base_dtor
@ -1859,7 +1859,7 @@
# extern ??_7?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@
@ extern ??_7_Locimp@locale@std@@6B@ MSVCP_locale__Locimp_vtable
# extern ??_7codecvt_base@std@@6B@
# extern ??_7ctype_base@std@@6B@
@ extern ??_7ctype_base@std@@6B@ MSVCP_ctype_base_vtable
@ extern ??_7ios_base@std@@6B@ MSVCP_ios_base_vtable
# extern ??_7messages_base@std@@6B@
# extern ??_7money_base@std@@6B@
@ -2083,8 +2083,8 @@
@ cdecl -arch=win64 ??_F_Timevec@std@@QEAAXXZ(ptr) _Timevec_ctor
@ stub -arch=win32 ??_Fcodecvt_base@std@@QAEXXZ
@ stub -arch=win64 ??_Fcodecvt_base@std@@QEAAXXZ
@ stub -arch=win32 ??_Fctype_base@std@@QAEXXZ
@ stub -arch=win64 ??_Fctype_base@std@@QEAAXXZ
@ thiscall -arch=win32 ??_Fctype_base@std@@QAEXXZ(ptr) ctype_base_ctor
@ cdecl -arch=win64 ??_Fctype_base@std@@QEAAXXZ(ptr) ctype_base_ctor
@ thiscall -arch=win32 ??_Ffacet@locale@std@@QAEXXZ(ptr) locale_facet_ctor
@ cdecl -arch=win64 ??_Ffacet@locale@std@@QEAAXXZ(ptr) locale_facet_ctor
@ thiscall -arch=win32 ??_Fid@locale@std@@QAEXXZ(ptr) locale_id_ctor
@ -2882,7 +2882,7 @@
@ stub ?_Xmem@tr1@std@@YAXXZ
@ stub ?_Xoutrange@tr1@std@@YAXXZ
@ cdecl ?_Xran@_String_base@std@@SAXXZ() MSVCP__String_base_Xran
@ stub ?_Xran@ctype_base@std@@KAXXZ
@ cdecl ?_Xran@ctype_base@std@@KAXXZ() ctype_base__Xran
@ thiscall -arch=win32 ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z(ptr ptr long long) basic_streambuf_char__Xsgetn_s
@ cdecl -arch=win64 ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z(ptr ptr long long) basic_streambuf_char__Xsgetn_s
@ stub -arch=win32 ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z