Boost logo

Boost Users :

From: Alexandre Bouchu (abouchu_at_[hidden])
Date: 2022-04-26 22:25:12


Hello,

Looking for guidance regarding best practices using boost statechart.
When it came time to have a mechanism to catch unhandled events and pass
that information back to clients, my first choice has been to override
unconsumed_event public function in state_machine class.

Given that the static code analysis tool we run complains about the dangers
of overriding a non-virtual function, I came here to get more background
into maybe why this function was not made virtual in the first place.
Is there for example a better implementation practice that would see this
"catch all" function stay empty, as is the case with state_machine
implementation, and instead use another technique to provide meaningful
feedback to clients when the action or state transition requested is
invalid/unsupported?

I feel I can justify and waive this code analysis tool warning up the food
chain, but yet wanted some feedback from this user group first.

Thanks,
Alexandre



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