Boost logo

Boost Users :

Subject: [Boost-users] [statechart] Can inner states be defined for a state in orthogonal region?
From: Gordon Smith (spider.karma+boost-users_at_[hidden])
Date: 2009-08-12 15:04:45


I'm unable to compile the machine below that includes inner states
within a state in an orthogonal region.

The error is: use of undefined type 'boost::STATIC_ASSERTION_FAILURE<x>'

{{{
struct SerialPort : public state_machine< SerialPort, StateTXWrapper > {}

struct StateTXWrapper: simple_state< StateTXWrapper, SerialPort,
mpl::list< StateTXNotReady, StateStart > > {};

    // Orthogonal 0

    struct StateMrf : simple_state< StateMrf,
StateTXWrapper::orthogonal< 0 > > {};

    struct StatePortClosed : simple_state< StatePortClosed,
StateTXWrapper::orthogonal< 0 > > {};

        struct StateOpenPort : simple_state< StateOpenPort,
StatePortClosed > {};

        struct StateOpenPortWait : simple_state< StateOpenPortWait,
StatePortClosed > {};
}}}

The assert is invoked for StateOpenPort and StateOpenPortWait:

    BOOST_STATIC_ASSERT( ( mpl::less<
      orthogonal_position,
      typename context_type::no_of_orthogonal_regions >::value ) );

Is it possible to have such inner states?

Boost version 1.38
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86


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