interface_2class_8h.tex
7.14 KB
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
\hypertarget{interface_2class_8h}{
\section{include/interface/class.h File Reference}
\label{interface_2class_8h}\index{include/interface/class.h@{include/interface/class.h}}
}
{\ttfamily \#include $<$stdarg.h$>$}\par
{\ttfamily \#include \char`\"{}class.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}interface.h\char`\"{}}\par
Include dependency graph for class.h:
This graph shows which files directly or indirectly include this file:
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item
struct \hyperlink{structi__Class}{i\_\-Class}
\end{DoxyCompactItemize}
\subsection*{Defines}
\begin{DoxyCompactItemize}
\item
\#define \hyperlink{interface_2class_8h_a323cb9a9088662b03bc37a47403e4212}{new}(\hyperlink{structclass}{class},...)~classNew(\_\-\#\#\hyperlink{structclass}{class}, \#\#\_\-\_\-VA\_\-ARGS\_\-\_\-)
\item
\#define \hyperlink{interface_2class_8h_adb9a02719a59dd833c56e1a33ded59db}{delete}(object)~classDelete((void $\ast$$\ast$)(object))
\item
\#define \hyperlink{interface_2class_8h_a864061d3c9c7f123efb63649bb0fade7}{clone}(object)~classClone((void $\ast$)(object))
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item
typedef void($\ast$ \hyperlink{interface_2class_8h_a207fe2c25aae0b91e9df60b0ece4217e}{fptr\_\-ctor} )(void $\ast$, va\_\-list $\ast$)
\item
typedef void($\ast$ \hyperlink{interface_2class_8h_a59366634eecbace7ae9c8c5e65199c91}{fptr\_\-dtor} )(void $\ast$)
\item
typedef void($\ast$ \hyperlink{interface_2class_8h_a6d852b3640eeb6ef8a3d776b87736392}{fptr\_\-clone} )(void $\ast$, void $\ast$const)
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item
void $\ast$ \hyperlink{interface_2class_8h_adebe9bba79f753f5c44409a2ff664299}{classNew} (\hyperlink{structclass}{class\_\-ptr},...)
\item
void \hyperlink{interface_2class_8h_ac064b1caf75bc6c8b1a4371748d55878}{classDelete} (void $\ast$$\ast$)
\item
void $\ast$ \hyperlink{interface_2class_8h_a51116659174ec46c5a04721d31631053}{classClone} (void $\ast$)
\end{DoxyCompactItemize}
\subsection{Define Documentation}
\hypertarget{interface_2class_8h_a864061d3c9c7f123efb63649bb0fade7}{
\index{interface/class.h@{interface/class.h}!clone@{clone}}
\index{clone@{clone}!interface/class.h@{interface/class.h}}
\subsubsection[{clone}]{\setlength{\rightskip}{0pt plus 5cm}\#define clone(
\begin{DoxyParamCaption}
\item[{}]{object}
\end{DoxyParamCaption}
)~classClone((void $\ast$)(object))}}
\label{interface_2class_8h_a864061d3c9c7f123efb63649bb0fade7}
Definition at line 28 of file class.h.
\hypertarget{interface_2class_8h_adb9a02719a59dd833c56e1a33ded59db}{
\index{interface/class.h@{interface/class.h}!delete@{delete}}
\index{delete@{delete}!interface/class.h@{interface/class.h}}
\subsubsection[{delete}]{\setlength{\rightskip}{0pt plus 5cm}\#define delete(
\begin{DoxyParamCaption}
\item[{}]{object}
\end{DoxyParamCaption}
)~classDelete((void $\ast$$\ast$)(object))}}
\label{interface_2class_8h_adb9a02719a59dd833c56e1a33ded59db}
Definition at line 27 of file class.h.
\hypertarget{interface_2class_8h_a323cb9a9088662b03bc37a47403e4212}{
\index{interface/class.h@{interface/class.h}!new@{new}}
\index{new@{new}!interface/class.h@{interface/class.h}}
\subsubsection[{new}]{\setlength{\rightskip}{0pt plus 5cm}\#define new(
\begin{DoxyParamCaption}
\item[{}]{{\bf class}, }
\item[{}]{...}
\end{DoxyParamCaption}
)~classNew(\_\-\#\#{\bf class}, \#\#\_\-\_\-VA\_\-ARGS\_\-\_\-)}}
\label{interface_2class_8h_a323cb9a9088662b03bc37a47403e4212}
Definition at line 26 of file class.h.
\subsection{Typedef Documentation}
\hypertarget{interface_2class_8h_a6d852b3640eeb6ef8a3d776b87736392}{
\index{interface/class.h@{interface/class.h}!fptr\_\-clone@{fptr\_\-clone}}
\index{fptr\_\-clone@{fptr\_\-clone}!interface/class.h@{interface/class.h}}
\subsubsection[{fptr\_\-clone}]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$ {\bf fptr\_\-clone})(void $\ast$, void $\ast$const)}}
\label{interface_2class_8h_a6d852b3640eeb6ef8a3d776b87736392}
Definition at line 11 of file class.h.
\hypertarget{interface_2class_8h_a207fe2c25aae0b91e9df60b0ece4217e}{
\index{interface/class.h@{interface/class.h}!fptr\_\-ctor@{fptr\_\-ctor}}
\index{fptr\_\-ctor@{fptr\_\-ctor}!interface/class.h@{interface/class.h}}
\subsubsection[{fptr\_\-ctor}]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$ {\bf fptr\_\-ctor})(void $\ast$, va\_\-list $\ast$)}}
\label{interface_2class_8h_a207fe2c25aae0b91e9df60b0ece4217e}
Definition at line 9 of file class.h.
\hypertarget{interface_2class_8h_a59366634eecbace7ae9c8c5e65199c91}{
\index{interface/class.h@{interface/class.h}!fptr\_\-dtor@{fptr\_\-dtor}}
\index{fptr\_\-dtor@{fptr\_\-dtor}!interface/class.h@{interface/class.h}}
\subsubsection[{fptr\_\-dtor}]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$ {\bf fptr\_\-dtor})(void $\ast$)}}
\label{interface_2class_8h_a59366634eecbace7ae9c8c5e65199c91}
Definition at line 10 of file class.h.
\subsection{Function Documentation}
\hypertarget{interface_2class_8h_a51116659174ec46c5a04721d31631053}{
\index{interface/class.h@{interface/class.h}!classClone@{classClone}}
\index{classClone@{classClone}!interface/class.h@{interface/class.h}}
\subsubsection[{classClone}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ classClone (
\begin{DoxyParamCaption}
\item[{void $\ast$}]{}
\end{DoxyParamCaption}
)}}
\label{interface_2class_8h_a51116659174ec46c5a04721d31631053}
Definition at line 42 of file class.c.
\begin{DoxyCode}
{
class_ptr class = class_getClass(_object);
void * object = calloc(1, class->object_size + sizeof(void*));
* (class_ptr *)object = class;
object += sizeof(void*);
#undef clone
CALL(object, Class, clone, _object);
return object;
}
\end{DoxyCode}
Here is the call graph for this function:
\hypertarget{interface_2class_8h_ac064b1caf75bc6c8b1a4371748d55878}{
\index{interface/class.h@{interface/class.h}!classDelete@{classDelete}}
\index{classDelete@{classDelete}!interface/class.h@{interface/class.h}}
\subsubsection[{classDelete}]{\setlength{\rightskip}{0pt plus 5cm}void classDelete (
\begin{DoxyParamCaption}
\item[{void $\ast$$\ast$}]{}
\end{DoxyParamCaption}
)}}
\label{interface_2class_8h_ac064b1caf75bc6c8b1a4371748d55878}
Definition at line 33 of file class.c.
\begin{DoxyCode}
{
CALL(*object, Class, dtor);
free(*object - sizeof(void*));
*object = NULL;
}
\end{DoxyCode}
\hypertarget{interface_2class_8h_adebe9bba79f753f5c44409a2ff664299}{
\index{interface/class.h@{interface/class.h}!classNew@{classNew}}
\index{classNew@{classNew}!interface/class.h@{interface/class.h}}
\subsubsection[{classNew}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ classNew (
\begin{DoxyParamCaption}
\item[{{\bf class\_\-ptr}}]{, }
\item[{}]{...}
\end{DoxyParamCaption}
)}}
\label{interface_2class_8h_adebe9bba79f753f5c44409a2ff664299}
Definition at line 15 of file class.c.
\begin{DoxyCode}
{
void * object = calloc(1, class->object_size + sizeof(void*));
va_list params;
if (class->init) class->init();
* (class_ptr *)object = class;
object += sizeof(void*);
va_start(params, class);
CALL(object, Class, ctor, ¶ms);
va_end(params);
return object;
}
\end{DoxyCode}