Boost logo

Boost :

From: Stjepan Rajko (stipe_at_[hidden])
Date: 2007-06-14 14:59:51


Hello,

A quick update on the status of the Signal Network GSoC project (a set
of components and connection mechanisms based on Boost.Signals and
geared towards dataflow-oriented programming):

* Docs
The documentation now has more introductory and motivational material.
 If you don't know what this library is about or why to use it, you
can check it the Introduction section out (and please let me know if
it's providing you with useful information - it would be very helpful
feedback!). The URL is:

http://dancinghacker.com/code/signet/

* Boost.Fusion
Since changing the internal implementation of all of the components to
use Boost.Fusion, I have added support of fused signals in addition to
the regular unfused ones. For example, you may choose to transmit the
signals the unfused way "as usual" (say via boost::signal<void (float,
int &, const string &)>, or you may choose to transmit them fused (say
via boost::signal<const fusion::vector<float, int &, const string &>
&>). After running some simple timing tests, fused signals tend to be
much more efficient in parameter forwarding, although I might be able
to cut down the difference some after I look into where all I'm
creating unnecessary temporaries in the unfused case.

Note: if you want to test the code in the sandbox, note that it
includes a small change to the Fusion library necessary if you're
using the signet::storage component with a signal that carries a
reference (as the timing_example does). If you're using the sort of
compiler that complains about multiply defined copy constructors,
blame the warnings on me and not the authors of fusion :-)

* Components

Pretty much all components now offer both a fused and unfused version.
 Perhaps the most exciting advance (to me) is the introduction of four
generic components:
 * modifier: applies a member function object to any incoming signal
and outputs the result
 * applicator: applies a function object to a member object each time
it forwards a signal (say, it increases a counter)
 * instantiator: instantiates an object from a member object each time
it forwards a signal (say, it instantiates a scoped_lock over a mutex)
 * conditional: forwards a signal if a function object evaluates to true

* Tests
tests have now been separated into different files, and cover most of
the new fused / unfused functionality. all pass on OS X/darwin and
Win/MSVC 8.0

The GSoC wiki page might have some more info and some proposed next
steps. If you have anything to add, please feel free to update the
wiki, or reply here (or off the list if you prefer):

http://svn.boost.org/trac/boost/wiki/soc/2007/SignalNetwork

All feedback is much appreciated!

Thanks,

Stjepan


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