Boost logo

Boost :

From: Andreas Huber (ah2003_at_[hidden])
Date: 2004-09-15 04:12:05


Alexander Nasonov <alnsn <at> yandex.ru> writes:
> I didn't expected that simplicity. In order to check my ideas I need
> some metaprogramming.
> For example, if I number every call-operator (overload_id<N> in a first
> argument), I can collect all states automatically (unique_at algorithm).
> I can also collect all events (unique_at again) and move transition
> table for those events to cpp file if a user puts static initializer in
> Fsm class.

Hmmm, but I guess you still need to have the whole transition table in one
translation unit, right?

> I can also check with find_if and is_convertible if there is
> a match for given state and event. If not, I can dispatch to alternative.

Why would you need to do that?

> If you have other ideas, please share them with me. I'm really
> interested to make implementation more complex :)

I guess the most important thing is to implement O(1) dispatch. After that, I'd
try to add entry and exit action support, though I guess that is going to wreck
the current simplicity.

Regards,

Andreas


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