Mercurial > projects > qtd
annotate include/qtd_core.h @ 393:1049b01aebd2
Fixed generator segfaults on OS X 10.6.
Regarding the change to dgenerator.cpp, I am not actually sure if 0 is the correct value to pass, but it seems to work and the code which had been there before was just plain incorrect ? it read past the list boundaries.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sat, 28 Aug 2010 02:55:55 +0200 |
parents | d2f48c4cb3e3 |
children |
rev | line source |
---|---|
1 | 1 /** |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
2 Copyright: Copyright QtD Team, 2008-2010 |
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
3 License: Boost License 1.0 |
355
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
4 */ |
1 | 5 |
6 #ifndef QTD_CORE_H | |
7 #define QTD_CORE_H | |
8 | |
9 #include <QAbstractItemModel> | |
10 | |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
11 #define QTD_EXTERN extern "C" |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
12 |
366
da4235301224
Fixed VoidFunc. Updated to dmd.2.047.
Max Samukha <maxter@spambox.com>
parents:
361
diff
changeset
|
13 QTD_EXTERN typedef void (*VoidFunc)(); |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
14 |
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
15 #ifdef WIN32 |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
16 #define QTD_EXPORT __declspec(dllexport) |
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
17 #define QTD_IMPORT __declspec(dllimport) |
1 | 18 #else |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
19 #define QTD_EXPORT |
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
20 #define QTD_IMPORT |
1 | 21 #endif |
22 | |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
23 #ifdef CPP_SHARED |
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
24 #define QTD_FUNC_DECL(MODULE, TYPE, NAME, ARGS) \ |
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
25 QTD_EXTERN typedef TYPE (*qtd_##NAME##_t)ARGS; \ |
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
26 QTD_EXTERN { extern QTD_##MODULE##_PUBLIC qtd_##NAME##_t qtd_##NAME; } |
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
27 #define QTD_FUNC(MODULE, NAME) \ |
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
28 QTD_EXTERN { QTD_##MODULE##_PUBLIC qtd_##NAME##_t qtd_##NAME; } \ |
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
29 QTD_EXTERN QTD_EXPORT void qtd_set_##NAME(VoidFunc func) { qtd_##NAME = (qtd_##NAME##_t)func; } |
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
30 #else |
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
31 #define QTD_FUNC_DECL(MODULE, TYPE, NAME, ARGS) \ |
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
32 QTD_EXTERN TYPE qtd_##NAME ARGS; |
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
33 #define QTD_FUNC(MODULE, NAME) |
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
34 #endif |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
35 |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
36 //TODO: these should be moved to module-specific includes |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
37 #ifdef QTD_CORE |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
38 #define QTD_CORE_PUBLIC QTD_EXPORT |
1 | 39 #else |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
40 #define QTD_CORE_PUBLIC QTD_IMPORT |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
41 #endif |
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
42 |
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
43 #ifdef QTD_GUI |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
44 #define QTD_GUI_PUBLIC QTD_EXPORT |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
45 #else |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
46 #define QTD_GUI_PUBLIC QTD_IMPORT |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
47 #endif |
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
48 |
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
49 #ifdef QTD_OPENGL |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
50 #define QTD_OPENGL_PUBLIC QTD_EXPORT |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
51 #else |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
52 #define QTD_OPENGL_PUBLIC QTD_IMPORT |
1 | 53 #endif |
54 | |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
55 #ifdef QTD_NETWORK |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
56 #define QTD_NETWORK_PUBLIC QTD_EXPORT |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
57 #else |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
58 #define QTD_NETWORK_PUBLIC QTD_IMPORT |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
59 #endif |
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
60 |
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
61 #ifdef QTD_SVG |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
62 #define QTD_SVG_PUBLIC QTD_EXPORT |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
63 #else |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
64 #define QTD_SVG_PUBLIC QTD_IMPORT |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
65 #endif |
355
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
66 |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
67 #ifdef QTD_XML |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
68 #define QTD_XML_PUBLIC QTD_EXPORT |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
69 #else |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
70 #define QTD_XML_PUBLIC QTD_IMPORT |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
71 #endif |
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
72 |
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
73 #ifdef QTD_WEBKIT |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
74 #define QTD_WEBKIT_PUBLIC QTD_EXPORT |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
75 #else |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
76 #define QTD_WEBKIT_PUBLIC QTD_IMPORT |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
77 #endif |
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
78 |
378 | 79 #ifdef QTD_QWT |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
80 #define QTD_QWT_PUBLIC QTD_EXPORT |
378 | 81 #else |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
82 #define QTD_QWT_PUBLIC QTD_IMPORT |
378 | 83 #endif |
84 | |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
85 //TODO: ditch |
1 | 86 struct QModelIndexAccessor { |
87 int row; | |
88 int col; | |
89 void *ptr; | |
90 QAbstractItemModel *model; | |
91 }; | |
92 | |
93 struct DArray { | |
94 size_t length; | |
95 void* ptr; | |
96 }; | |
97 | |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
98 class QTD_CORE_PUBLIC QtdObjectLink |
254 | 99 { |
100 public: | |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
101 void* dId; |
355
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
102 |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
103 QtdObjectLink(void* id) : dId(id) {} |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
104 |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
105 template<typename T> |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
106 static QtdObjectLink* getLink(const T* object) |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
107 { |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
108 return dynamic_cast<QtdObjectLink*>((T*)object); |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
109 } |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
110 |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
111 template<typename T> |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
112 static void* getDId(const T* object) |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
113 { |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
114 QtdObjectLink *link = getLink((T*)object); |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
115 return link ? link->dId : NULL; |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
116 } |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
117 }; |
254 | 118 |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
119 class QTD_CORE_PUBLIC QObjectLink : public QtdObjectLink, public QObjectUserData |
355
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
120 { |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
121 public: |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
122 enum Flags |
254 | 123 { |
355
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
124 None, |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
125 CreatedByD = 0x1 |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
126 }; |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
127 |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
128 Flags flags; |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
129 static uint userDataId; |
355
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
130 |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
131 QObjectLink(QObject* qObject, void* dId); |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
132 bool createdByD(); |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
133 virtual ~QObjectLink(); |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
134 void destroyLink(QObject* qObject = NULL); |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
135 static QObjectLink* getLink(const QObject* qObject); |
08c1ca7975ab
obviated redundant virtual dispatch callbacks
Max Samukha <maxter@spambox.com>
parents:
354
diff
changeset
|
136 static void* getDId(const QObject* qObject); |
254 | 137 }; |
105
3aa118a9ae71
each QObject now has associated child QObject for handling signals. fixes #15
eldar
parents:
35
diff
changeset
|
138 |
33
cf8a415f3f32
gui package is fully wrapped now. lots of fixes in the generator
eldar
parents:
1
diff
changeset
|
139 #define Array DArray |
cf8a415f3f32
gui package is fully wrapped now. lots of fixes in the generator
eldar
parents:
1
diff
changeset
|
140 |
384
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
141 QTD_FUNC_DECL(CORE, void, toUtf8, (const unsigned short* arr, uint size, void* str)) |
d2f48c4cb3e3
Same behavior of shared libs on linux and windows. Minor build script fixes.
Max Samukha <maxter@spambox.com>
parents:
378
diff
changeset
|
142 QTD_FUNC_DECL(CORE, void, QtdObject_delete, (void* dId)) |
1 | 143 |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
144 QTD_EXTERN QModelIndex qtd_to_QModelIndex(QModelIndexAccessor mia); |
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
145 QTD_EXTERN QModelIndexAccessor qtd_from_QModelIndex(const QModelIndex &index); |
1 | 146 |
357
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
147 QTD_EXTERN typedef void (*EmitCallback)(void*, void**); |
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
148 QTD_EXTERN typedef int (*QtMetacallCallback)(void *d_entity, QMetaObject::Call _c, int _id, void **_a); |
9784459f0750
An attempt (failed due to optlink) to improve locality of declarations exported from QtD executables
Max Samukha <maxter@spambox.com>
parents:
355
diff
changeset
|
149 QTD_EXTERN typedef const QMetaObject* (*MetaObjectCallback)(void *d_entity); |
301 | 150 |
298
adae77fdc1ea
Native QList implementation is now used throughout QtD
eldar
parents:
254
diff
changeset
|
151 template <class T> |
adae77fdc1ea
Native QList implementation is now used throughout QtD
eldar
parents:
254
diff
changeset
|
152 void call_destructor(T *a) |
adae77fdc1ea
Native QList implementation is now used throughout QtD
eldar
parents:
254
diff
changeset
|
153 { |
adae77fdc1ea
Native QList implementation is now used throughout QtD
eldar
parents:
254
diff
changeset
|
154 a->~T(); |
adae77fdc1ea
Native QList implementation is now used throughout QtD
eldar
parents:
254
diff
changeset
|
155 } |
354
18bd68f586c6
removed superfluous destructors
Max Samukha <maxter@spambox.com>
parents:
303
diff
changeset
|
156 |
1 | 157 #endif // QTD_CORE_H |