Boost logo

Boost :

From: james.jones_at_[hidden]
Date: 2007-02-20 14:10:26


From: "Stjepan Rajko" <stipe_at_[hidden]>
> Is there any interest in a library which facilitates the
> implementation and interconnection of objects using Boost.Signals?
> [snip]
>
> * I'm wondering whether the choice of operators (operator(), >>=.,
> >=) used is appropriate or whether there are better alternatives.

Sounds cool. I'd probably prefer to use >> and/or << as operators, though, if for no other reason than they're already overloaded by iostreams, so as library users we're used to expecting that overload. >>= isn't similarly overloaded, so it's something of a surprise. operator() isn't bad either, but << or >> are better visually.

I wonder if a different operator (maybe || ?) could be used to create trees? Or maybe that gets confusing. Your example would become:

frame_rate >>
        ((video_generator >> differencer >> flipper >> analysis >> database >> display1)
        || display2);

I think this is clearer than your proposed syntax:

frame_rate >>
        (video_generator >> differencer >> flipper >> analysis >> database >> display1)
>> display2;

because the latter implies that display2 gets input from the parenthesized sequence in the middle, which isn't the case (if I understood it correctly).

-
James Jones Administrative Data Mgmt.
Webmaster 375 Raritan Center Pkwy, Suite A
Data Architect Edison, NJ 08837


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk