--- gvpe/src/callback.pl 2003/04/02 05:14:59 1.1 +++ gvpe/src/callback.pl 2006/01/14 11:21:12 1.8 @@ -1,17 +1,17 @@ #!/usr/bin/perl print < - 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. @@ -22,12 +22,12 @@ 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 VPE_CALLBACK_H__ -#define VPE_CALLBACK_H__ +#ifndef CALLBACK_H__ +#define CALLBACK_H__ EOF @@ -49,13 +49,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)($TYPE)$_TYPEARG) = 0; + virtual R call (void *obj, R (object::*meth)($TYPE)$_TYPEARG) const = 0; }; template struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth)($TYPE)$_TYPEARG) + virtual R call (void *obj, R (object::*meth)($TYPE)$_TYPEARG) const { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) + return (R)((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) ($ARG); } }; @@ -64,7 +64,7 @@ public: template - callback$a (O1 *object, R (O2::*method)($TYPE)) + explicit callback$a (O1 *object, R (O2::*method)($TYPE)) { static proxy p; obj = reinterpret_cast(object);