--- rxvt-unicode/src/callback.h 2005/04/26 00:35:00 1.4 +++ rxvt-unicode/src/callback.h 2006/01/14 11:21:08 1.7 @@ -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 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,7 +19,7 @@ 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 + along with gvpe; if not, write to the Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -32,17 +31,17 @@ struct object { }; void *obj; - R (object::*meth) (); + R (object::*meth)(); /* 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,20 +50,20 @@ public: template - callback0 (O1 *object, R (O2::*method) ()) + explicit callback0 (O1 *object, R (O2::*method)()) { static proxy p; - obj = reinterpret_cast (object); - meth = reinterpret_cast (method); + obj = reinterpret_cast(object); + meth = reinterpret_cast(method); prxy = &p; } - R call () const + R call() const { return prxy->call (obj, meth); } - R operator () () const + R operator ()() const { return call (); } @@ -75,17 +74,17 @@ struct object { }; void *obj; - R (object::*meth) (A1); + R (object::*meth)(A1); /* 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,20 +93,20 @@ public: template - callback1 (O1 *object, R (O2::*method) (A1)) + explicit callback1 (O1 *object, R (O2::*method)(A1)) { static proxy p; - obj = reinterpret_cast (object); - meth = reinterpret_cast (method); + obj = reinterpret_cast(object); + meth = reinterpret_cast(method); prxy = &p; } - R call (A1 a1) const + R call(A1 a1) const { return prxy->call (obj, meth, a1); } - R operator () (A1 a1) const + R operator ()(A1 a1) const { return call (a1); } @@ -118,17 +117,17 @@ struct object { }; void *obj; - R (object::*meth) (A1, A2); + R (object::*meth)(A1, A2); /* 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,20 +136,20 @@ 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); - meth = reinterpret_cast (method); + obj = reinterpret_cast(object); + meth = reinterpret_cast(method); prxy = &p; } - R call (A1 a1, A2 a2) const + R call(A1 a1, A2 a2) const { return prxy->call (obj, meth, a1, a2); } - R operator () (A1 a1, A2 a2) const + R operator ()(A1 a1, A2 a2) const { return call (a1, a2); } @@ -161,17 +160,17 @@ struct object { }; void *obj; - R (object::*meth) (A1, A2, A3); + R (object::*meth)(A1, A2, A3); /* 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,20 +179,20 @@ 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); - meth = reinterpret_cast (method); + obj = reinterpret_cast(object); + meth = reinterpret_cast(method); prxy = &p; } - R call (A1 a1, A2 a2, A3 a3) const + R call(A1 a1, A2 a2, A3 a3) const { return prxy->call (obj, meth, a1, a2, a3); } - R operator () (A1 a1, A2 a2, A3 a3) const + R operator ()(A1 a1, A2 a2, A3 a3) const { return call (a1, a2, a3); } @@ -204,17 +203,17 @@ struct object { }; void *obj; - R (object::*meth) (A1, A2, A3, A4); + R (object::*meth)(A1, A2, A3, A4); /* 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,20 +222,20 @@ 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); - meth = reinterpret_cast (method); + obj = reinterpret_cast(object); + meth = reinterpret_cast(method); prxy = &p; } - R call (A1 a1, A2 a2, A3 a3, A4 a4) const + R call(A1 a1, A2 a2, A3 a3, A4 a4) const { return prxy->call (obj, meth, a1, a2, a3, a4); } - R operator () (A1 a1, A2 a2, A3 a3, A4 a4) const + R operator ()(A1 a1, A2 a2, A3 a3, A4 a4) const { return call (a1, a2, a3, a4); } @@ -247,17 +246,17 @@ struct object { }; void *obj; - R (object::*meth) (A1, A2, A3, A4, A5); + R (object::*meth)(A1, A2, A3, A4, A5); /* 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,20 +265,20 @@ 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); - meth = reinterpret_cast (method); + obj = reinterpret_cast(object); + meth = reinterpret_cast(method); prxy = &p; } - R call (A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const { return prxy->call (obj, meth, a1, a2, a3, a4, a5); } - R operator () (A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const { return call (a1, a2, a3, a4, a5); } @@ -290,17 +289,17 @@ struct object { }; void *obj; - R (object::*meth) (A1, A2, A3, A4, A5, A6); + R (object::*meth)(A1, A2, A3, A4, A5, A6); /* 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,20 +308,20 @@ 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); - meth = reinterpret_cast (method); + obj = reinterpret_cast(object); + meth = reinterpret_cast(method); prxy = &p; } - R call (A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const { return prxy->call (obj, meth, a1, a2, a3, a4, a5, a6); } - R operator () (A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const { return call (a1, a2, a3, a4, a5, a6); } @@ -333,17 +332,17 @@ struct object { }; void *obj; - R (object::*meth) (A1, A2, A3, A4, A5, A6, A7); + R (object::*meth)(A1, A2, A3, A4, A5, A6, A7); /* 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,20 +351,20 @@ 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); - meth = reinterpret_cast (method); + obj = reinterpret_cast(object); + meth = reinterpret_cast(method); prxy = &p; } - R call (A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const { return prxy->call (obj, meth, a1, a2, a3, a4, a5, a6, a7); } - R operator () (A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const { return call (a1, a2, a3, a4, a5, a6, a7); }