|
Boost : |
From: Dean Michael C. Berris (mikhailberis_at_[hidden])
Date: 2006-03-02 14:26:38
Good day everyone,
I have just uploaded a simple implementation to the vault of my proposed
listener-registry pattern implementation. Let me explain how this is
different from Boost.Signals:
1) It doesn't use MPL (yet) -- since because the pattern is quite
simple, I have implemented it such that the listener class should be
inherited, and a handle() method should be overridden by the specific
listeners. This would change, once I start learning more about MPL --
which should make the implementation more flexible at compile time.
2) It maps inputs to processors, while Boost.Signals allows you to use a
signal which maps to different slots (which are all called in turn, once
the signal is invoked). The listener-registry pattern implementation
defines a registry to which listeners register themselves -- the
registry then does the routing of inputs to the listeners. Think event
driven processing, where a listener listens for a specific event and is
invoked only when the specific input is passed into the registry which
it is registered to.
3) It currently only intends to receive a single input type, which
should change as I learn more about the MPL and how to make it more
extensible with regards to compile time specification.
The file is up at the vault (listener.tar.gz) and unfortunately, I chose
to use the CppUnit test framework, and the GNU Make build system -- I've
tried it on Ubuntu Linux 5.10, and requires libcppunit to build the test
case.
Comments, suggestions, and pointers most appreciated.
Thanks, and hope to hear from you guys soon.
-- Dean Michael C. Berris Mobile +639287291459 URL http://mikhailberis.blogspot.com YMID: mikhailberis
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk