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.3 by pcg, Thu Oct 16 02:41:21 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
10 Copyright (C) 2003 Marc Lehmann <pcg@goof.com> 7 Copyright (C) 2003-2005 Marc Lehmann <pcg@goof.com>
11 8
9 This file is part of GVPE.
10
12 This program is free software; you can redistribute it and/or modify 11 GVPE is free software; you can redistribute it and/or modify
13 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
14 the Free Software Foundation; either version 2 of the License, or 13 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version. 14 (at your option) any later version.
16 15
17 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,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details. 19 GNU General Public License for more details.
21 20
22 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
23 along with this program; if not, write to the Free Software 22 along with gvpe; if not, write to the Free Software
24 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
25*/ 24*/
26 25
27#ifndef VPE_CALLBACK_H__ 26#ifndef CALLBACK_H__
28#define VPE_CALLBACK_H__ 27#define CALLBACK_H__
29 28
30template<class R> 29template<class R>
31class callback0 { 30class callback0 {
32 struct object { }; 31 struct object { };
33 32
40 }; 39 };
41 template<class O1, class O2> 40 template<class O1, class O2>
42 struct proxy : proxy_base { 41 struct proxy : proxy_base {
43 virtual R call (void *obj, R (object::*meth)()) 42 virtual R call (void *obj, R (object::*meth)())
44 { 43 {
45 ((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)()>(meth))) 44 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)()>(meth)))
46 (); 45 ();
47 } 46 }
48 }; 47 };
49 48
50 proxy_base *prxy; 49 proxy_base *prxy;
83 }; 82 };
84 template<class O1, class O2> 83 template<class O1, class O2>
85 struct proxy : proxy_base { 84 struct proxy : proxy_base {
86 virtual R call (void *obj, R (object::*meth)(A1), A1 a1) 85 virtual R call (void *obj, R (object::*meth)(A1), A1 a1)
87 { 86 {
88 ((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1)>(meth))) 87 return (R)((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<R (O2::*)(A1)>(meth)))
89 (a1); 88 (a1);
90 } 89 }
91 }; 90 };
92 91
93 proxy_base *prxy; 92 proxy_base *prxy;
126 }; 125 };
127 template<class O1, class O2> 126 template<class O1, class O2>
128 struct proxy : proxy_base { 127 struct proxy : proxy_base {
129 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)
130 { 129 {
131 ((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)))
132 (a1, a2); 131 (a1, a2);
133 } 132 }
134 }; 133 };
135 134
136 proxy_base *prxy; 135 proxy_base *prxy;
169 }; 168 };
170 template<class O1, class O2> 169 template<class O1, class O2>
171 struct proxy : proxy_base { 170 struct proxy : proxy_base {
172 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)
173 { 172 {
174 ((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)))
175 (a1, a2, a3); 174 (a1, a2, a3);
176 } 175 }
177 }; 176 };
178 177
179 proxy_base *prxy; 178 proxy_base *prxy;
212 }; 211 };
213 template<class O1, class O2> 212 template<class O1, class O2>
214 struct proxy : proxy_base { 213 struct proxy : proxy_base {
215 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)
216 { 215 {
217 ((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)))
218 (a1, a2, a3, a4); 217 (a1, a2, a3, a4);
219 } 218 }
220 }; 219 };
221 220
222 proxy_base *prxy; 221 proxy_base *prxy;
255 }; 254 };
256 template<class O1, class O2> 255 template<class O1, class O2>
257 struct proxy : proxy_base { 256 struct proxy : proxy_base {
258 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)
259 { 258 {
260 ((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)))
261 (a1, a2, a3, a4, a5); 260 (a1, a2, a3, a4, a5);
262 } 261 }
263 }; 262 };
264 263
265 proxy_base *prxy; 264 proxy_base *prxy;
298 }; 297 };
299 template<class O1, class O2> 298 template<class O1, class O2>
300 struct proxy : proxy_base { 299 struct proxy : proxy_base {
301 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)
302 { 301 {
303 ((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)))
304 (a1, a2, a3, a4, a5, a6); 303 (a1, a2, a3, a4, a5, a6);
305 } 304 }
306 }; 305 };
307 306
308 proxy_base *prxy; 307 proxy_base *prxy;
341 }; 340 };
342 template<class O1, class O2> 341 template<class O1, class O2>
343 struct proxy : proxy_base { 342 struct proxy : proxy_base {
344 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)
345 { 344 {
346 ((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)))
347 (a1, a2, a3, a4, a5, a6, a7); 346 (a1, a2, a3, a4, a5, a6, a7);
348 } 347 }
349 }; 348 };
350 349
351 proxy_base *prxy; 350 proxy_base *prxy;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines