.
struct TopState;
struct PairingStateMachine : sc::state_machine< StateMachine, TopState >
{
unsigned int max; /**< Total number of devices which can be paired */
};
struct NotReady;
struct TopState : sc::state< TopState, StateMachine, NotReady >
{
TopState(my_context ctx) : my_base( ctx )
{
}
~TopState() { std::cout << "Leave and desctruct TopState state!\n"; }
typedef TopstateList reactions;
template< class MostDerived >
sc::result react( const PairingBaseEvents< MostDerived > & );
};
template< class MostDerived, class Context >
struct StateBase : sc::state< MostDerived, Context>
{
typedef sc::state< MostDerived, Context> base_type;
typedef typename base_type::my_context my_context;
typedef StateBase my_base;
StateBase( my_context ctx ) : base_type( ctx )
{
std::cout << "StateBase cst" << std::endl;
}
};
struct NotReady : StateBase< NotReady, TopState >
{
typedef NotReadystateList reactions;
NotReady (my_context ctx) : my_base( ctx ){
}
template< class MostDerived >
sc::result react( const PairingBaseEvents< MostDerived > & );
};