Boost logo

Boost Users :

Subject: [Boost-users] [msm] EUML in a header file
From: Nate Knight (nate.knight_at_[hidden])
Date: 2011-05-09 13:18:18


Christophe,

One problem I've run into with the EUML frontend is the the _EVENT, _ACTION and _STATE
macros define non-static instance variables. So, if I define a state machine in a header file which
then gets included in multiple source files (e.g. I have two classes which use the same state machine)
I get linker errors about duplicate instances. For states, I can work around this issue by doing, for example,

BOOST_MSM_EUML_DECLARE_STATE((),MyStateType)
static MyStateType MyState;

and then using MyState in the transition table. Events and Actions don't seem to have the corresponding
_DECLARE_ macros, so this workaround isn't really feasible at this point in time. Any thoughts?

Thanks
Nate


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net