File: qmetaobject_c.cpp

package info (click to toggle)
libqtpas 2.6%2B2.0.8%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,860 kB
  • sloc: cpp: 56,595; pascal: 13,727; sh: 44; makefile: 18
file content (343 lines) | stat: -rw-r--r-- 8,484 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
//******************************************************************************
//  Copyright (c) 2005-2013 by Jan Van hijfte
//
//  See the included file COPYING.TXT for details about the copyright.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//******************************************************************************


#include "qmetaobject_c.h"

QMetaMethodH QMetaMethod_Create()
{
	return (QMetaMethodH) new QMetaMethod();
}

void QMetaMethod_Destroy(QMetaMethodH handle)
{
	delete (QMetaMethod *)handle;
}

void QMetaMethod_methodSignature(QMetaMethodH handle, QByteArrayH retval)
{
	*(QByteArray *)retval = ((QMetaMethod *)handle)->methodSignature();
}

void QMetaMethod_name(QMetaMethodH handle, QByteArrayH retval)
{
	*(QByteArray *)retval = ((QMetaMethod *)handle)->name();
}

const char* QMetaMethod_typeName(QMetaMethodH handle)
{
	return (const char*) ((QMetaMethod *)handle)->typeName();
}

int QMetaMethod_returnType(QMetaMethodH handle)
{
	return (int) ((QMetaMethod *)handle)->returnType();
}

int QMetaMethod_parameterCount(QMetaMethodH handle)
{
	return (int) ((QMetaMethod *)handle)->parameterCount();
}

int QMetaMethod_parameterType(QMetaMethodH handle, int index)
{
	return (int) ((QMetaMethod *)handle)->parameterType(index);
}

void QMetaMethod_getParameterTypes(QMetaMethodH handle, int* types)
{
	((QMetaMethod *)handle)->getParameterTypes(types);
}

const char* QMetaMethod_tag(QMetaMethodH handle)
{
	return (const char*) ((QMetaMethod *)handle)->tag();
}

QMetaMethod::Access QMetaMethod_access(QMetaMethodH handle)
{
	return (QMetaMethod::Access) ((QMetaMethod *)handle)->access();
}

QMetaMethod::MethodType QMetaMethod_methodType(QMetaMethodH handle)
{
	return (QMetaMethod::MethodType) ((QMetaMethod *)handle)->methodType();
}

int QMetaMethod_attributes(QMetaMethodH handle)
{
	return (int) ((QMetaMethod *)handle)->attributes();
}

int QMetaMethod_methodIndex(QMetaMethodH handle)
{
	return (int) ((QMetaMethod *)handle)->methodIndex();
}

int QMetaMethod_revision(QMetaMethodH handle)
{
	return (int) ((QMetaMethod *)handle)->revision();
}

const QMetaObjectH QMetaMethod_enclosingMetaObject(QMetaMethodH handle)
{
	return (const QMetaObjectH) ((QMetaMethod *)handle)->enclosingMetaObject();
}

bool QMetaMethod_isValid(QMetaMethodH handle)
{
	return (bool) ((QMetaMethod *)handle)->isValid();
}

QMetaEnumH QMetaEnum_Create()
{
	return (QMetaEnumH) new QMetaEnum();
}

void QMetaEnum_Destroy(QMetaEnumH handle)
{
	delete (QMetaEnum *)handle;
}

const char* QMetaEnum_name(QMetaEnumH handle)
{
	return (const char*) ((QMetaEnum *)handle)->name();
}

bool QMetaEnum_isFlag(QMetaEnumH handle)
{
	return (bool) ((QMetaEnum *)handle)->isFlag();
}

int QMetaEnum_keyCount(QMetaEnumH handle)
{
	return (int) ((QMetaEnum *)handle)->keyCount();
}

const char* QMetaEnum_key(QMetaEnumH handle, int index)
{
	return (const char*) ((QMetaEnum *)handle)->key(index);
}

int QMetaEnum_value(QMetaEnumH handle, int index)
{
	return (int) ((QMetaEnum *)handle)->value(index);
}

const char* QMetaEnum_scope(QMetaEnumH handle)
{
	return (const char*) ((QMetaEnum *)handle)->scope();
}

int QMetaEnum_keyToValue(QMetaEnumH handle, const char* key, bool* ok)
{
	return (int) ((QMetaEnum *)handle)->keyToValue(key, ok);
}

const char* QMetaEnum_valueToKey(QMetaEnumH handle, int value)
{
	return (const char*) ((QMetaEnum *)handle)->valueToKey(value);
}

int QMetaEnum_keysToValue(QMetaEnumH handle, const char* keys, bool* ok)
{
	return (int) ((QMetaEnum *)handle)->keysToValue(keys, ok);
}

void QMetaEnum_valueToKeys(QMetaEnumH handle, QByteArrayH retval, int value)
{
	*(QByteArray *)retval = ((QMetaEnum *)handle)->valueToKeys(value);
}

const QMetaObjectH QMetaEnum_enclosingMetaObject(QMetaEnumH handle)
{
	return (const QMetaObjectH) ((QMetaEnum *)handle)->enclosingMetaObject();
}

bool QMetaEnum_isValid(QMetaEnumH handle)
{
	return (bool) ((QMetaEnum *)handle)->isValid();
}

QMetaPropertyH QMetaProperty_Create()
{
	return (QMetaPropertyH) new QMetaProperty();
}

void QMetaProperty_Destroy(QMetaPropertyH handle)
{
	delete (QMetaProperty *)handle;
}

