Re: Re: [Fwd: Re: [Boost-users] bind return value]

Darren Vincent Hart <[email protected]> Wed, 10 Sep 2003 10:31:10 -0600
Newsgroups gmane.comp.embedded.stk.gui.devel
Message-ID <1063211470.758.13.camel@sway>
OK Team,=20

override_return is now part of libstk, implemented in override_return.h
and included by stk.h.  I haven't addressed the problem involving
signals with arguments yet, but I will (or someone else can if they get
the itch).

application::quit() and application::current_state() now return void as
they should and all the test programs have been updated accordingly.

Please have a look at override_return and xine_test.cpp (best set of
example signal connect calls) to see how this works.  The overloaded
comma operator is just awesome IMNSHO.

Many thanks to Peter!

Darren

On Wed, 2003-09-10 at 09:30, Marc Str=C3=A4mke wrote:
> Darren Vincent Hart wrote:
> > On Wed, 2003-09-10 at 08:08, Marc Str=C3=A4mke wrote:
> >=20
> >>Peter Dimov's Solution was basicly what i was thinking of, he's a few=20
> >>years ahead of me in metaprogramming though *g*
> >>I see one problem though , the first(simpler) solution makes no=20
> >>provisions for supporting signal arguments does it? As far as i=20
> >>understand the limitation of C++'s metaprogramming here we need one=20
> >>boost_return overload/specialisation for each number of arguments suppo=
rted.
> >>
> >=20
> >=20
> > I don't think so.  Libstk signals all accept bool(void) slots, so there
> > are no arguments.  When we use bind to use a method that takes
> > arguments, it (bind) returns a functor that returns the same thing as
> > the method, but takes no arguments, so I don't think this is an issue.=20
> > I am implementing a test case atm (including argument passing to
> > "bind'ed" slots).
> That is absolutely right, but we do have signals that have arguments, i=20
> mean the signal, not the slot! For example pre_draw gets a rectangle, or=20
> on_event gets an event_ptr. It should be sufficient to provide a one=20
> argument form only though!
>=20
> >=20
> > Darren
> >=20
>=20
>=20
>=20
> _______________________________________________
> Libstk mailing list
> [email protected]
> http://www.dvhart.com/cgi-bin/mailman/listinfo/libstk