|
Boost : |
From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2005-02-12 12:45:07
David Abrahams wrote:
> "Alexander Nasonov" <alnsn_at_[hidden]> writes:
> > struct Running { /* stateful */ };
> > struct Stopped { /* stateful */ };
> Even more confusing; now you need a dynamic allocation
Why I need it?
> to represent and change the current state of the machine. I suppose you
> could use variant,
That's one possible representation
> but I never understood why people want to put state _inside_
> of states -- it doesn't match up with the domain abstraction of state
> machines. The state's identity should be enough.
There are two kinds of state: state of machine and class state. They're from
different domains. Suppose Running state has m_speed member. Is it worth
adding this member to the state identity?
PS: We are ahead of time, boost::fsm review is scheduled on Feb 21 :)
-- Alexander
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk