Split up in qt.gui & cleanup name prefix.
src/lib/qlist.h
Sun Jan 10 09:52:49 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Split up in qt.gui & cleanup name prefix.
--- old-qt.gui/src/lib/qlist.h 2014-10-30 07:41:58.000000000 +0100
+++ new-qt.gui/src/lib/qlist.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,89 +0,0 @@
-#ifndef CL_SMOKE_QT_QLIST_H
-#define CL_SMOKE_QT_QLIST_H
-
-#include <QList>
-#include "cl_smoke_qt.h"
-
-/** @file
- */
-
-/** Defines a C wrapper for the QList<@a TYPE>.
- * @param TYPE the type of the elements of the QList
- */
-#define DEFINE_QLIST_WRAPPER(TYPE) \
- DEFINE_QLIST_WRAPPER_3(TYPE, TYPE, VALUE)
-
-/** Defines a C wrapper for the QList<@a TYPE*>,
- * where @a TYPE is the of the pointer.
- *
- * @param NAME the name used for the wrapper functions.
- * @param TYPE the type of the elements
- */
-#define DEFINE_QLIST_WRAPPER_PTR(TYPE) \
- DEFINE_QLIST_WRAPPER_3(TYPE, TYPE*, PTR)
-
-/** @internal */
-#define DEFINE_QLIST_WRAPPER_3(NAME, TYPE, PTR_VALUE) \
- DEFINE_QLIST_WRAPPER_ALL_PART(NAME, TYPE) \
- DEFINE_QLIST_WRAPPER_ ## PTR_VALUE ## _PART(NAME, TYPE) \
-
-
-/** @internal
- * size, free and make_list. */
-#define DEFINE_QLIST_WRAPPER_ALL_PART(NAME, TYPE) \
-CL_SMOKE_QT_EXPORT int \
-qt_smoke_list_ ## NAME ## _size(const void* list) \
-{ \
- return static_cast<const QList< TYPE >*>(list)->size(); \
-} \
-\
-CL_SMOKE_QT_EXPORT void \
-qt_smoke_free_list_ ## NAME (void* list) \
-{ \
- delete static_cast<QList< TYPE >*>(list); \
-} \
- \
-CL_SMOKE_QT_EXPORT void* \
-qt_smoke_make_list_ ## NAME () \
-{ \
- return new QList< TYPE >(); \
-} \
- \
-
-/** @internal
- * At and append for pointer types
- */
-#define DEFINE_QLIST_WRAPPER_PTR_PART(NAME, TYPE) \
-CL_SMOKE_QT_EXPORT const void* \
-qt_smoke_list_ ## NAME ## _at(const void* list, int index) \
-{ \
- const QList< TYPE >* qlist = static_cast<const QList< TYPE > *>(list); \
- return qlist->at(index); \
-} \
-\
-CL_SMOKE_QT_EXPORT void \
-qt_smoke_list_ ## NAME ## _append(void* list, void* data) \
-{ \
- static_cast<QList< TYPE >*>(list) \
- ->append(static_cast<TYPE>(data)); \
-} \
-
-/** @internal
- * At and append for value types.
- */
-#define DEFINE_QLIST_WRAPPER_VALUE_PART(NAME, TYPE) \
-CL_SMOKE_QT_EXPORT const void* \
-qt_smoke_list_ ## NAME ## _at(const void* list, int index) \
-{ \
- const QList< TYPE >* qlist = static_cast<const QList< TYPE > *>(list); \
- return new TYPE(qlist->at(index)); \
-} \
-\
-CL_SMOKE_QT_EXPORT void \
-qt_smoke_list_ ## NAME ## _append(void* list, void* data) \
-{ \
- static_cast<QList< TYPE >*>(list) \
- ->append(*static_cast<TYPE*>(data)); \
-} \
-
-#endif // CL_SMOKE_QT_QLIST_H