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

Comparing gvpe/src/callback.h (file contents):
Revision 1.2 by pcg, Wed Apr 2 05:14:59 2003 UTC vs.
Revision 1.8 by pcg, Tue Dec 27 16:36:16 2005 UTC

1// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it 1// THIS IS A GENERATED FILE: RUN callback.pl to regenerate it
2// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it 2// THIS IS A GENERATED FILE: callback.pl is part of the GVPE
3// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it 3// THIS IS A GENERATED FILE: distribution.
4// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it
5// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it
6// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it
7 4
8/* 5/*
9 callback.h -- C++ callback mechanism 6 callback.h -- C++ callback mechanism
7 Copyright (C) 2003-2005 Marc Lehmann <pcg@goof.com>
10 8
9 This file is part of GVPE.
10
11 This program 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
13 the Free Software Foundation; either version 2 of the License, or 13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version. 14 (at your option) any later version.
15 15
16 This program is distributed in the hope that it will be useful, 16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details. 19 GNU General Public License for more details.
20 20
21 You should have received a copy of the GNU General Public License 21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software 22 along with gvpe; if not, write to the Free Software
23 Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24*/ 24*/
25 25
26#ifndef VPE_CALLBACK_H__ 26#ifndef CALLBACK_H__
27#define VPE_CALLBACK_H__ 27#define CALLBACK_H__
28 28
29template<class R> 29template<class R>
30class callback0 { 30class callback0 {
31 struct object { }; 31 struct object { };
32 32
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)())
43 { 43 {
44 ((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;
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)
86 { 86 {
87 ((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;
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)
129 { 129 {
130 ((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;
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)
172 { 172 {
173 ((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;
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)
215 { 215 {
216 ((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;
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)
258 { 258 {
259 ((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;
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)
301 { 301 {
302 ((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;
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)
344 { 344 {
345 ((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;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines