--- gvpe/src/callback.pl 2007/12/04 17:17:19 1.12 +++ gvpe/src/callback.pl 2008/08/07 17:54:26 1.14 @@ -8,24 +8,34 @@ // THIS IS A GENERATED FILE: distribution. /* - callback.h -- C++ callback mechanism - Copyright (C) 2003-2007 Marc Lehmann - - 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. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with gvpe; if not, write to the Free Software - Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * callback.h -- C++ callback mechanism + * Copyright (C) 2003-2008 Marc Lehmann + * + * This file is part of GVPE. + * + * This program 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 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 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, see . + * + * Additional permission under GNU GPL version 3 section 7 + * + * If you modify this Program, or any covered work, by linking or + * combining it with the OpenSSL project's OpenSSL library (or a modified + * version of that library), containing parts covered by the terms of the + * OpenSSL or SSLeay licenses, the licensors of this Program grant you + * additional permission to convey the resulting work. Corresponding + * Source for a non-source form of such a combination shall include the + * source code for the parts of OpenSSL used as well as that of the + * covered work. */ #ifndef CALLBACK_H__ @@ -56,30 +66,6 @@ { typedef R (*ptr_type)(void *self$_TYPE); -private: - - void *self; - ptr_type func; - -protected: - - template - struct thunktype; - - template - struct thunktype - { - typedef klass K; - }; - - template - static R thunk (void *self$_TYPEARG) - { - klass *obj = static_cast(self); - return (obj->*method) ($ARG); - } - -public: template void set (K *object) { @@ -96,6 +82,18 @@ { return call ($ARG); } + +private: + + void *self; + ptr_type func; + + template + static R thunk (void *self$_TYPEARG) + { + klass *obj = static_cast(self); + return (obj->*method) ($ARG); + } }; EOF