repos
/
qt.core
/ annotate_shade
summary
|
shortlog
|
log
|
tree
|
commit
|
commitdiff
|
headdiff
|
annotate
|
filehistory
normal
|
plain
|
shade
|
zebra
initial import
Annotate for file src/lib/lisp-object.h
2009-04-05 tobias
1
#ifndef LISP_OBJECT_H
17:56:16 '
2
#define LISP_OBJECT_H
'
3
'
4
#include <QMetaType>
'
5
#include <QSharedData>
'
6
#include <QExplicitlySharedDataPointer>
'
7
#include <smoke.h>
'
8
'
9
'
10
extern "C"
'
11
{
'
12
int
'
13
qt_smoke_setup_lisp_object(void* destruct);
'
14
'
15
int
'
16
qt_smoke_lisp_object_id(const void* object);
'
17
'
18
int
'
19
qt_smoke_lisp_object_set(const void* object);
'
20
'
21
void*
'
22
qt_smoke_make_lisp_object(int id);
'
23
'
24
void*
'
25
qt_smoke_free_lisp_object(void* object);
'
26
'
27
void*
'
28
qt_smoke_lisp_object_value(const void* variant);
'
29
}
'
30
'
31
namespace cl_smoke {
'
32
namespace qt {
'
33
'
34
class lisp_object
'
35
{
'
36
public:
'
37
typedef void (*destructor)(int id);
'
38
'
39
lisp_object();
'
40
'
41
lisp_object(int id);
'
42
'
43
lisp_object(const lisp_object& other);
'
44
'
45
inline int
'
46
id() const
'
47
{ Q_ASSERT(this->set()); return d->id; }
'
48
'
49
void
'
50
set_id(int id);
'
51
'
52
inline bool
'
53
set() const
'
54
{ return d->is_set; }
'
55
'
56
friend int
'
57
::qt_smoke_setup_lisp_object(void* destruct);
'
58
'
59
private:
'
60
struct data : public QSharedData
'
61
{
'
62
data();
'
63
data(int id);
'
64
~data();
'
65
int id;
'
66
bool is_set;
'
67
'
68
private:
'
69
Q_DISABLE_COPY(data)
'
70
};
'
71
'
72
QExplicitlySharedDataPointer<data> d;
'
73
'
74
static destructor destruct;
'
75
};
'
76
'
77
} // namespace qt
'
78
} // namespace cl_smoke
'
79
'
80
Q_DECLARE_METATYPE(cl_smoke::qt::lisp_object);
'
81
'
82
#endif // LISP_OBJECT_H