
Andreas Huber <ah2003@gmx.net> 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:
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