Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-03-22 22:11:29


Andreas Huber <ah2003_at_[hidden]> writes:

> jp <jp <at> comrad.co.nz> writes:
>> i dont kno if there is now a boost::fsm. the above messages were in 2002!
>
> You'll find the most recent version of boost::fsm here:
>
> http://boost-sandbox.sf.net/fsm.zip

Not meant to compete with Andreas' submission, but I've enclosed the
latest FSM examples from the upcoming MPL book. There are two
implementations of the framework that use essentially the same
interface (an identical DSEL) but entirely different dispatching
mechanisms. The first one dispatches with a "compile-time case
statement" keyed on the current state. The second one dispatches
with an O(1) lookup in a static const table generated at
initialization time. Other schemes and optimizations are clearly
possible. The approach shows the power of declarative languages for
expressing domain-specific programs.

Cheers,


-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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