Boost logo

Boost :

Subject: Re: [boost] [msm]exit pseudo state and event
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2011-07-11 15:31:43

> The functor Not_ is suitable for "else".
> But if we have much more guards, We have to use Or_ functor like this.
> msme::Not_< msme::Or_< msme::Or_<Guard1, Guard2>, Guard3> >
> Off the top of my head, how about the functor Else_ below?
> Else_ <Guard1, Guard2, Guard3, ... >

For else, we can use the fact that msm tries guards from the bottom of the
table to the top:

// else clause
Row< state1, ev, state2, none, none>,
// if clause
Row< state1, ev, state2, none, Or_<...> >
// more if clauses

It's not UML-conform, but well ;-)



Boost list run by bdawes at, gregod at, cpdaniel at, john at