diff --git a/doc/HTML/examples/AnonymousTutorial.cpp b/doc/HTML/examples/AnonymousTutorial.cpp index eaa3d03..557f90b 100644 --- a/doc/HTML/examples/AnonymousTutorial.cpp +++ b/doc/HTML/examples/AnonymousTutorial.cpp @@ -37,7 +37,7 @@ namespace void on_exit(Event const&,FSM& ) {std::cout << "leaving: State1" << std::endl;} }; struct State2 : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: State2" << std::endl;} template @@ -45,7 +45,7 @@ namespace }; struct State3 : public msm::front::state<> - { + { // when stopped, the CD is loaded template void on_entry(Event const& ,FSM&) {std::cout << "entering: State3" << std::endl;} @@ -83,7 +83,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ _row < State1 , none , State2 >, a_row < State2 , none , State3 , &p::State2ToState3 >, diff --git a/doc/HTML/examples/AnonymousTutorialWithFunctors.cpp b/doc/HTML/examples/AnonymousTutorialWithFunctors.cpp index fe60db3..4bcd7ad 100644 --- a/doc/HTML/examples/AnonymousTutorialWithFunctors.cpp +++ b/doc/HTML/examples/AnonymousTutorialWithFunctors.cpp @@ -40,7 +40,7 @@ namespace void on_exit(Event const&,FSM& ) {std::cout << "leaving: State1" << std::endl;} }; struct State2 : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: State2" << std::endl;} template @@ -48,7 +48,7 @@ namespace }; struct State3 : public msm::front::state<> - { + { // when stopped, the CD is loaded template void on_entry(Event const& ,FSM&) {std::cout << "entering: State3" << std::endl;} @@ -108,7 +108,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ Row < State1 , none , State2 >, Row < State2 , none , State3 , State2ToState3 >, @@ -140,7 +140,7 @@ namespace void test() { - my_machine p; + my_machine p; // needed to start the highest-level SM. This will call on_entry and mark the start of the SM // in this case it will also immediately trigger all anonymous transitions diff --git a/doc/HTML/examples/BoostCon09Full.cpp b/doc/HTML/examples/BoostCon09Full.cpp index 12c9666..f4a2d7b 100644 --- a/doc/HTML/examples/BoostCon09Full.cpp +++ b/doc/HTML/examples/BoostCon09Full.cpp @@ -67,9 +67,9 @@ namespace // Concrete FSM implementation void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;} }; struct Open : public msm::front::state<> - { - typedef mpl::vector1 flag_list; - typedef mpl::vector deferred_events; + { + typedef mpl::vector1 flag_list; + typedef mpl::vector deferred_events; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;} template @@ -79,9 +79,9 @@ namespace // Concrete FSM implementation // and using for this the non-default policy // if policy used, set_sm_ptr is needed struct Stopped : public msm::front::state - { + { // when stopped, the CD is loaded - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;} template @@ -97,7 +97,7 @@ namespace // Concrete FSM implementation struct Playing_ : public msm::front::state_machine_def { // when playing, the CD is loaded and we are in either pause or playing (duh) - typedef mpl::vector flag_list; + typedef mpl::vector flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;} template @@ -106,21 +106,21 @@ namespace // Concrete FSM implementation // The list of FSM states struct Song1 : public msm::front::state<> { - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;} }; struct Song2 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;} }; struct Song3 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;} template @@ -144,7 +144,7 @@ namespace // Concrete FSM implementation typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+---------------+------------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >, @@ -166,7 +166,7 @@ namespace // Concrete FSM implementation // the player state machine contains a state which is himself a state machine (2 of them, Playing and Paused) struct Paused : public msm::front::state<> { - typedef mpl::vector flag_list; + typedef mpl::vector flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Paused" << std::endl;} template @@ -207,7 +207,7 @@ namespace // Concrete FSM implementation void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&){std::cout << "player::stopped_again\n";} void report_error(error_found const&) {std::cout << "player::report_error\n";} void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";} // guard conditions @@ -226,7 +226,7 @@ namespace // Concrete FSM implementation // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +-------------+---------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, @@ -269,7 +269,7 @@ namespace // Concrete FSM implementation void pstate(player const& p) { - typedef player::stt Stt; + typedef player::stt Stt; typedef msm::back::generate_state_set::type all_states; static char const* state_names[mpl::size::value]; // fill the names of the states defined in the state machine diff --git a/doc/HTML/examples/CompositeTutorial.cpp b/doc/HTML/examples/CompositeTutorial.cpp index 0861d36..a2a29f8 100644 --- a/doc/HTML/examples/CompositeTutorial.cpp +++ b/doc/HTML/examples/CompositeTutorial.cpp @@ -51,7 +51,7 @@ namespace // Concrete FSM implementation void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;} }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;} template @@ -59,7 +59,7 @@ namespace // Concrete FSM implementation }; struct Stopped : public msm::front::state<> - { + { // when stopped, the CD is loaded template void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;} @@ -88,14 +88,14 @@ namespace // Concrete FSM implementation }; struct Song2 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;} }; struct Song3 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;} template @@ -111,7 +111,7 @@ namespace // Concrete FSM implementation typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >, @@ -148,14 +148,14 @@ namespace // Concrete FSM implementation void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&){std::cout << "player::stopped_again\n";} // guard conditions typedef player_ p; // makes transition table cleaner // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/HTML/examples/DirectEntryTutorial.cpp b/doc/HTML/examples/DirectEntryTutorial.cpp index a5dec53..35bf9fd 100644 --- a/doc/HTML/examples/DirectEntryTutorial.cpp +++ b/doc/HTML/examples/DirectEntryTutorial.cpp @@ -130,7 +130,7 @@ namespace // Transition table for SubFsm2 struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +--------------+-------------+------------+------------------------+----------------------+ a_row < PseudoEntry1 , event4 , SubState3 ,&SubFsm2_::entry_action >, _row < SubState2 , event6 , SubState1 >, diff --git a/doc/HTML/examples/Flags.cpp b/doc/HTML/examples/Flags.cpp index 8746398..5226bcc 100644 --- a/doc/HTML/examples/Flags.cpp +++ b/doc/HTML/examples/Flags.cpp @@ -56,8 +56,8 @@ namespace // Concrete FSM implementation void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;} }; struct Open : public msm::front::state<> - { - typedef mpl::vector1 flag_list; + { + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;} template @@ -65,9 +65,9 @@ namespace // Concrete FSM implementation }; struct Stopped : public msm::front::state<> - { + { // when stopped, the CD is loaded - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;} template @@ -80,7 +80,7 @@ namespace // Concrete FSM implementation struct Playing_ : public msm::front::state_machine_def { // when playing, the CD is loaded and we are in either pause or playing (duh) - typedef mpl::vector2 flag_list; + typedef mpl::vector2 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;} @@ -90,7 +90,7 @@ namespace // Concrete FSM implementation // The list of FSM states struct Song1 : public msm::front::state<> { - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;} template @@ -98,14 +98,14 @@ namespace // Concrete FSM implementation }; struct Song2 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;} }; struct Song3 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;} template @@ -121,7 +121,7 @@ namespace // Concrete FSM implementation typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >, @@ -143,7 +143,7 @@ namespace // Concrete FSM implementation // state not defining any entry or exit struct Paused : public msm::front::state<> { - typedef mpl::vector2 flag_list; + typedef mpl::vector2 flag_list; }; // the initial state of the player SM. Must be defined @@ -158,14 +158,14 @@ namespace // Concrete FSM implementation void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&){std::cout << "player::stopped_again\n";} // guard conditions typedef player_ p; // makes transition table cleaner // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/HTML/examples/History.cpp b/doc/HTML/examples/History.cpp index c8ef7d6..483e122 100644 --- a/doc/HTML/examples/History.cpp +++ b/doc/HTML/examples/History.cpp @@ -51,7 +51,7 @@ namespace void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;} }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;} template @@ -59,7 +59,7 @@ namespace }; struct Stopped : public msm::front::state<> - { + { // when stopped, the CD is loaded template void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;} @@ -84,14 +84,14 @@ namespace void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;} }; struct Song2 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;} }; struct Song3 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;} template @@ -107,7 +107,7 @@ namespace typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >, @@ -152,14 +152,14 @@ namespace void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&){std::cout << "player::stopped_again\n";} // guard conditions typedef player_ p; // makes transition table cleaner // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/HTML/examples/MsmComposite.cpp b/doc/HTML/examples/MsmComposite.cpp index 6186c53..556aad4 100644 --- a/doc/HTML/examples/MsmComposite.cpp +++ b/doc/HTML/examples/MsmComposite.cpp @@ -51,7 +51,7 @@ namespace test_fsm // Concrete FSM implementation void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Empty" << std::endl;*/} }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Open" << std::endl;*/} template @@ -59,7 +59,7 @@ namespace test_fsm // Concrete FSM implementation }; struct Stopped : public msm::front::state<> - { + { // when stopped, the CD is loaded template void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Stopped" << std::endl;*/} @@ -87,7 +87,7 @@ namespace test_fsm // Concrete FSM implementation typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >, @@ -126,14 +126,14 @@ namespace test_fsm // Concrete FSM implementation void pause_playback(pause const&) { } void resume_playback(end_pause const&) { } void stop_and_open(open_close const&) { } - void stopped_again(stop const&) {} + void stopped_again(stop const&){} // guard conditions typedef player_ p; // makes transition table cleaner // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/HTML/examples/MsmSimple.cpp b/doc/HTML/examples/MsmSimple.cpp index 3e438aa..f074a2f 100644 --- a/doc/HTML/examples/MsmSimple.cpp +++ b/doc/HTML/examples/MsmSimple.cpp @@ -48,7 +48,7 @@ namespace test_fsm // Concrete FSM implementation void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Empty" << std::endl;*/} }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Open" << std::endl;*/} template @@ -56,7 +56,7 @@ namespace test_fsm // Concrete FSM implementation }; struct Stopped : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Stopped" << std::endl;*/} template @@ -90,14 +90,14 @@ namespace test_fsm // Concrete FSM implementation void pause_playback(pause const&) { } void resume_playback(end_pause const&) { } void stop_and_open(open_close const&) { } - void stopped_again(stop const&) {} + void stopped_again(stop const&){} // guard conditions typedef player_ p; // makes transition table cleaner // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ _row < Stopped , play , Playing >, _row < Stopped , open_close , Open >, diff --git a/doc/HTML/examples/MsmSimpleFunctors.cpp b/doc/HTML/examples/MsmSimpleFunctors.cpp index b9626db..95c0aa6 100644 --- a/doc/HTML/examples/MsmSimpleFunctors.cpp +++ b/doc/HTML/examples/MsmSimpleFunctors.cpp @@ -50,7 +50,7 @@ namespace test_fsm // Concrete FSM implementation void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Empty" << std::endl;*/} }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Open" << std::endl;*/} template @@ -58,7 +58,7 @@ namespace test_fsm // Concrete FSM implementation }; struct Stopped : public msm::front::state<> - { + { // when stopped, the CD is loaded template void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Stopped" << std::endl;*/} @@ -153,7 +153,7 @@ namespace test_fsm // Concrete FSM implementation // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ Row < Stopped , play , Playing , start_playback >, Row < Stopped , open_close , Open , open_drawer >, diff --git a/doc/HTML/examples/Orthogonal-deferred.cpp b/doc/HTML/examples/Orthogonal-deferred.cpp index 980f761..5ac35cf 100644 --- a/doc/HTML/examples/Orthogonal-deferred.cpp +++ b/doc/HTML/examples/Orthogonal-deferred.cpp @@ -61,11 +61,11 @@ namespace void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;} }; struct Open : public msm::front::state<> - { + { // if the play event arrives in this state, defer it until a state handles it or // rejects it typedef mpl::vector deferred_events; - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;} template @@ -73,9 +73,9 @@ namespace }; struct Stopped : public msm::front::state<> - { + { // when stopped, the CD is loaded - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;} template @@ -88,7 +88,7 @@ namespace struct Playing_ : public msm::front::state_machine_def { // when playing, the CD is loaded and we are in either pause or playing (duh) - typedef mpl::vector2 flag_list; + typedef mpl::vector2 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;} @@ -97,21 +97,21 @@ namespace // The list of FSM states struct Song1 : public msm::front::state<> { - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;} }; struct Song2 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;} }; struct Song3 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;} template @@ -127,7 +127,7 @@ namespace typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >, @@ -149,7 +149,7 @@ namespace // state not defining any entry or exit struct Paused : public msm::front::state<> { - typedef mpl::vector2 flag_list; + typedef mpl::vector2 flag_list; }; struct AllOk : public msm::front::state<> { @@ -180,7 +180,7 @@ namespace void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&){std::cout << "player::stopped_again\n";} void report_error(error_found const&) {std::cout << "player::report_error\n";} void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";} @@ -190,7 +190,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/HTML/examples/Orthogonal-deferred2.cpp b/doc/HTML/examples/Orthogonal-deferred2.cpp index 6c77e3b..e5fa6c7 100644 --- a/doc/HTML/examples/Orthogonal-deferred2.cpp +++ b/doc/HTML/examples/Orthogonal-deferred2.cpp @@ -63,8 +63,8 @@ namespace void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;} }; struct Open : public msm::front::state<> - { - typedef mpl::vector1 flag_list; + { + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;} template @@ -72,9 +72,9 @@ namespace }; struct Stopped : public msm::front::state<> - { + { // when stopped, the CD is loaded - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;} template @@ -87,7 +87,7 @@ namespace struct Playing_ : public msm::front::state_machine_def { // when playing, the CD is loaded and we are in either pause or playing (duh) - typedef mpl::vector2 flag_list; + typedef mpl::vector2 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;} @@ -96,21 +96,21 @@ namespace // The list of FSM states struct Song1 : public msm::front::state<> { - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;} }; struct Song2 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;} }; struct Song3 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;} template @@ -126,7 +126,7 @@ namespace typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >, @@ -148,7 +148,7 @@ namespace // state not defining any entry or exit struct Paused : public msm::front::state<> { - typedef mpl::vector2 flag_list; + typedef mpl::vector2 flag_list; }; struct AllOk : public msm::front::state<> { @@ -179,7 +179,7 @@ namespace void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&){std::cout << "player::stopped_again\n";} void report_error(error_found const&) {std::cout << "player::report_error\n";} void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";} @@ -189,7 +189,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/HTML/examples/ParsingDigits.cpp b/doc/HTML/examples/ParsingDigits.cpp index 055afe0..6dadb4d 100644 --- a/doc/HTML/examples/ParsingDigits.cpp +++ b/doc/HTML/examples/ParsingDigits.cpp @@ -216,7 +216,7 @@ namespace test_fsm // Concrete FSM implementation // Transition table for parsing_ struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +-------------+-------------------+---------+---------------------+----------------------+ Row < Waiting , digit , Digit1 >, Row < Digit1 , digit , Digit2 >, diff --git a/doc/HTML/examples/SC Composite.cpp b/doc/HTML/examples/SC Composite.cpp index 23904a7..7a98fda 100644 --- a/doc/HTML/examples/SC Composite.cpp +++ b/doc/HTML/examples/SC Composite.cpp @@ -51,7 +51,7 @@ namespace test_sc void store_cd_info(cd_detected const& cd) {/*std::cout << "player::store_cd_info\n";*/ } void close_drawer(open_close const&) { /*std::cout << "player::close_drawer\n";*/ } void start_playback(play const&) { /*std::cout << "player::start_playback\n";*/ } - void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/} + void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/} void stop_playback(stop const&) { /*std::cout << "player::stop_playback\n";*/ } void pause_playback(pause const&) { /*std::cout << "player::pause_playback\n"; */} void stop_and_open(open_close const&) { /*std::cout << "player::stop_and_open\n";*/ } diff --git a/doc/HTML/examples/SC Simple.cpp b/doc/HTML/examples/SC Simple.cpp index 2cdde8a..0d1dddb 100644 --- a/doc/HTML/examples/SC Simple.cpp +++ b/doc/HTML/examples/SC Simple.cpp @@ -50,7 +50,7 @@ namespace test_sc void store_cd_info(cd_detected const& cd) {/*std::cout << "player::store_cd_info\n";*/ } void close_drawer(open_close const&) { /*std::cout << "player::close_drawer\n";*/ } void start_playback(play const&) { /*std::cout << "player::start_playback\n";*/ } - void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/} + void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/} void stop_playback(stop const&) { /*std::cout << "player::stop_playback\n";*/ } void pause_playback(pause const&) { /*std::cout << "player::pause_playback\n"; */} void stop_and_open(open_close const&) { /*std::cout << "player::stop_and_open\n";*/ } diff --git a/doc/HTML/examples/SM-2Arg.cpp b/doc/HTML/examples/SM-2Arg.cpp index 99f38bf..58efb79 100644 --- a/doc/HTML/examples/SM-2Arg.cpp +++ b/doc/HTML/examples/SM-2Arg.cpp @@ -91,8 +91,8 @@ namespace // Concrete FSM implementation } }; struct Open : public msm::front::state - { - typedef mpl::vector1 flag_list; + { + typedef mpl::vector1 flag_list; typedef mpl::vector deferred_events; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;} @@ -107,9 +107,9 @@ namespace // Concrete FSM implementation // and using for this the non-default policy // if policy used, set_sm_ptr is needed struct Stopped : public msm::front::state - { + { // when stopped, the CD is loaded - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;} template @@ -123,7 +123,7 @@ namespace // Concrete FSM implementation struct Playing_ : public msm::front::state_machine_def { // when playing, the CD is loaded and we are in either pause or playing (duh) - typedef mpl::vector2 flag_list; + typedef mpl::vector2 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;} template @@ -138,7 +138,7 @@ namespace // Concrete FSM implementation // so we have a SM containing a SM containing a SM struct Song1_ : public msm::front::state_machine_def { - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;} template @@ -148,14 +148,14 @@ namespace // Concrete FSM implementation vis.visit_state(this,i); } struct LightOn : public msm::front::state - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: LightOn" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: LightOn" << std::endl;} }; struct LightOff : public msm::front::state - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: LightOff" << std::endl;} template @@ -170,7 +170,7 @@ namespace // Concrete FSM implementation typedef Song1_ s; // makes transition table cleaner // Transition table for Song1 struct transition_table : mpl::vector1< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < LightOn , ThreeSec , LightOff, &s::turn_light_off > // +---------+-------------+---------+---------------------+----------------------+ @@ -186,14 +186,14 @@ namespace // Concrete FSM implementation typedef msm::back::state_machine Song1; struct Song2 : public msm::front::state - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;} }; struct Song3 : public msm::front::state - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;} template @@ -209,7 +209,7 @@ namespace // Concrete FSM implementation typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >, @@ -230,7 +230,7 @@ namespace // Concrete FSM implementation // the player state machine contains a state which is himself a state machine (2 of them, Playing and Paused) struct Paused_ : public msm::front::state_machine_def { - typedef mpl::vector2 flag_list; + typedef mpl::vector2 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Paused" << std::endl;} template @@ -238,14 +238,14 @@ namespace // Concrete FSM implementation // The list of FSM states struct StartBlinking : public msm::front::state - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: StartBlinking" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: StartBlinking" << std::endl;} }; struct StopBlinking : public msm::front::state - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: StopBlinking" << std::endl;} template @@ -261,7 +261,7 @@ namespace // Concrete FSM implementation typedef Paused_ pa; // makes transition table cleaner // Transition table struct transition_table : mpl::vector2< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------------+-------------+--------------+---------------------+----------------------+ a_row < StartBlinking , TenSec , StopBlinking , &pa::stop_blinking >, a_row < StopBlinking , TenSec , StartBlinking , &pa::start_blinking > @@ -315,7 +315,7 @@ namespace // Concrete FSM implementation void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&){std::cout << "player::stopped_again\n";} void start_sleep(go_sleep const&) { } void report_error(error_found const&) {std::cout << "player::report_error\n";} void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";} @@ -326,7 +326,7 @@ namespace // Concrete FSM implementation // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/HTML/examples/SimpleTutorial.cpp b/doc/HTML/examples/SimpleTutorial.cpp index cae120a..8c7a006 100644 --- a/doc/HTML/examples/SimpleTutorial.cpp +++ b/doc/HTML/examples/SimpleTutorial.cpp @@ -56,7 +56,7 @@ namespace void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;} }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;} template @@ -65,7 +65,7 @@ namespace // sm_ptr still supported but deprecated as functors are a much better way to do the same thing struct Stopped : public msm::front::state - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;} template @@ -102,7 +102,7 @@ namespace void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&){std::cout << "player::stopped_again\n";} // guard conditions bool good_disk_format(cd_detected const& evt) { @@ -125,7 +125,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/HTML/examples/SimpleTutorial2.cpp b/doc/HTML/examples/SimpleTutorial2.cpp index b499d5f..e1daf0b 100644 --- a/doc/HTML/examples/SimpleTutorial2.cpp +++ b/doc/HTML/examples/SimpleTutorial2.cpp @@ -66,7 +66,7 @@ namespace } }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;} template @@ -77,7 +77,7 @@ namespace // sm_ptr still supported but deprecated as functors are a much better way to do the same thing struct Stopped : public msm::front::state - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;} template @@ -132,7 +132,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action/Guard + // Start Event Next Action/Guard // +---------+-------------+---------+---------------------+----------------------+ a_row2 < Stopped , play , Playing , Stopped , &Stopped::start_playback >, a_row2 < Stopped , open_close , Open , Empty , &Empty::open_drawer >, diff --git a/doc/HTML/examples/SimpleTutorialInternal.cpp b/doc/HTML/examples/SimpleTutorialInternal.cpp index de490e6..49b71df 100644 --- a/doc/HTML/examples/SimpleTutorialInternal.cpp +++ b/doc/HTML/examples/SimpleTutorialInternal.cpp @@ -59,7 +59,7 @@ namespace void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;} }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;} template @@ -68,7 +68,7 @@ namespace // sm_ptr still supported but deprecated as functors are a much better way to do the same thing struct Stopped : public msm::front::state - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;} template @@ -105,7 +105,7 @@ namespace void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} // guard conditions bool good_disk_format(cd_detected const& evt) { @@ -146,7 +146,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/HTML/examples/SimpleTutorialInternal2.cpp b/doc/HTML/examples/SimpleTutorialInternal2.cpp index e4b28dc..f123fdb 100644 --- a/doc/HTML/examples/SimpleTutorialInternal2.cpp +++ b/doc/HTML/examples/SimpleTutorialInternal2.cpp @@ -83,13 +83,13 @@ namespace // Transition table for Empty struct internal_transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard Internal < cd_detected , internal_action_fct ,internal_guard_fct > // +---------+-------------+---------+---------------------+----------------------+ > {}; }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;} template @@ -98,7 +98,7 @@ namespace // sm_ptr still supported but deprecated as functors are a much better way to do the same thing struct Stopped : public msm::front::state - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;} template @@ -135,7 +135,7 @@ namespace void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} // guard conditions bool good_disk_format(cd_detected const& evt) { @@ -152,7 +152,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/HTML/examples/SimpleTutorialInternalFunctors.cpp b/doc/HTML/examples/SimpleTutorialInternalFunctors.cpp index 5b462a8..77f08da 100644 --- a/doc/HTML/examples/SimpleTutorialInternalFunctors.cpp +++ b/doc/HTML/examples/SimpleTutorialInternalFunctors.cpp @@ -81,13 +81,13 @@ namespace }; // Transition table for Empty struct internal_transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard Internal < cd_detected , internal_action_fct ,internal_guard_fct > // +---------+-------------+---------+---------------------+----------------------+ > {}; }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;} template @@ -95,7 +95,7 @@ namespace }; struct Stopped : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;} template @@ -244,7 +244,7 @@ namespace }; // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------------+----------------------+ Row < Stopped , play , Playing , ActionSequence_ - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;} template @@ -74,7 +74,7 @@ namespace // Concrete FSM implementation }; struct Stopped : public msm::front::state<> - { + { // when stopped, the CD is loaded template void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;} @@ -223,7 +223,7 @@ namespace // Concrete FSM implementation // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------------+----------------------+ Row < Stopped , play , Playing , ActionSequence_ , Internal < cd_detected , internal_action_fct ,internal_guard_fct >, a_internal< to_ignore , Empty,&Empty::internal_action > @@ -127,7 +127,7 @@ namespace > {}; }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;} template @@ -135,7 +135,7 @@ namespace }; struct Stopped : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;} template @@ -160,14 +160,14 @@ namespace }; struct Song2 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;} }; struct Song3 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;} template @@ -208,7 +208,7 @@ namespace typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+---------------+---------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong , Song1 , &pl::start_prev_song >, @@ -220,7 +220,7 @@ namespace // +---------+----------------+---------+---------------------+-----------------------+ struct internal_transition_table : mpl::vector< // normal internal transition - // Start Event Next Action Guard + // Start Event Next Action Guard Internal < internal_event , playing_internal_fct,playing_internal_guard >, // conflict between internal and the external defined above Internal < PreviousSong , playing_internal_fct,playing_false_guard >, @@ -252,7 +252,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/HTML/examples/char_event_dispatcher.hpp b/doc/HTML/examples/char_event_dispatcher.hpp index 4cfd914..023bb0d 100644 --- a/doc/HTML/examples/char_event_dispatcher.hpp +++ b/doc/HTML/examples/char_event_dispatcher.hpp @@ -89,4 +89,4 @@ struct char_event_dispatcher }; }}} // boost::msm::back -#endif //BOOST_MSM_CHAR_EVENT_DISPATCHER_HPP \ No newline at end of file +#endif //BOOST_MSM_CHAR_EVENT_DISPATCHER_HPP diff --git a/doc/HTML/examples/distributed_table/Empty.hpp b/doc/HTML/examples/distributed_table/Empty.hpp index 37b898a..00dd0e5 100644 --- a/doc/HTML/examples/distributed_table/Empty.hpp +++ b/doc/HTML/examples/distributed_table/Empty.hpp @@ -33,11 +33,11 @@ struct Empty : public msm::front::state<> void open_drawer(open_close const&); struct internal_transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard //+-------------+---------+-------------+---------+---------------------------+----------------------+ msm::front::a_row2 < Empty , open_close , Open , Empty,&Empty::open_drawer > //+-------------+---------+-------------+---------+---------------------------+----------------------+ > {}; }; -#endif \ No newline at end of file +#endif diff --git a/doc/HTML/examples/distributed_table/Events.hpp b/doc/HTML/examples/distributed_table/Events.hpp index f641bd0..023216b 100644 --- a/doc/HTML/examples/distributed_table/Events.hpp +++ b/doc/HTML/examples/distributed_table/Events.hpp @@ -36,4 +36,4 @@ struct cd_detected }; -#endif \ No newline at end of file +#endif diff --git a/doc/HTML/examples/distributed_table/Open.hpp b/doc/HTML/examples/distributed_table/Open.hpp index c0b965c..03a8e8f 100644 --- a/doc/HTML/examples/distributed_table/Open.hpp +++ b/doc/HTML/examples/distributed_table/Open.hpp @@ -26,7 +26,7 @@ namespace mpl = boost::mpl; using namespace msm::front; struct Open : public msm::front::state<> -{ +{ template void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;} template @@ -34,11 +34,11 @@ struct Open : public msm::front::state<> void close_drawer(open_close const&); struct internal_transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard //+-------------+---------+-------------+---------+---------------------------+----------------------+ msm::front::a_row2 < Open , open_close , Empty , Open,&Open::close_drawer > //+-------------+---------+-------------+---------+---------------------------+----------------------+ > {}; }; -#endif \ No newline at end of file +#endif diff --git a/doc/HTML/examples/iPodSearch.cpp b/doc/HTML/examples/iPodSearch.cpp index 565fa73..29aa413 100644 --- a/doc/HTML/examples/iPodSearch.cpp +++ b/doc/HTML/examples/iPodSearch.cpp @@ -133,7 +133,7 @@ namespace // Concrete FSM implementation // Transition table for player struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +-----------+------------------+------------+---------------------+----------------------+ _row < MyForeach , OneSong , MyFind >, _row < MyFind , NotFound , MyForeach >, diff --git a/doc/HTML/examples/iPod_distributed/MenuMode.hpp b/doc/HTML/examples/iPod_distributed/MenuMode.hpp index a360226..cad441c 100644 --- a/doc/HTML/examples/iPod_distributed/MenuMode.hpp +++ b/doc/HTML/examples/iPod_distributed/MenuMode.hpp @@ -24,7 +24,7 @@ namespace msm = boost::msm; struct MenuMode_ : public msm::front::state_machine_def { - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; struct WaitingForSongChoice : public msm::front::state<> { template @@ -50,7 +50,7 @@ struct MenuMode_ : public msm::front::state_machine_def typedef MenuMode_ fsm; // makes transition table cleaner // Transition table for player struct transition_table : mpl::vector2< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------------------+------------------+-------------------+---------------------+----------------------+ _row < WaitingForSongChoice , MenuMiddleButton , StartCurrentSong >, _row < StartCurrentSong , SelectSong , MenuExit > diff --git a/doc/HTML/examples/iPod_distributed/PlayingMode.hpp b/doc/HTML/examples/iPod_distributed/PlayingMode.hpp index 520d1e1..1328041 100644 --- a/doc/HTML/examples/iPod_distributed/PlayingMode.hpp +++ b/doc/HTML/examples/iPod_distributed/PlayingMode.hpp @@ -110,7 +110,7 @@ struct PlayingMode_ : public msm::front::state_machine_def }; struct SetPosition : public msm::front::state<> { - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "starting: PlayingMode::SetPosition" << std::endl;} template @@ -209,7 +209,7 @@ struct PlayingMode_ : public msm::front::state_machine_def typedef PlayingMode_ fsm; // makes transition table cleaner // Transition table for player struct transition_table : mpl::vector19< - // Start Event Next Action Guard + // Start Event Next Action Guard // +--------------------+---------------------+--------------------+--------------------------+----------------------+ _row < Playing , PlayPause , Paused >, _row < Playing , Off , Paused >, @@ -223,7 +223,7 @@ struct PlayingMode_ : public msm::front::state_machine_def // +--------------------+---------------------+--------------------+--------------------------+----------------------+ _row < WaitingForEnd , EndPlay , PlayingExit >, // +--------------------+---------------------+--------------------+--------------------------+----------------------+ - msm::front::Row < NoForward , EastPressed , ForwardPressed , msm::front::none , fast_fwd_ok >, + msm::front::Row < NoForward , EastPressed , ForwardPressed , msm::front::none , fast_fwd_ok >, msm::front::Row < ForwardPressed , EastReleased , NoForward , send_NextSong , msm::front::none >, a_row < ForwardPressed , ForwardTimer , FastForward , &fsm::do_fast_forward >, a_row < FastForward , ForwardTimer , FastForward , &fsm::do_fast_forward >, diff --git a/doc/HTML/examples/iPod_distributed/iPod.cpp b/doc/HTML/examples/iPod_distributed/iPod.cpp index 3cc2c1e..26f2e3e 100644 --- a/doc/HTML/examples/iPod_distributed/iPod.cpp +++ b/doc/HTML/examples/iPod_distributed/iPod.cpp @@ -144,7 +144,7 @@ namespace // Concrete FSM implementation // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +-------------------+---------------+-------------------+--------------------------------+----------------------+ _row < NotHolding , Hold , Holding >, _row < Holding , NoHold , NotHolding >, diff --git a/doc/PDF/examples/AnonymousTutorial.cpp b/doc/PDF/examples/AnonymousTutorial.cpp index eaa3d03..557f90b 100644 --- a/doc/PDF/examples/AnonymousTutorial.cpp +++ b/doc/PDF/examples/AnonymousTutorial.cpp @@ -37,7 +37,7 @@ namespace void on_exit(Event const&,FSM& ) {std::cout << "leaving: State1" << std::endl;} }; struct State2 : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: State2" << std::endl;} template @@ -45,7 +45,7 @@ namespace }; struct State3 : public msm::front::state<> - { + { // when stopped, the CD is loaded template void on_entry(Event const& ,FSM&) {std::cout << "entering: State3" << std::endl;} @@ -83,7 +83,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ _row < State1 , none , State2 >, a_row < State2 , none , State3 , &p::State2ToState3 >, diff --git a/doc/PDF/examples/AnonymousTutorialWithFunctors.cpp b/doc/PDF/examples/AnonymousTutorialWithFunctors.cpp index fe60db3..4bcd7ad 100644 --- a/doc/PDF/examples/AnonymousTutorialWithFunctors.cpp +++ b/doc/PDF/examples/AnonymousTutorialWithFunctors.cpp @@ -40,7 +40,7 @@ namespace void on_exit(Event const&,FSM& ) {std::cout << "leaving: State1" << std::endl;} }; struct State2 : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: State2" << std::endl;} template @@ -48,7 +48,7 @@ namespace }; struct State3 : public msm::front::state<> - { + { // when stopped, the CD is loaded template void on_entry(Event const& ,FSM&) {std::cout << "entering: State3" << std::endl;} @@ -108,7 +108,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ Row < State1 , none , State2 >, Row < State2 , none , State3 , State2ToState3 >, @@ -140,7 +140,7 @@ namespace void test() { - my_machine p; + my_machine p; // needed to start the highest-level SM. This will call on_entry and mark the start of the SM // in this case it will also immediately trigger all anonymous transitions diff --git a/doc/PDF/examples/BoostCon09Full.cpp b/doc/PDF/examples/BoostCon09Full.cpp index 12c9666..f4a2d7b 100644 --- a/doc/PDF/examples/BoostCon09Full.cpp +++ b/doc/PDF/examples/BoostCon09Full.cpp @@ -67,9 +67,9 @@ namespace // Concrete FSM implementation void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;} }; struct Open : public msm::front::state<> - { - typedef mpl::vector1 flag_list; - typedef mpl::vector deferred_events; + { + typedef mpl::vector1 flag_list; + typedef mpl::vector deferred_events; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;} template @@ -79,9 +79,9 @@ namespace // Concrete FSM implementation // and using for this the non-default policy // if policy used, set_sm_ptr is needed struct Stopped : public msm::front::state - { + { // when stopped, the CD is loaded - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;} template @@ -97,7 +97,7 @@ namespace // Concrete FSM implementation struct Playing_ : public msm::front::state_machine_def { // when playing, the CD is loaded and we are in either pause or playing (duh) - typedef mpl::vector flag_list; + typedef mpl::vector flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;} template @@ -106,21 +106,21 @@ namespace // Concrete FSM implementation // The list of FSM states struct Song1 : public msm::front::state<> { - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;} }; struct Song2 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;} }; struct Song3 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;} template @@ -144,7 +144,7 @@ namespace // Concrete FSM implementation typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+---------------+------------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >, @@ -166,7 +166,7 @@ namespace // Concrete FSM implementation // the player state machine contains a state which is himself a state machine (2 of them, Playing and Paused) struct Paused : public msm::front::state<> { - typedef mpl::vector flag_list; + typedef mpl::vector flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Paused" << std::endl;} template @@ -207,7 +207,7 @@ namespace // Concrete FSM implementation void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&){std::cout << "player::stopped_again\n";} void report_error(error_found const&) {std::cout << "player::report_error\n";} void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";} // guard conditions @@ -226,7 +226,7 @@ namespace // Concrete FSM implementation // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +-------------+---------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, @@ -269,7 +269,7 @@ namespace // Concrete FSM implementation void pstate(player const& p) { - typedef player::stt Stt; + typedef player::stt Stt; typedef msm::back::generate_state_set::type all_states; static char const* state_names[mpl::size::value]; // fill the names of the states defined in the state machine diff --git a/doc/PDF/examples/CompositeTutorial.cpp b/doc/PDF/examples/CompositeTutorial.cpp index 0861d36..a2a29f8 100644 --- a/doc/PDF/examples/CompositeTutorial.cpp +++ b/doc/PDF/examples/CompositeTutorial.cpp @@ -51,7 +51,7 @@ namespace // Concrete FSM implementation void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;} }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;} template @@ -59,7 +59,7 @@ namespace // Concrete FSM implementation }; struct Stopped : public msm::front::state<> - { + { // when stopped, the CD is loaded template void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;} @@ -88,14 +88,14 @@ namespace // Concrete FSM implementation }; struct Song2 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;} }; struct Song3 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;} template @@ -111,7 +111,7 @@ namespace // Concrete FSM implementation typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >, @@ -148,14 +148,14 @@ namespace // Concrete FSM implementation void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&){std::cout << "player::stopped_again\n";} // guard conditions typedef player_ p; // makes transition table cleaner // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/PDF/examples/DirectEntryTutorial.cpp b/doc/PDF/examples/DirectEntryTutorial.cpp index a5dec53..35bf9fd 100644 --- a/doc/PDF/examples/DirectEntryTutorial.cpp +++ b/doc/PDF/examples/DirectEntryTutorial.cpp @@ -130,7 +130,7 @@ namespace // Transition table for SubFsm2 struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +--------------+-------------+------------+------------------------+----------------------+ a_row < PseudoEntry1 , event4 , SubState3 ,&SubFsm2_::entry_action >, _row < SubState2 , event6 , SubState1 >, diff --git a/doc/PDF/examples/Flags.cpp b/doc/PDF/examples/Flags.cpp index 8746398..5226bcc 100644 --- a/doc/PDF/examples/Flags.cpp +++ b/doc/PDF/examples/Flags.cpp @@ -56,8 +56,8 @@ namespace // Concrete FSM implementation void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;} }; struct Open : public msm::front::state<> - { - typedef mpl::vector1 flag_list; + { + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;} template @@ -65,9 +65,9 @@ namespace // Concrete FSM implementation }; struct Stopped : public msm::front::state<> - { + { // when stopped, the CD is loaded - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;} template @@ -80,7 +80,7 @@ namespace // Concrete FSM implementation struct Playing_ : public msm::front::state_machine_def { // when playing, the CD is loaded and we are in either pause or playing (duh) - typedef mpl::vector2 flag_list; + typedef mpl::vector2 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;} @@ -90,7 +90,7 @@ namespace // Concrete FSM implementation // The list of FSM states struct Song1 : public msm::front::state<> { - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;} template @@ -98,14 +98,14 @@ namespace // Concrete FSM implementation }; struct Song2 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;} }; struct Song3 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;} template @@ -121,7 +121,7 @@ namespace // Concrete FSM implementation typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >, @@ -143,7 +143,7 @@ namespace // Concrete FSM implementation // state not defining any entry or exit struct Paused : public msm::front::state<> { - typedef mpl::vector2 flag_list; + typedef mpl::vector2 flag_list; }; // the initial state of the player SM. Must be defined @@ -158,14 +158,14 @@ namespace // Concrete FSM implementation void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&){std::cout << "player::stopped_again\n";} // guard conditions typedef player_ p; // makes transition table cleaner // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/PDF/examples/History.cpp b/doc/PDF/examples/History.cpp index c8ef7d6..483e122 100644 --- a/doc/PDF/examples/History.cpp +++ b/doc/PDF/examples/History.cpp @@ -51,7 +51,7 @@ namespace void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;} }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;} template @@ -59,7 +59,7 @@ namespace }; struct Stopped : public msm::front::state<> - { + { // when stopped, the CD is loaded template void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;} @@ -84,14 +84,14 @@ namespace void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;} }; struct Song2 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;} }; struct Song3 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;} template @@ -107,7 +107,7 @@ namespace typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >, @@ -152,14 +152,14 @@ namespace void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&){std::cout << "player::stopped_again\n";} // guard conditions typedef player_ p; // makes transition table cleaner // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/PDF/examples/MsmComposite.cpp b/doc/PDF/examples/MsmComposite.cpp index 6186c53..556aad4 100644 --- a/doc/PDF/examples/MsmComposite.cpp +++ b/doc/PDF/examples/MsmComposite.cpp @@ -51,7 +51,7 @@ namespace test_fsm // Concrete FSM implementation void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Empty" << std::endl;*/} }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Open" << std::endl;*/} template @@ -59,7 +59,7 @@ namespace test_fsm // Concrete FSM implementation }; struct Stopped : public msm::front::state<> - { + { // when stopped, the CD is loaded template void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Stopped" << std::endl;*/} @@ -87,7 +87,7 @@ namespace test_fsm // Concrete FSM implementation typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >, @@ -126,14 +126,14 @@ namespace test_fsm // Concrete FSM implementation void pause_playback(pause const&) { } void resume_playback(end_pause const&) { } void stop_and_open(open_close const&) { } - void stopped_again(stop const&) {} + void stopped_again(stop const&){} // guard conditions typedef player_ p; // makes transition table cleaner // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/PDF/examples/MsmSimple.cpp b/doc/PDF/examples/MsmSimple.cpp index 3e438aa..f074a2f 100644 --- a/doc/PDF/examples/MsmSimple.cpp +++ b/doc/PDF/examples/MsmSimple.cpp @@ -48,7 +48,7 @@ namespace test_fsm // Concrete FSM implementation void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Empty" << std::endl;*/} }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Open" << std::endl;*/} template @@ -56,7 +56,7 @@ namespace test_fsm // Concrete FSM implementation }; struct Stopped : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Stopped" << std::endl;*/} template @@ -90,14 +90,14 @@ namespace test_fsm // Concrete FSM implementation void pause_playback(pause const&) { } void resume_playback(end_pause const&) { } void stop_and_open(open_close const&) { } - void stopped_again(stop const&) {} + void stopped_again(stop const&){} // guard conditions typedef player_ p; // makes transition table cleaner // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ _row < Stopped , play , Playing >, _row < Stopped , open_close , Open >, diff --git a/doc/PDF/examples/MsmSimpleFunctors.cpp b/doc/PDF/examples/MsmSimpleFunctors.cpp index b9626db..95c0aa6 100644 --- a/doc/PDF/examples/MsmSimpleFunctors.cpp +++ b/doc/PDF/examples/MsmSimpleFunctors.cpp @@ -50,7 +50,7 @@ namespace test_fsm // Concrete FSM implementation void on_exit(Event const&,FSM& ) {/*std::cout << "leaving: Empty" << std::endl;*/} }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Open" << std::endl;*/} template @@ -58,7 +58,7 @@ namespace test_fsm // Concrete FSM implementation }; struct Stopped : public msm::front::state<> - { + { // when stopped, the CD is loaded template void on_entry(Event const&,FSM& ) {/*std::cout << "entering: Stopped" << std::endl;*/} @@ -153,7 +153,7 @@ namespace test_fsm // Concrete FSM implementation // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ Row < Stopped , play , Playing , start_playback >, Row < Stopped , open_close , Open , open_drawer >, diff --git a/doc/PDF/examples/Orthogonal-deferred.cpp b/doc/PDF/examples/Orthogonal-deferred.cpp index 980f761..5ac35cf 100644 --- a/doc/PDF/examples/Orthogonal-deferred.cpp +++ b/doc/PDF/examples/Orthogonal-deferred.cpp @@ -61,11 +61,11 @@ namespace void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;} }; struct Open : public msm::front::state<> - { + { // if the play event arrives in this state, defer it until a state handles it or // rejects it typedef mpl::vector deferred_events; - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;} template @@ -73,9 +73,9 @@ namespace }; struct Stopped : public msm::front::state<> - { + { // when stopped, the CD is loaded - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;} template @@ -88,7 +88,7 @@ namespace struct Playing_ : public msm::front::state_machine_def { // when playing, the CD is loaded and we are in either pause or playing (duh) - typedef mpl::vector2 flag_list; + typedef mpl::vector2 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;} @@ -97,21 +97,21 @@ namespace // The list of FSM states struct Song1 : public msm::front::state<> { - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;} }; struct Song2 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;} }; struct Song3 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;} template @@ -127,7 +127,7 @@ namespace typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >, @@ -149,7 +149,7 @@ namespace // state not defining any entry or exit struct Paused : public msm::front::state<> { - typedef mpl::vector2 flag_list; + typedef mpl::vector2 flag_list; }; struct AllOk : public msm::front::state<> { @@ -180,7 +180,7 @@ namespace void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&){std::cout << "player::stopped_again\n";} void report_error(error_found const&) {std::cout << "player::report_error\n";} void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";} @@ -190,7 +190,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/PDF/examples/Orthogonal-deferred2.cpp b/doc/PDF/examples/Orthogonal-deferred2.cpp index 6c77e3b..e5fa6c7 100644 --- a/doc/PDF/examples/Orthogonal-deferred2.cpp +++ b/doc/PDF/examples/Orthogonal-deferred2.cpp @@ -63,8 +63,8 @@ namespace void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;} }; struct Open : public msm::front::state<> - { - typedef mpl::vector1 flag_list; + { + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;} template @@ -72,9 +72,9 @@ namespace }; struct Stopped : public msm::front::state<> - { + { // when stopped, the CD is loaded - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;} template @@ -87,7 +87,7 @@ namespace struct Playing_ : public msm::front::state_machine_def { // when playing, the CD is loaded and we are in either pause or playing (duh) - typedef mpl::vector2 flag_list; + typedef mpl::vector2 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;} @@ -96,21 +96,21 @@ namespace // The list of FSM states struct Song1 : public msm::front::state<> { - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: First Song" << std::endl;} }; struct Song2 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;} }; struct Song3 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;} template @@ -126,7 +126,7 @@ namespace typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >, @@ -148,7 +148,7 @@ namespace // state not defining any entry or exit struct Paused : public msm::front::state<> { - typedef mpl::vector2 flag_list; + typedef mpl::vector2 flag_list; }; struct AllOk : public msm::front::state<> { @@ -179,7 +179,7 @@ namespace void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&){std::cout << "player::stopped_again\n";} void report_error(error_found const&) {std::cout << "player::report_error\n";} void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";} @@ -189,7 +189,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/PDF/examples/ParsingDigits.cpp b/doc/PDF/examples/ParsingDigits.cpp index 055afe0..6dadb4d 100644 --- a/doc/PDF/examples/ParsingDigits.cpp +++ b/doc/PDF/examples/ParsingDigits.cpp @@ -216,7 +216,7 @@ namespace test_fsm // Concrete FSM implementation // Transition table for parsing_ struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +-------------+-------------------+---------+---------------------+----------------------+ Row < Waiting , digit , Digit1 >, Row < Digit1 , digit , Digit2 >, diff --git a/doc/PDF/examples/SC Composite.cpp b/doc/PDF/examples/SC Composite.cpp index 23904a7..7a98fda 100644 --- a/doc/PDF/examples/SC Composite.cpp +++ b/doc/PDF/examples/SC Composite.cpp @@ -51,7 +51,7 @@ namespace test_sc void store_cd_info(cd_detected const& cd) {/*std::cout << "player::store_cd_info\n";*/ } void close_drawer(open_close const&) { /*std::cout << "player::close_drawer\n";*/ } void start_playback(play const&) { /*std::cout << "player::start_playback\n";*/ } - void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/} + void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/} void stop_playback(stop const&) { /*std::cout << "player::stop_playback\n";*/ } void pause_playback(pause const&) { /*std::cout << "player::pause_playback\n"; */} void stop_and_open(open_close const&) { /*std::cout << "player::stop_and_open\n";*/ } diff --git a/doc/PDF/examples/SC Simple.cpp b/doc/PDF/examples/SC Simple.cpp index 2cdde8a..0d1dddb 100644 --- a/doc/PDF/examples/SC Simple.cpp +++ b/doc/PDF/examples/SC Simple.cpp @@ -50,7 +50,7 @@ namespace test_sc void store_cd_info(cd_detected const& cd) {/*std::cout << "player::store_cd_info\n";*/ } void close_drawer(open_close const&) { /*std::cout << "player::close_drawer\n";*/ } void start_playback(play const&) { /*std::cout << "player::start_playback\n";*/ } - void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/} + void stopped_again(stop const&) {/*std::cout << "player::stopped_again\n";*/} void stop_playback(stop const&) { /*std::cout << "player::stop_playback\n";*/ } void pause_playback(pause const&) { /*std::cout << "player::pause_playback\n"; */} void stop_and_open(open_close const&) { /*std::cout << "player::stop_and_open\n";*/ } diff --git a/doc/PDF/examples/SM-2Arg.cpp b/doc/PDF/examples/SM-2Arg.cpp index 99f38bf..58efb79 100644 --- a/doc/PDF/examples/SM-2Arg.cpp +++ b/doc/PDF/examples/SM-2Arg.cpp @@ -91,8 +91,8 @@ namespace // Concrete FSM implementation } }; struct Open : public msm::front::state - { - typedef mpl::vector1 flag_list; + { + typedef mpl::vector1 flag_list; typedef mpl::vector deferred_events; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Open" << std::endl;} @@ -107,9 +107,9 @@ namespace // Concrete FSM implementation // and using for this the non-default policy // if policy used, set_sm_ptr is needed struct Stopped : public msm::front::state - { + { // when stopped, the CD is loaded - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Stopped" << std::endl;} template @@ -123,7 +123,7 @@ namespace // Concrete FSM implementation struct Playing_ : public msm::front::state_machine_def { // when playing, the CD is loaded and we are in either pause or playing (duh) - typedef mpl::vector2 flag_list; + typedef mpl::vector2 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Playing" << std::endl;} template @@ -138,7 +138,7 @@ namespace // Concrete FSM implementation // so we have a SM containing a SM containing a SM struct Song1_ : public msm::front::state_machine_def { - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "starting: First song" << std::endl;} template @@ -148,14 +148,14 @@ namespace // Concrete FSM implementation vis.visit_state(this,i); } struct LightOn : public msm::front::state - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: LightOn" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: LightOn" << std::endl;} }; struct LightOff : public msm::front::state - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: LightOff" << std::endl;} template @@ -170,7 +170,7 @@ namespace // Concrete FSM implementation typedef Song1_ s; // makes transition table cleaner // Transition table for Song1 struct transition_table : mpl::vector1< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < LightOn , ThreeSec , LightOff, &s::turn_light_off > // +---------+-------------+---------+---------------------+----------------------+ @@ -186,14 +186,14 @@ namespace // Concrete FSM implementation typedef msm::back::state_machine Song1; struct Song2 : public msm::front::state - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;} }; struct Song3 : public msm::front::state - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;} template @@ -209,7 +209,7 @@ namespace // Concrete FSM implementation typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong, Song1 , &pl::start_prev_song >, @@ -230,7 +230,7 @@ namespace // Concrete FSM implementation // the player state machine contains a state which is himself a state machine (2 of them, Playing and Paused) struct Paused_ : public msm::front::state_machine_def { - typedef mpl::vector2 flag_list; + typedef mpl::vector2 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "entering: Paused" << std::endl;} template @@ -238,14 +238,14 @@ namespace // Concrete FSM implementation // The list of FSM states struct StartBlinking : public msm::front::state - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: StartBlinking" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: StartBlinking" << std::endl;} }; struct StopBlinking : public msm::front::state - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: StopBlinking" << std::endl;} template @@ -261,7 +261,7 @@ namespace // Concrete FSM implementation typedef Paused_ pa; // makes transition table cleaner // Transition table struct transition_table : mpl::vector2< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------------+-------------+--------------+---------------------+----------------------+ a_row < StartBlinking , TenSec , StopBlinking , &pa::stop_blinking >, a_row < StopBlinking , TenSec , StartBlinking , &pa::start_blinking > @@ -315,7 +315,7 @@ namespace // Concrete FSM implementation void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&){std::cout << "player::stopped_again\n";} void start_sleep(go_sleep const&) { } void report_error(error_found const&) {std::cout << "player::report_error\n";} void report_end_error(end_error const&) {std::cout << "player::report_end_error\n";} @@ -326,7 +326,7 @@ namespace // Concrete FSM implementation // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/PDF/examples/SimpleTutorial.cpp b/doc/PDF/examples/SimpleTutorial.cpp index cae120a..8c7a006 100644 --- a/doc/PDF/examples/SimpleTutorial.cpp +++ b/doc/PDF/examples/SimpleTutorial.cpp @@ -56,7 +56,7 @@ namespace void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;} }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;} template @@ -65,7 +65,7 @@ namespace // sm_ptr still supported but deprecated as functors are a much better way to do the same thing struct Stopped : public msm::front::state - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;} template @@ -102,7 +102,7 @@ namespace void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&){std::cout << "player::stopped_again\n";} // guard conditions bool good_disk_format(cd_detected const& evt) { @@ -125,7 +125,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/PDF/examples/SimpleTutorial2.cpp b/doc/PDF/examples/SimpleTutorial2.cpp index b499d5f..e1daf0b 100644 --- a/doc/PDF/examples/SimpleTutorial2.cpp +++ b/doc/PDF/examples/SimpleTutorial2.cpp @@ -66,7 +66,7 @@ namespace } }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;} template @@ -77,7 +77,7 @@ namespace // sm_ptr still supported but deprecated as functors are a much better way to do the same thing struct Stopped : public msm::front::state - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;} template @@ -132,7 +132,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action/Guard + // Start Event Next Action/Guard // +---------+-------------+---------+---------------------+----------------------+ a_row2 < Stopped , play , Playing , Stopped , &Stopped::start_playback >, a_row2 < Stopped , open_close , Open , Empty , &Empty::open_drawer >, diff --git a/doc/PDF/examples/SimpleTutorialInternal.cpp b/doc/PDF/examples/SimpleTutorialInternal.cpp index de490e6..49b71df 100644 --- a/doc/PDF/examples/SimpleTutorialInternal.cpp +++ b/doc/PDF/examples/SimpleTutorialInternal.cpp @@ -59,7 +59,7 @@ namespace void on_exit(Event const&,FSM& ) {std::cout << "leaving: Empty" << std::endl;} }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;} template @@ -68,7 +68,7 @@ namespace // sm_ptr still supported but deprecated as functors are a much better way to do the same thing struct Stopped : public msm::front::state - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;} template @@ -105,7 +105,7 @@ namespace void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} // guard conditions bool good_disk_format(cd_detected const& evt) { @@ -146,7 +146,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/PDF/examples/SimpleTutorialInternal2.cpp b/doc/PDF/examples/SimpleTutorialInternal2.cpp index e4b28dc..f123fdb 100644 --- a/doc/PDF/examples/SimpleTutorialInternal2.cpp +++ b/doc/PDF/examples/SimpleTutorialInternal2.cpp @@ -83,13 +83,13 @@ namespace // Transition table for Empty struct internal_transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard Internal < cd_detected , internal_action_fct ,internal_guard_fct > // +---------+-------------+---------+---------------------+----------------------+ > {}; }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;} template @@ -98,7 +98,7 @@ namespace // sm_ptr still supported but deprecated as functors are a much better way to do the same thing struct Stopped : public msm::front::state - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;} template @@ -135,7 +135,7 @@ namespace void pause_playback(pause const&) { std::cout << "player::pause_playback\n"; } void resume_playback(end_pause const&) { std::cout << "player::resume_playback\n"; } void stop_and_open(open_close const&) { std::cout << "player::stop_and_open\n"; } - void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} + void stopped_again(stop const&) {std::cout << "player::stopped_again\n";} // guard conditions bool good_disk_format(cd_detected const& evt) { @@ -152,7 +152,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/PDF/examples/SimpleTutorialInternalFunctors.cpp b/doc/PDF/examples/SimpleTutorialInternalFunctors.cpp index 5b462a8..77f08da 100644 --- a/doc/PDF/examples/SimpleTutorialInternalFunctors.cpp +++ b/doc/PDF/examples/SimpleTutorialInternalFunctors.cpp @@ -81,13 +81,13 @@ namespace }; // Transition table for Empty struct internal_transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard Internal < cd_detected , internal_action_fct ,internal_guard_fct > // +---------+-------------+---------+---------------------+----------------------+ > {}; }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;} template @@ -95,7 +95,7 @@ namespace }; struct Stopped : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;} template @@ -244,7 +244,7 @@ namespace }; // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------------+----------------------+ Row < Stopped , play , Playing , ActionSequence_ - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;} template @@ -74,7 +74,7 @@ namespace // Concrete FSM implementation }; struct Stopped : public msm::front::state<> - { + { // when stopped, the CD is loaded template void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;} @@ -223,7 +223,7 @@ namespace // Concrete FSM implementation // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------------+----------------------+ Row < Stopped , play , Playing , ActionSequence_ , Internal < cd_detected , internal_action_fct ,internal_guard_fct >, a_internal< to_ignore , Empty,&Empty::internal_action > @@ -127,7 +127,7 @@ namespace > {}; }; struct Open : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;} template @@ -135,7 +135,7 @@ namespace }; struct Stopped : public msm::front::state<> - { + { template void on_entry(Event const& ,FSM&) {std::cout << "entering: Stopped" << std::endl;} template @@ -160,14 +160,14 @@ namespace }; struct Song2 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Second song" << std::endl;} template void on_exit(Event const&,FSM& ) {std::cout << "finishing: Second Song" << std::endl;} }; struct Song3 : public msm::front::state<> - { + { template void on_entry(Event const&,FSM& ) {std::cout << "starting: Third song" << std::endl;} template @@ -208,7 +208,7 @@ namespace typedef Playing_ pl; // makes transition table cleaner // Transition table for Playing struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+---------------+---------+---------------------+----------------------+ a_row < Song1 , NextSong , Song2 , &pl::start_next_song >, a_row < Song2 , PreviousSong , Song1 , &pl::start_prev_song >, @@ -220,7 +220,7 @@ namespace // +---------+----------------+---------+---------------------+-----------------------+ struct internal_transition_table : mpl::vector< // normal internal transition - // Start Event Next Action Guard + // Start Event Next Action Guard Internal < internal_event , playing_internal_fct,playing_internal_guard >, // conflict between internal and the external defined above Internal < PreviousSong , playing_internal_fct,playing_false_guard >, @@ -252,7 +252,7 @@ namespace // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------+-------------+---------+---------------------+----------------------+ a_row < Stopped , play , Playing , &p::start_playback >, a_row < Stopped , open_close , Open , &p::open_drawer >, diff --git a/doc/PDF/examples/char_event_dispatcher.hpp b/doc/PDF/examples/char_event_dispatcher.hpp index 4cfd914..023bb0d 100644 --- a/doc/PDF/examples/char_event_dispatcher.hpp +++ b/doc/PDF/examples/char_event_dispatcher.hpp @@ -89,4 +89,4 @@ struct char_event_dispatcher }; }}} // boost::msm::back -#endif //BOOST_MSM_CHAR_EVENT_DISPATCHER_HPP \ No newline at end of file +#endif //BOOST_MSM_CHAR_EVENT_DISPATCHER_HPP diff --git a/doc/PDF/examples/distributed_table/Empty.hpp b/doc/PDF/examples/distributed_table/Empty.hpp index 37b898a..00dd0e5 100644 --- a/doc/PDF/examples/distributed_table/Empty.hpp +++ b/doc/PDF/examples/distributed_table/Empty.hpp @@ -33,11 +33,11 @@ struct Empty : public msm::front::state<> void open_drawer(open_close const&); struct internal_transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard //+-------------+---------+-------------+---------+---------------------------+----------------------+ msm::front::a_row2 < Empty , open_close , Open , Empty,&Empty::open_drawer > //+-------------+---------+-------------+---------+---------------------------+----------------------+ > {}; }; -#endif \ No newline at end of file +#endif diff --git a/doc/PDF/examples/distributed_table/Events.hpp b/doc/PDF/examples/distributed_table/Events.hpp index f641bd0..023216b 100644 --- a/doc/PDF/examples/distributed_table/Events.hpp +++ b/doc/PDF/examples/distributed_table/Events.hpp @@ -36,4 +36,4 @@ struct cd_detected }; -#endif \ No newline at end of file +#endif diff --git a/doc/PDF/examples/distributed_table/Open.hpp b/doc/PDF/examples/distributed_table/Open.hpp index c0b965c..03a8e8f 100644 --- a/doc/PDF/examples/distributed_table/Open.hpp +++ b/doc/PDF/examples/distributed_table/Open.hpp @@ -26,7 +26,7 @@ namespace mpl = boost::mpl; using namespace msm::front; struct Open : public msm::front::state<> -{ +{ template void on_entry(Event const& ,FSM&) {std::cout << "entering: Open" << std::endl;} template @@ -34,11 +34,11 @@ struct Open : public msm::front::state<> void close_drawer(open_close const&); struct internal_transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard //+-------------+---------+-------------+---------+---------------------------+----------------------+ msm::front::a_row2 < Open , open_close , Empty , Open,&Open::close_drawer > //+-------------+---------+-------------+---------+---------------------------+----------------------+ > {}; }; -#endif \ No newline at end of file +#endif diff --git a/doc/PDF/examples/iPodSearch.cpp b/doc/PDF/examples/iPodSearch.cpp index 565fa73..29aa413 100644 --- a/doc/PDF/examples/iPodSearch.cpp +++ b/doc/PDF/examples/iPodSearch.cpp @@ -133,7 +133,7 @@ namespace // Concrete FSM implementation // Transition table for player struct transition_table : mpl::vector4< - // Start Event Next Action Guard + // Start Event Next Action Guard // +-----------+------------------+------------+---------------------+----------------------+ _row < MyForeach , OneSong , MyFind >, _row < MyFind , NotFound , MyForeach >, diff --git a/doc/PDF/examples/iPod_distributed/MenuMode.hpp b/doc/PDF/examples/iPod_distributed/MenuMode.hpp index a360226..cad441c 100644 --- a/doc/PDF/examples/iPod_distributed/MenuMode.hpp +++ b/doc/PDF/examples/iPod_distributed/MenuMode.hpp @@ -24,7 +24,7 @@ namespace msm = boost::msm; struct MenuMode_ : public msm::front::state_machine_def { - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; struct WaitingForSongChoice : public msm::front::state<> { template @@ -50,7 +50,7 @@ struct MenuMode_ : public msm::front::state_machine_def typedef MenuMode_ fsm; // makes transition table cleaner // Transition table for player struct transition_table : mpl::vector2< - // Start Event Next Action Guard + // Start Event Next Action Guard // +---------------------+------------------+-------------------+---------------------+----------------------+ _row < WaitingForSongChoice , MenuMiddleButton , StartCurrentSong >, _row < StartCurrentSong , SelectSong , MenuExit > diff --git a/doc/PDF/examples/iPod_distributed/PlayingMode.hpp b/doc/PDF/examples/iPod_distributed/PlayingMode.hpp index 520d1e1..1328041 100644 --- a/doc/PDF/examples/iPod_distributed/PlayingMode.hpp +++ b/doc/PDF/examples/iPod_distributed/PlayingMode.hpp @@ -110,7 +110,7 @@ struct PlayingMode_ : public msm::front::state_machine_def }; struct SetPosition : public msm::front::state<> { - typedef mpl::vector1 flag_list; + typedef mpl::vector1 flag_list; template void on_entry(Event const&,FSM& ) {std::cout << "starting: PlayingMode::SetPosition" << std::endl;} template @@ -209,7 +209,7 @@ struct PlayingMode_ : public msm::front::state_machine_def typedef PlayingMode_ fsm; // makes transition table cleaner // Transition table for player struct transition_table : mpl::vector19< - // Start Event Next Action Guard + // Start Event Next Action Guard // +--------------------+---------------------+--------------------+--------------------------+----------------------+ _row < Playing , PlayPause , Paused >, _row < Playing , Off , Paused >, @@ -223,7 +223,7 @@ struct PlayingMode_ : public msm::front::state_machine_def // +--------------------+---------------------+--------------------+--------------------------+----------------------+ _row < WaitingForEnd , EndPlay , PlayingExit >, // +--------------------+---------------------+--------------------+--------------------------+----------------------+ - msm::front::Row < NoForward , EastPressed , ForwardPressed , msm::front::none , fast_fwd_ok >, + msm::front::Row < NoForward , EastPressed , ForwardPressed , msm::front::none , fast_fwd_ok >, msm::front::Row < ForwardPressed , EastReleased , NoForward , send_NextSong , msm::front::none >, a_row < ForwardPressed , ForwardTimer , FastForward , &fsm::do_fast_forward >, a_row < FastForward , ForwardTimer , FastForward , &fsm::do_fast_forward >, diff --git a/doc/PDF/examples/iPod_distributed/iPod.cpp b/doc/PDF/examples/iPod_distributed/iPod.cpp index 3cc2c1e..26f2e3e 100644 --- a/doc/PDF/examples/iPod_distributed/iPod.cpp +++ b/doc/PDF/examples/iPod_distributed/iPod.cpp @@ -144,7 +144,7 @@ namespace // Concrete FSM implementation // Transition table for player struct transition_table : mpl::vector< - // Start Event Next Action Guard + // Start Event Next Action Guard // +-------------------+---------------+-------------------+--------------------------------+----------------------+ _row < NotHolding , Hold , Holding >, _row < Holding , NoHold , NotHolding >,