[MSM] Additional template arguments for process_event
The short question is:
Would it be possible/convenient that
boost::msm::back::state_machine::process_event
receive more template parameters?
template< class Event, typename... ARGS >
process_event( const Event& event, ARGS&&... args );
args been forwarded to transition actions?
I've been searching in boost.development mailing list archives and didn't
see this
question before.
The need of additional template parameters is based on the fact that ARGS
may not be
defined at the moment of the state_machine isntantiation.
Note: I would love to notice that I am wrong, and all this is an unnecessary
complication, please let me know if that is the case.
Thanks for reading.
The long story follows:
I am trying to use MSM for the first time.
I am evaluating the factibility and convenience of a library to try to
make easier the construction of protocol stacks over Boost.Asio. Protocol
stack layers are often Finite State Machines.
The idea is that the user of the library would program reusable 'layers'
and use a library facility called LayerLinker to links the layers.
For example this is a simplified pseudocode:
template< typename STACK, int POSITION >
class LayerLinker {
typedef ... layer_t;
typedef LayerLinker
On Thu, Jan 2, 2014 at 9:52 PM, Juan Carlos Franzoy
I am evaluating the factibility and convenience of a library to try to make easier the construction of protocol stacks over Boost.Asio. Protocol stack layers are often Finite State Machines.
This doesn't directly answer your question, but... If each protocol layer speaks directly to the layers immediately above it and below it, where the bottom-most layer speaks directly to Boost.Asio, this could be an ideal use case for Boost.Coroutine and (at the bottom) its Asio integration. You could write each layer as simple procedural code, yielding control to the layer above or the layer below.
participants (2)
-
Juan Carlos Franzoy
-
Nat Goodspeed