Boost logo

Boost :

From: Stjepan Rajko (stipe_at_[hidden])
Date: 2008-09-02 12:03:32


Hi Manuel,

On Tue, Sep 2, 2008 at 8:48 AM, Manuel Jung <gzahl_at_[hidden]> wrote:
>
> Hey,
>
> The filter of the GIl example is always processed, whether or whether not it
> is multiplexed to the output, right? Maybe it would be good to insert a
> conditional component right before the filter, therefore the data is
> dropped, if the multiplexer takes data from slot 0. Otherwise a senseless
> computation is done, if the filter is turned off.
>

This is correct.

> I wanted to alter the example as suggested, but i don't know how to use the
> conditional component? I couldn't find a example for that. Maybe you could
> point out how to use it.
>

The conditional component is a generic component that is used to make
other components. As such, it wouldn't serve the purpose you need out
of the box. But the junction component would:

http://www.dancinghacker.com/code/dataflow/dataflow/signals/components/flow/junction.html

That particular page doesn't mention it (although the example
demonstrates it), but junction also has gate functionality (it's
mentioned in the component summary). Actually, "gate" would probably
be a better name for this component.

Incidentally, junction is implemented using the conditional component like this:
http://svn.boost.org/trac/boost/browser/sandbox/SOC/2007/signals/boost/dataflow/signals/component/junction.hpp

Best,

Stjepan


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