Boost logo

Boost :

From: andrea carbone (andrea.carbone_at_[hidden])
Date: 2008-08-25 15:21:22

I am currently trying to develop a project using the Boost::FSM library.
I really hope that it will be accepted in Boost.
This is not a review or vote (that will come after ;) ).

I need some practical tips on how to realize the design that I have in mind.
I have experience in State Machine coding, but until now I have used some
ad-hoc coding following
the Gamma et al examples.

I find boost::fsm library really interesting and clean.

But, back to my request.

I need to handle the states of a process.
The process will be implemented in a class containing all required methods
and data.
Think for example to sensor management.
Init (connect the device).
Setup (configuration).
Idle (nop).
AcquireMultiData ...

I need a unique instance of the sensor object.

How can I make all the states aware of this unique instance?
Avoiding singletons ... if possible.

Is there some way in boost::fsm to automatically realize this design?

I know, this is more a C++ design question, but I think that it is a common
problem in FSM coding anyway.

Thanks for all your suggestions.


View this message in context:
Sent from the Boost - Dev mailing list archive at

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