ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/callback.h
(Generate patch)

Comparing rxvt-unicode/src/callback.h (file contents):
Revision 1.6 by root, Tue Dec 27 16:41:40 2005 UTC vs.
Revision 1.7 by root, Sat Jan 14 11:21:08 2006 UTC

2// THIS IS A GENERATED FILE: callback.pl is part of the GVPE 2// THIS IS A GENERATED FILE: callback.pl is part of the GVPE
3// THIS IS A GENERATED FILE: distribution. 3// THIS IS A GENERATED FILE: distribution.
4 4
5/* 5/*
6 callback.h -- C++ callback mechanism 6 callback.h -- C++ callback mechanism
7 Copyright (C) 2003-2005 Marc Lehmann <pcg@goof.com> 7 Copyright (C) 2003-2006 Marc Lehmann <pcg@goof.com>
8 8
9 This file is part of GVPE. 9 This file is part of GVPE.
10 10
11 GVPE is free software; you can redistribute it and/or modify 11 GVPE is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by 12 it under the terms of the GNU General Public License as published by
33 void *obj; 33 void *obj;
34 R (object::*meth)(); 34 R (object::*meth)();
35 35
36 /* a proxy is a kind of recipe on how to call a specific class method */ 36 /* a proxy is a kind of recipe on how to call a specific class method */
37 struct proxy_base { 37 struct proxy_base {
38 virtual R call (void *obj, R (object::*meth)()) = 0; 38 virtual R call (void *obj, R (object::*meth)()) const = 0;
39 }; 39 };
40 template<class O1, class O2> 40 template<class O1, class O2>
41 struct proxy : proxy_base { 41 struct proxy : proxy_base {
42 virtual R call (void *obj, R (object::*meth)()) 42 virtual R call (void *obj, R (object::*meth)()) const
43 { 43 {
44 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)()>(meth))) 44 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)()>(meth)))
45 (); 45 ();
46 } 46 }
47 }; 47 };
48 48
49 proxy_base *prxy; 49 proxy_base *prxy;
50 50
51public: 51public:
52 template<class O1, class O2> 52 template<class O1, class O2>
53 callback0 (O1 *object, R (O2::*method)()) 53 explicit callback0 (O1 *object, R (O2::*method)())
54 { 54 {
55 static proxy<O1,O2> p; 55 static proxy<O1,O2> p;
56 obj = reinterpret_cast<void *>(object); 56 obj = reinterpret_cast<void *>(object);
57 meth = reinterpret_cast<R (object::*)()>(method); 57 meth = reinterpret_cast<R (object::*)()>(method);
58 prxy = &p; 58 prxy = &p;
76 void *obj; 76 void *obj;
77 R (object::*meth)(A1); 77 R (object::*meth)(A1);
78 78
79 /* a proxy is a kind of recipe on how to call a specific class method */ 79 /* a proxy is a kind of recipe on how to call a specific class method */
80 struct proxy_base { 80 struct proxy_base {
81 virtual R call (void *obj, R (object::*meth)(A1), A1 a1) = 0; 81 virtual R call (void *obj, R (object::*meth)(A1), A1 a1) const = 0;
82 }; 82 };
83 template<class O1, class O2> 83 template<class O1, class O2>
84 struct proxy : proxy_base { 84 struct proxy : proxy_base {
85 virtual R call (void *obj, R (object::*meth)(A1), A1 a1) 85 virtual R call (void *obj, R (object::*meth)(A1), A1 a1) const
86 { 86 {
87 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1)>(meth))) 87 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1)>(meth)))
88 (a1); 88 (a1);
89 } 89 }
90 }; 90 };
91 91
92 proxy_base *prxy; 92 proxy_base *prxy;
93 93
94public: 94public:
95 template<class O1, class O2> 95 template<class O1, class O2>
96 callback1 (O1 *object, R (O2::*method)(A1)) 96 explicit callback1 (O1 *object, R (O2::*method)(A1))
97 { 97 {
98 static proxy<O1,O2> p; 98 static proxy<O1,O2> p;
99 obj = reinterpret_cast<void *>(object); 99 obj = reinterpret_cast<void *>(object);
100 meth = reinterpret_cast<R (object::*)(A1)>(method); 100 meth = reinterpret_cast<R (object::*)(A1)>(method);
101 prxy = &p; 101 prxy = &p;
119 void *obj; 119 void *obj;
120 R (object::*meth)(A1, A2); 120 R (object::*meth)(A1, A2);
121 121
122 /* a proxy is a kind of recipe on how to call a specific class method */ 122 /* a proxy is a kind of recipe on how to call a specific class method */
123 struct proxy_base { 123 struct proxy_base {
124 virtual R call (void *obj, R (object::*meth)(A1, A2), A1 a1, A2 a2) = 0; 124 virtual R call (void *obj, R (object::*meth)(A1, A2), A1 a1, A2 a2) const = 0;
125 }; 125 };
126 template<class O1, class O2> 126 template<class O1, class O2>
127 struct proxy : proxy_base { 127 struct proxy : proxy_base {
128 virtual R call (void *obj, R (object::*meth)(A1, A2), A1 a1, A2 a2) 128 virtual R call (void *obj, R (object::*meth)(A1, A2), A1 a1, A2 a2) const
129 { 129 {
130 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2)>(meth))) 130 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2)>(meth)))
131 (a1, a2); 131 (a1, a2);
132 } 132 }
133 }; 133 };
134 134
135 proxy_base *prxy; 135 proxy_base *prxy;
136 136
137public: 137public:
138 template<class O1, class O2> 138 template<class O1, class O2>
139 callback2 (O1 *object, R (O2::*method)(A1, A2)) 139 explicit callback2 (O1 *object, R (O2::*method)(A1, A2))
140 { 140 {
141 static proxy<O1,O2> p; 141 static proxy<O1,O2> p;
142 obj = reinterpret_cast<void *>(object); 142 obj = reinterpret_cast<void *>(object);
143 meth = reinterpret_cast<R (object::*)(A1, A2)>(method); 143 meth = reinterpret_cast<R (object::*)(A1, A2)>(method);
144 prxy = &p; 144 prxy = &p;
162 void *obj; 162 void *obj;
163 R (object::*meth)(A1, A2, A3); 163 R (object::*meth)(A1, A2, A3);
164 164
165 /* a proxy is a kind of recipe on how to call a specific class method */ 165 /* a proxy is a kind of recipe on how to call a specific class method */
166 struct proxy_base { 166 struct proxy_base {
167 virtual R call (void *obj, R (object::*meth)(A1, A2, A3), A1 a1, A2 a2, A3 a3) = 0; 167 virtual R call (void *obj, R (object::*meth)(A1, A2, A3), A1 a1, A2 a2, A3 a3) const = 0;
168 }; 168 };
169 template<class O1, class O2> 169 template<class O1, class O2>
170 struct proxy : proxy_base { 170 struct proxy : proxy_base {
171 virtual R call (void *obj, R (object::*meth)(A1, A2, A3), A1 a1, A2 a2, A3 a3) 171 virtual R call (void *obj, R (object::*meth)(A1, A2, A3), A1 a1, A2 a2, A3 a3) const
172 { 172 {
173 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2, A3)>(meth))) 173 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2, A3)>(meth)))
174 (a1, a2, a3); 174 (a1, a2, a3);
175 } 175 }
176 }; 176 };
177 177
178 proxy_base *prxy; 178 proxy_base *prxy;
179 179
180public: 180public:
181 template<class O1, class O2> 181 template<class O1, class O2>
182 callback3 (O1 *object, R (O2::*method)(A1, A2, A3)) 182 explicit callback3 (O1 *object, R (O2::*method)(A1, A2, A3))
183 { 183 {
184 static proxy<O1,O2> p; 184 static proxy<O1,O2> p;
185 obj = reinterpret_cast<void *>(object); 185 obj = reinterpret_cast<void *>(object);
186 meth = reinterpret_cast<R (object::*)(A1, A2, A3)>(method); 186 meth = reinterpret_cast<R (object::*)(A1, A2, A3)>(method);
187 prxy = &p; 187 prxy = &p;
205 void *obj; 205 void *obj;
206 R (object::*meth)(A1, A2, A3, A4); 206 R (object::*meth)(A1, A2, A3, A4);
207 207
208 /* a proxy is a kind of recipe on how to call a specific class method */ 208 /* a proxy is a kind of recipe on how to call a specific class method */
209 struct proxy_base { 209 struct proxy_base {
210 virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4), A1 a1, A2 a2, A3 a3, A4 a4) = 0; 210 virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4), A1 a1, A2 a2, A3 a3, A4 a4) const = 0;
211 }; 211 };
212 template<class O1, class O2> 212 template<class O1, class O2>
213 struct proxy : proxy_base { 213 struct proxy : proxy_base {
214 virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4), A1 a1, A2 a2, A3 a3, A4 a4) 214 virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4), A1 a1, A2 a2, A3 a3, A4 a4) const
215 { 215 {
216 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2, A3, A4)>(meth))) 216 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2, A3, A4)>(meth)))
217 (a1, a2, a3, a4); 217 (a1, a2, a3, a4);
218 } 218 }
219 }; 219 };
220 220
221 proxy_base *prxy; 221 proxy_base *prxy;
222 222
223public: 223public:
224 template<class O1, class O2> 224 template<class O1, class O2>
225 callback4 (O1 *object, R (O2::*method)(A1, A2, A3, A4)) 225 explicit callback4 (O1 *object, R (O2::*method)(A1, A2, A3, A4))
226 { 226 {
227 static proxy<O1,O2> p; 227 static proxy<O1,O2> p;
228 obj = reinterpret_cast<void *>(object); 228 obj = reinterpret_cast<void *>(object);
229 meth = reinterpret_cast<R (object::*)(A1, A2, A3, A4)>(method); 229 meth = reinterpret_cast<R (object::*)(A1, A2, A3, A4)>(method);
230 prxy = &p; 230 prxy = &p;
248 void *obj; 248 void *obj;
249 R (object::*meth)(A1, A2, A3, A4, A5); 249 R (object::*meth)(A1, A2, A3, A4, A5);
250 250
251 /* a proxy is a kind of recipe on how to call a specific class method */ 251 /* a proxy is a kind of recipe on how to call a specific class method */
252 struct proxy_base { 252 struct proxy_base {
253 virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) = 0; 253 virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const = 0;
254 }; 254 };
255 template<class O1, class O2> 255 template<class O1, class O2>
256 struct proxy : proxy_base { 256 struct proxy : proxy_base {
257 virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) 257 virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
258 { 258 {
259 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2, A3, A4, A5)>(meth))) 259 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2, A3, A4, A5)>(meth)))
260 (a1, a2, a3, a4, a5); 260 (a1, a2, a3, a4, a5);
261 } 261 }
262 }; 262 };
263 263
264 proxy_base *prxy; 264 proxy_base *prxy;
265 265
266public: 266public:
267 template<class O1, class O2> 267 template<class O1, class O2>
268 callback5 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5)) 268 explicit callback5 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5))
269 { 269 {
270 static proxy<O1,O2> p; 270 static proxy<O1,O2> p;
271 obj = reinterpret_cast<void *>(object); 271 obj = reinterpret_cast<void *>(object);
272 meth = reinterpret_cast<R (object::*)(A1, A2, A3, A4, A5)>(method); 272 meth = reinterpret_cast<R (object::*)(A1, A2, A3, A4, A5)>(method);
273 prxy = &p; 273 prxy = &p;
291 void *obj; 291 void *obj;
292 R (object::*meth)(A1, A2, A3, A4, A5, A6); 292 R (object::*meth)(A1, A2, A3, A4, A5, A6);
293 293
294 /* a proxy is a kind of recipe on how to call a specific class method */ 294 /* a proxy is a kind of recipe on how to call a specific class method */
295 struct proxy_base { 295 struct proxy_base {
296 virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) = 0; 296 virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const = 0;
297 }; 297 };
298 template<class O1, class O2> 298 template<class O1, class O2>
299 struct proxy : proxy_base { 299 struct proxy : proxy_base {
300 virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) 300 virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
301 { 301 {
302 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2, A3, A4, A5, A6)>(meth))) 302 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2, A3, A4, A5, A6)>(meth)))
303 (a1, a2, a3, a4, a5, a6); 303 (a1, a2, a3, a4, a5, a6);
304 } 304 }
305 }; 305 };
306 306
307 proxy_base *prxy; 307 proxy_base *prxy;
308 308
309public: 309public:
310 template<class O1, class O2> 310 template<class O1, class O2>
311 callback6 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6)) 311 explicit callback6 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6))
312 { 312 {
313 static proxy<O1,O2> p; 313 static proxy<O1,O2> p;
314 obj = reinterpret_cast<void *>(object); 314 obj = reinterpret_cast<void *>(object);
315 meth = reinterpret_cast<R (object::*)(A1, A2, A3, A4, A5, A6)>(method); 315 meth = reinterpret_cast<R (object::*)(A1, A2, A3, A4, A5, A6)>(method);
316 prxy = &p; 316 prxy = &p;
334 void *obj; 334 void *obj;
335 R (object::*meth)(A1, A2, A3, A4, A5, A6, A7); 335 R (object::*meth)(A1, A2, A3, A4, A5, A6, A7);
336 336
337 /* a proxy is a kind of recipe on how to call a specific class method */ 337 /* a proxy is a kind of recipe on how to call a specific class method */
338 struct proxy_base { 338 struct proxy_base {
339 virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6, A7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) = 0; 339 virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6, A7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const = 0;
340 }; 340 };
341 template<class O1, class O2> 341 template<class O1, class O2>
342 struct proxy : proxy_base { 342 struct proxy : proxy_base {
343 virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6, A7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) 343 virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6, A7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
344 { 344 {
345 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2, A3, A4, A5, A6, A7)>(meth))) 345 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1, A2, A3, A4, A5, A6, A7)>(meth)))
346 (a1, a2, a3, a4, a5, a6, a7); 346 (a1, a2, a3, a4, a5, a6, a7);
347 } 347 }
348 }; 348 };
349 349
350 proxy_base *prxy; 350 proxy_base *prxy;
351 351
352public: 352public:
353 template<class O1, class O2> 353 template<class O1, class O2>
354 callback7 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6, A7)) 354 explicit callback7 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6, A7))
355 { 355 {
356 static proxy<O1,O2> p; 356 static proxy<O1,O2> p;
357 obj = reinterpret_cast<void *>(object); 357 obj = reinterpret_cast<void *>(object);
358 meth = reinterpret_cast<R (object::*)(A1, A2, A3, A4, A5, A6, A7)>(method); 358 meth = reinterpret_cast<R (object::*)(A1, A2, A3, A4, A5, A6, A7)>(method);
359 prxy = &p; 359 prxy = &p;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines