mirror of
https://github.com/boostorg/msm.git
synced 2026-01-26 06:42:20 +00:00
new version for 1.47
[SVN r72032]
This commit is contained in:
@@ -48,6 +48,17 @@ namespace
|
||||
// front-end: define the FSM structure
|
||||
struct player_ : public msm::front::state_machine_def<player_>
|
||||
{
|
||||
template <class Event,class FSM>
|
||||
void on_entry(Event const& ,FSM&)
|
||||
{
|
||||
std::cout << "entering: Player" << std::endl;
|
||||
}
|
||||
template <class Event,class FSM>
|
||||
void on_exit(Event const&,FSM& )
|
||||
{
|
||||
std::cout << "leaving: Player" << std::endl;
|
||||
}
|
||||
|
||||
// The list of FSM states
|
||||
struct Empty : public msm::front::state<>
|
||||
{
|
||||
@@ -203,6 +214,9 @@ namespace
|
||||
// event leading to the same state
|
||||
// no action method called as it is not present in the transition table
|
||||
p.process_event(stop()); pstate(p);
|
||||
std::cout << "stop fsm" << std::endl;
|
||||
p.stop();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user