--- gvpe/src/callback.h 2004/01/17 01:18:36 1.4 +++ gvpe/src/callback.h 2006/01/14 11:21:12 1.9 @@ -1,15 +1,14 @@ -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it +// THIS IS A GENERATED FILE: RUN callback.pl to regenerate it +// THIS IS A GENERATED FILE: callback.pl is part of the GVPE +// THIS IS A GENERATED FILE: distribution. /* callback.h -- C++ callback mechanism - Copyright (C) 2003-2004 Marc Lehmann + Copyright (C) 2003-2006 Marc Lehmann - This program is free software; you can redistribute it and/or modify + This file is part of GVPE. + + GVPE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -20,8 +19,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + along with gvpe; if not, write to the Free Software + Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef CALLBACK_H__ @@ -36,13 +35,13 @@ /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - virtual R call (void *obj, R (object::*meth)()) = 0; + virtual R call (void *obj, R (object::*meth)()) const = 0; }; template struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth)()) + virtual R call (void *obj, R (object::*meth)()) const { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) + return (R)((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) (); } }; @@ -51,7 +50,7 @@ public: template - callback0 (O1 *object, R (O2::*method)()) + explicit callback0 (O1 *object, R (O2::*method)()) { static proxy p; obj = reinterpret_cast(object); @@ -79,13 +78,13 @@ /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - virtual R call (void *obj, R (object::*meth)(A1), A1 a1) = 0; + virtual R call (void *obj, R (object::*meth)(A1), A1 a1) const = 0; }; template struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth)(A1), A1 a1) + virtual R call (void *obj, R (object::*meth)(A1), A1 a1) const { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) + return (R)((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) (a1); } }; @@ -94,7 +93,7 @@ public: template - callback1 (O1 *object, R (O2::*method)(A1)) + explicit callback1 (O1 *object, R (O2::*method)(A1)) { static proxy p; obj = reinterpret_cast(object); @@ -122,13 +121,13 @@ /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2), A1 a1, A2 a2) = 0; + virtual R call (void *obj, R (object::*meth)(A1, A2), A1 a1, A2 a2) const = 0; }; template struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2), A1 a1, A2 a2) + virtual R call (void *obj, R (object::*meth)(A1, A2), A1 a1, A2 a2) const { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) + return (R)((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) (a1, a2); } }; @@ -137,7 +136,7 @@ public: template - callback2 (O1 *object, R (O2::*method)(A1, A2)) + explicit callback2 (O1 *object, R (O2::*method)(A1, A2)) { static proxy p; obj = reinterpret_cast(object); @@ -165,13 +164,13 @@ /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2, A3), A1 a1, A2 a2, A3 a3) = 0; + virtual R call (void *obj, R (object::*meth)(A1, A2, A3), A1 a1, A2 a2, A3 a3) const = 0; }; template struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2, A3), A1 a1, A2 a2, A3 a3) + virtual R call (void *obj, R (object::*meth)(A1, A2, A3), A1 a1, A2 a2, A3 a3) const { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) + return (R)((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) (a1, a2, a3); } }; @@ -180,7 +179,7 @@ public: template - callback3 (O1 *object, R (O2::*method)(A1, A2, A3)) + explicit callback3 (O1 *object, R (O2::*method)(A1, A2, A3)) { static proxy p; obj = reinterpret_cast(object); @@ -208,13 +207,13 @@ /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4), A1 a1, A2 a2, A3 a3, A4 a4) = 0; + virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4), A1 a1, A2 a2, A3 a3, A4 a4) const = 0; }; template struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4), A1 a1, A2 a2, A3 a3, A4 a4) + virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4), A1 a1, A2 a2, A3 a3, A4 a4) const { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) + return (R)((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) (a1, a2, a3, a4); } }; @@ -223,7 +222,7 @@ public: template - callback4 (O1 *object, R (O2::*method)(A1, A2, A3, A4)) + explicit callback4 (O1 *object, R (O2::*method)(A1, A2, A3, A4)) { static proxy p; obj = reinterpret_cast(object); @@ -251,13 +250,13 @@ /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) = 0; + 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; }; template struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) + virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) + return (R)((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) (a1, a2, a3, a4, a5); } }; @@ -266,7 +265,7 @@ public: template - callback5 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5)) + explicit callback5 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5)) { static proxy p; obj = reinterpret_cast(object); @@ -294,13 +293,13 @@ /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - 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; + 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; }; template struct proxy : proxy_base { - 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) + 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 { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) + return (R)((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) (a1, a2, a3, a4, a5, a6); } }; @@ -309,7 +308,7 @@ public: template - callback6 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6)) + explicit callback6 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6)) { static proxy p; obj = reinterpret_cast(object); @@ -337,13 +336,13 @@ /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - 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; + 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; }; template struct proxy : proxy_base { - 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) + 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 { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) + return (R)((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) (a1, a2, a3, a4, a5, a6, a7); } }; @@ -352,7 +351,7 @@ public: template - callback7 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6, A7)) + explicit callback7 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6, A7)) { static proxy p; obj = reinterpret_cast(object);