Mercurial > projects > qtd
comparison cpp/qt_core/QString_shell.cpp @ 357:9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Q_CLASSINFO implementation
Now Qtd can be built on Windows
author | Max Samukha <maxter@spambox.com> |
---|---|
date | Wed, 02 Jun 2010 19:38:05 +0300 |
parents | 55ee4603365d |
children | d2f48c4cb3e3 |
comparison
equal
deleted
inserted
replaced
356:12cec2d14e1c | 357:9784459f0750 |
---|---|
1 #include <QString> | 1 #include <QString> |
2 #include "qtd_core.h" | 2 #include "qtd_core.h" |
3 | 3 |
4 extern "C" DLL_PUBLIC const ushort* qtd_QString_utf16 | 4 QTD_EXTERN QTD_DLL_PUBLIC const ushort* qtd_QString_utf16 |
5 (void* __this_nativeId) | 5 (void* __this_nativeId) |
6 { | 6 { |
7 QString *__qt_this = (QString *) __this_nativeId; | 7 QString *__qt_this = (QString *) __this_nativeId; |
8 return __qt_this->utf16(); | 8 return __qt_this->utf16(); |
9 } | 9 } |
10 | 10 |
11 extern "C" DLL_PUBLIC int qtd_QString_size | 11 QTD_EXTERN QTD_DLL_PUBLIC int qtd_QString_size |
12 (void* __this_nativeId) | 12 (void* __this_nativeId) |
13 { | 13 { |
14 QString *__qt_this = (QString *) __this_nativeId; | 14 QString *__qt_this = (QString *) __this_nativeId; |
15 return __qt_this->size(); | 15 return __qt_this->size(); |
16 } | 16 } |
17 | 17 |
18 extern "C" DLL_PUBLIC void qtd_QString_operatorAssign | 18 QTD_EXTERN QTD_DLL_PUBLIC void qtd_QString_operatorAssign |
19 (void* __this_nativeId, | 19 (void* __this_nativeId, |
20 DArray text) | 20 DArray text) |
21 { | 21 { |
22 QString *__qt_this = (QString *) __this_nativeId; | 22 QString *__qt_this = (QString *) __this_nativeId; |
23 *__qt_this = QString::fromUtf8((const char *)text.ptr, text.length); | 23 *__qt_this = QString::fromUtf8((const char *)text.ptr, text.length); |
24 } | 24 } |
25 | 25 |
26 extern "C" DLL_PUBLIC void qtd_QString_destructor(void *ptr) | 26 QTD_EXTERN QTD_DLL_PUBLIC void qtd_QString_destructor(void *ptr) |
27 { | 27 { |
28 delete (QString *)ptr; | 28 delete (QString *)ptr; |
29 } | 29 } |
30 | 30 |
31 extern "C" DLL_PUBLIC void qtd_QString_call_destructor(QString *ptr) | 31 QTD_EXTERN QTD_DLL_PUBLIC void qtd_QString_call_destructor(QString *ptr) |
32 { | 32 { |
33 ptr->~QString(); | 33 ptr->~QString(); |
34 } | 34 } |
35 | 35 |
36 | 36 |
37 extern "C" DLL_PUBLIC void* qtd_QString_QString_QString | 37 QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QString_QString_QString |
38 (void* string0) | 38 (void* string0) |
39 { | 39 { |
40 const QString& __qt_string0 = (const QString& ) *(QString *)string0; | 40 const QString& __qt_string0 = (const QString& ) *(QString *)string0; |
41 QString *__qt_this = new QString((const QString& )__qt_string0); | 41 QString *__qt_this = new QString((const QString& )__qt_string0); |
42 return (void *) __qt_this; | 42 return (void *) __qt_this; |
43 } | 43 } |
44 | 44 |
45 extern "C" DLL_PUBLIC void* qtd_QString_new_fromUtf8_at | 45 QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QString_new_fromUtf8_at |
46 (void* place, DArray text) | 46 (void* place, DArray text) |
47 { | 47 { |
48 QString *__qt_this = new(place) QString; | 48 QString *__qt_this = new(place) QString; |
49 *__qt_this = QString::fromUtf8((const char *)text.ptr, text.length); | 49 *__qt_this = QString::fromUtf8((const char *)text.ptr, text.length); |
50 return __qt_this; | 50 return __qt_this; |
51 } | 51 } |
52 | 52 |
53 extern "C" DLL_PUBLIC void* qtd_QString_placed_copy(void* string0, void* place) { | 53 QTD_EXTERN QTD_DLL_PUBLIC void* qtd_QString_placed_copy(void* string0, void* place) { |
54 const QString& __qt_string0 = (const QString& ) *(QString *)string0; | 54 const QString& __qt_string0 = (const QString& ) *(QString *)string0; |
55 QString *result = new (place)QString((const QString& )__qt_string0); | 55 QString *result = new (place)QString((const QString& )__qt_string0); |
56 return (void *) result; | 56 return (void *) result; |
57 } | 57 } |
58 | 58 |
59 extern "C" DLL_PUBLIC void qtd_QString_placed_ctor(void* place) { | 59 QTD_EXTERN QTD_DLL_PUBLIC void qtd_QString_placed_ctor(void* place) { |
60 new (place) QString(); | 60 new (place) QString(); |
61 } | 61 } |
62 | 62 |
63 extern "C" DLL_PUBLIC void qtd_QString_assign_fromUtf8 | 63 QTD_EXTERN QTD_DLL_PUBLIC void qtd_QString_assign_fromUtf8 |
64 (QString *__qt_this, DArray text) | 64 (QString *__qt_this, DArray text) |
65 { | 65 { |
66 *__qt_this = QString::fromUtf8((const char *)text.ptr, text.length); | 66 *__qt_this = QString::fromUtf8((const char *)text.ptr, text.length); |
67 } | 67 } |