[statechart] non-virtual unconsumed_event

Alexandre Bouchu via Boost-users <[email protected]>
Newsgroups gmane.comp.lib.boost.user
Message-ID <CAPE2DZ88A1zA-TWVrs8mwJe4LiJEeU5wojODpuPvTEg=fvMT1g@mail.gmail.com>
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 mailing list
[email protected]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.