const char* QMetaProperty_name(QMetaPropertyH handle)
{
	return (const char*) ((QMetaProperty *)handle)->name();
}

const char* QMetaProperty_typeName(QMetaPropertyH handle)
{
	return (const char*) ((QMetaProperty *)handle)->typeName();
}

QVariant::Type QMetaProperty_type(QMetaPropertyH handle)
{
	return (QVariant::Type) ((QMetaProperty *)handle)->type();
}

int QMetaProperty_userType(QMetaPropertyH handle)
{
	return (int) ((QMetaProperty *)handle)->userType();
}

int QMetaProperty_propertyIndex(QMetaPropertyH handle)
{
	return (int) ((QMetaProperty *)handle)->propertyIndex();
}

bool QMetaProperty_isReadable(QMetaPropertyH handle)
{
	return (bool) ((QMetaProperty *)handle)->isReadable();
}

bool QMetaProperty_isWritable(QMetaPropertyH handle)
{
	return (bool) ((QMetaProperty *)handle)->isWritable();
}

bool QMetaProperty_isResettable(QMetaPropertyH handle)
{
	return (bool) ((QMetaProperty *)handle)->isResettable();
}

bool QMetaProperty_isDesignable(QMetaPropertyH handle, const QObjectH obj)
{
	return (bool) ((QMetaProperty *)handle)->isDesignable((const QObject*)obj);
}

bool QMetaProperty_isScriptable(QMetaPropertyH handle, const QObjectH obj)
{
	return (bool) ((QMetaProperty *)handle)->isScriptable((const QObject*)obj);
}

bool QMetaProperty_isStored(QMetaPropertyH handle, const QObjectH obj)
{
	return (bool) ((QMetaProperty *)handle)->isStored((const QObject*)obj);
}

bool QMetaProperty_isEditable(QMetaPropertyH handle, const QObjectH obj)
{
	return (bool) ((QMetaProperty *)handle)->isEditable((const QObject*)obj);
}

bool QMetaProperty_isUser(QMetaPropertyH handle, const QObjectH obj)
{
	return (bool) ((QMetaProperty *)handle)->isUser((const QObject*)obj);
}

bool QMetaProperty_isConstant(QMetaPropertyH handle)
{
	return (bool) ((QMetaProperty *)handle)->isConstant();
}

bool QMetaProperty_isFinal(QMetaPropertyH handle)
{
	return (bool) ((QMetaProperty *)handle)->isFinal();
}

bool QMetaProperty_isFlagType(QMetaPropertyH handle)
{
	return (bool) ((QMetaProperty *)handle)->isFlagType();
}

bool QMetaProperty_isEnumType(QMetaPropertyH handle)
{
	return (bool) ((QMetaProperty *)handle)->isEnumType();
}

void QMetaProperty_enumerator(QMetaPropertyH handle, QMetaEnumH retval)
{
	*(QMetaEnum *)retval = ((QMetaProperty *)handle)->enumerator();
}

bool QMetaProperty_hasNotifySignal(QMetaPropertyH handle)
{
	return (bool) ((QMetaProperty *)handle)->hasNotifySignal();
}

void QMetaProperty_notifySignal(QMetaPropertyH handle, QMetaMethodH retval)
{
	*(QMetaMethod *)retval = ((QMetaProperty *)handle)->notifySignal();
}

int QMetaProperty_notifySignalIndex(QMetaPropertyH handle)
{
	return (int) ((QMetaProperty *)handle)->notifySignalIndex();
}

int QMetaProperty_revision(QMetaPropertyH handle)
{
	return (int) ((QMetaProperty *)handle)->revision();
}

void QMetaProperty_read(QMetaPropertyH handle, QVariantH retval, const QObjectH obj)
{
	*(QVariant *)retval = ((QMetaProperty *)handle)->read((const QObject*)obj);
}

bool QMetaProperty_write(QMetaPropertyH handle, QObjectH obj, const QVariantH value)
{
	return (bool) ((QMetaProperty *)handle)->write((QObject*)obj, *(const QVariant*)value);
}

bool QMetaProperty_reset(QMetaPropertyH handle, QObjectH obj)
{
	return (bool) ((QMetaProperty *)handle)->reset((QObject*)obj);
}

bool QMetaProperty_hasStdCppSet(QMetaPropertyH handle)
{
	return (bool) ((QMetaProperty *)handle)->hasStdCppSet();
}

bool QMetaProperty_isValid(QMetaPropertyH handle)
{
	return (bool) ((QMetaProperty *)handle)->isValid();
}

const QMetaObjectH QMetaProperty_enclosingMetaObject(QMetaPropertyH handle)
{
	return (const QMetaObjectH) ((QMetaProperty *)handle)->enclosingMetaObject();
}

QMetaClassInfoH QMetaClassInfo_Create()
{
	return (QMetaClassInfoH) new QMetaClassInfo();
}

void QMetaClassInfo_Destroy(QMetaClassInfoH handle)
{
	delete (QMetaClassInfo *)handle;
}

const char* QMetaClassInfo_name(QMetaClassInfoH handle)
{
	return (const char*) ((QMetaClassInfo *)handle)->name();
}

const char* QMetaClassInfo_value(QMetaClassInfoH handle)
{
	return (const char*) ((QMetaClassInfo *)handle)->value();
}

const QMetaObjectH QMetaClassInfo_enclosingMetaObject(QMetaClassInfoH handle)
{
	return (const QMetaObjectH) ((QMetaClassInfo *)handle)->enclosingMetaObject();
}