Re: [gtkmm] retype() and retype_return()
- From: MHL Schulze t-online de (Martin Schulze)
- To: murrayc usa net
- Cc: libsigc-list <libsigc-mlist lists sourceforge net>, gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] retype() and retype_return()
- Date: Wed, 24 Jul 2002 22:19:59 +0200
Am 24.07.2002 21:13 schrieb(en) Murray Cumming:
Does anyone mind if I also remove retype() and retype_return(). Remember
that we will still have bind_return().
Yes: bind(_return) and retype(_return) are completely different! The
former helps you to connect a function to a signal that has more
parameters (a return type) than the signal:
void foo(int num) {}
Signal0<void> signal1;
signal0.connect(bind(slot(&foo),5));
The latter allows you to make simple conversions of the parameter types
(return type) in a very convinient way:
void foo(int num) {}
Signal1<void,float> signal1;
signal1.connect(retype<void,float>(slot(&foo)));
Both are quite common operations (at least I think so and I do use them
both). A feature like retype() has been asked for on the mailing list
more than once before libsigc++ 1.1 got spread.
Regards,
Martin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]