Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51278 - in sandbox/msm: boost/msm libs/msm/doc
From: christophe.j.henry_at_[hidden]
Date: 2009-02-16 18:05:39


Author: chenry
Date: 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
New Revision: 51278
URL: http://svn.boost.org/trac/boost/changeset/51278

Log:
doc update + minor change (SMPtr policy replaced by sm_ptr)
Text files modified:
   sandbox/msm/boost/msm/states.hpp | 22 ++++++++++++++++------
   sandbox/msm/libs/msm/doc/CompositeTutorial.cpp | 4 ----
   sandbox/msm/libs/msm/doc/DirectEntryTutorial.cpp | 4 ----
   sandbox/msm/libs/msm/doc/Flags.cpp | 4 ----
   sandbox/msm/libs/msm/doc/HarelWithEntry.cpp | 4 ----
   sandbox/msm/libs/msm/doc/HarelWithoutEntry.cpp | 6 ------
   sandbox/msm/libs/msm/doc/HarelWithoutEntryNoTemplateSM.cpp | 6 ------
   sandbox/msm/libs/msm/doc/History.cpp | 4 ----
   sandbox/msm/libs/msm/doc/Orthogonal-deferred.cpp | 4 ----
   sandbox/msm/libs/msm/doc/SC | 4 ----
   sandbox/msm/libs/msm/doc/SC | 2 --
   sandbox/msm/libs/msm/doc/SM-0arg.cpp | 8 --------
   sandbox/msm/libs/msm/doc/SM-1arg.cpp | 8 --------
   sandbox/msm/libs/msm/doc/SM-3arg.cpp | 8 --------
   sandbox/msm/libs/msm/doc/SM.cpp | 33 +++++++++++++++++++++++++--------
   sandbox/msm/libs/msm/doc/SimpleTutorial.cpp | 2 --
   sandbox/msm/libs/msm/doc/index.html | 20 +++-----------------
   17 files changed, 44 insertions(+), 99 deletions(-)

Modified: sandbox/msm/boost/msm/states.hpp
==============================================================================
--- sandbox/msm/boost/msm/states.hpp (original)
+++ sandbox/msm/boost/msm/states.hpp 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -51,7 +51,17 @@
     template <class Event>
     void on_exit(Event const& ){}
 };
-
+struct no_sm_ptr
+{
+ // tags
+ typedef ::boost::mpl::bool_<false> needs_sm;
+};
+struct sm_ptr
+{
+ // tags
+ typedef ::boost::mpl::bool_<true> needs_sm;
+};
+// kept for backward compatibility
 struct NoSMPtr
 {
     // tags
@@ -65,7 +75,7 @@
 
 // provides the typedefs and interface. Concrete states derive from it.
 // template argument: pointer-to-fsm policy
-template<class BASE = default_base_state,class SMPtrPolicy = NoSMPtr>
+template<class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
 struct state : public state_base<BASE>, SMPtrPolicy
 {
     // tags
@@ -83,7 +93,7 @@
 
 // terminate state simply defines the TerminateFlag flag
 // template argument: pointer-to-fsm policy
-template<class BASE = default_base_state,class SMPtrPolicy = NoSMPtr>
+template<class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
 struct terminate_state : public state_base<BASE>, SMPtrPolicy
 {
     // tags
@@ -95,7 +105,7 @@
 // terminate state simply defines the InterruptedFlag and EndInterruptFlag<EndInterruptEvent> flags
 // template argument: event which ends the interrupt
 // template argument: pointer-to-fsm policy
-template <class EndInterruptEvent,class BASE = default_base_state,class SMPtrPolicy = NoSMPtr>
+template <class EndInterruptEvent,class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
 struct interrupt_state : public state_base<BASE>, SMPtrPolicy
 {
     // tags
@@ -128,7 +138,7 @@
 // template argument: containing composite
 // template argument: zone index of this state
 // template argument: pointer-to-fsm policy
-template<class Composite,int ZoneIndex=-1,class BASE = default_base_state,class SMPtrPolicy = NoSMPtr>
+template<class Composite,int ZoneIndex=-1,class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
 struct entry_pseudo_state
     : public state_base<BASE>, explicit_entry<Composite,ZoneIndex> ,SMPtrPolicy
 {
@@ -144,7 +154,7 @@
 // template argument: containing composite
 // template argument: event to forward
 // template argument: pointer-to-fsm policy
-template<class Composite,class Event,class BASE = default_base_state,class SMPtrPolicy = NoSMPtr>
+template<class Composite,class Event,class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
 struct exit_pseudo_state : public state_base<BASE> , SMPtrPolicy
 {
     // tags

Modified: sandbox/msm/libs/msm/doc/CompositeTutorial.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/CompositeTutorial.cpp (original)
+++ sandbox/msm/libs/msm/doc/CompositeTutorial.cpp 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -100,8 +100,6 @@
             void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
             // guard conditions
 
- // friend definition needed.
- friend class state_machine<Playing>;
             typedef Playing pl; // makes transition table cleaner
             // Transition table for Playing
             struct transition_table : mpl::vector4<
@@ -155,8 +153,6 @@
 #ifdef __MWERKS__
     private:
 #endif
- // friend definition needed.
- friend class state_machine<player>;
         typedef player p; // makes transition table cleaner
 
         // Transition table for player

Modified: sandbox/msm/libs/msm/doc/DirectEntryTutorial.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/DirectEntryTutorial.cpp (original)
+++ sandbox/msm/libs/msm/doc/DirectEntryTutorial.cpp 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -111,8 +111,6 @@
             typedef mpl::vector<SubState1,SubState1b> initial_state;
 
             typedef mpl::vector<SubState2b> explicit_creation;
- // friend definition needed.
- friend class state_machine<SubFsm2>;
 
             // Transition table for SubFsm2
             //TODO should not be necessary
@@ -146,8 +144,6 @@
 #ifdef __MWERKS__
     private:
 #endif
- // friend definition needed.
- friend class state_machine<Fsm>;
 
         // Transition table for Fsm
         struct transition_table : mpl::vector<

Modified: sandbox/msm/libs/msm/doc/Flags.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/Flags.cpp (original)
+++ sandbox/msm/libs/msm/doc/Flags.cpp 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -110,8 +110,6 @@
             void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
             // guard conditions
 
- // friend definition needed.
- friend class state_machine<Playing>;
             typedef Playing pl; // makes transition table cleaner
             // Transition table for Playing
             struct transition_table : mpl::vector4<
@@ -166,8 +164,6 @@
 #ifdef __MWERKS__
     private:
 #endif
- // friend definition needed.
- friend class state_machine<player>;
         typedef player p; // makes transition table cleaner
 
         // Transition table for player

Modified: sandbox/msm/libs/msm/doc/HarelWithEntry.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/HarelWithEntry.cpp (original)
+++ sandbox/msm/libs/msm/doc/HarelWithEntry.cpp 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -47,8 +47,6 @@
                 void on_exit(Event const& ) {std::cout << "Leaving BothBeep"<< std::endl;}
             };
 
- // friend definition needed.
- friend class state_machine<AlarmBeeps>;
             // the initial state of the AlarmBeeps SM. Must be defined. Will not be used as we use only explicit entries
             typedef mpl::vector< Alarm1Beeps > initial_state;
             // as we have no transition table, we need to create the states explicitly
@@ -57,8 +55,6 @@
             // Transition table for AlarmBeeps. Can be empty as no transition defined
             struct transition_table : mpl::vector<> {};
         };
- // friend definition needed.
- friend class state_machine<Clock>;
         // the initial state of the Clock SM. Must be defined
         typedef Displays initial_state;
         // Transition table for Clock

Modified: sandbox/msm/libs/msm/doc/HarelWithoutEntry.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/HarelWithoutEntry.cpp (original)
+++ sandbox/msm/libs/msm/doc/HarelWithoutEntry.cpp 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -42,8 +42,6 @@
                     template <class Event>
                     void on_entry(Event const& ) {std::cout << "Beeping alarm:"<< Index << std::endl;}
                 };
- // friend definition needed.
- friend class state_machine<Alarm<Index> >;
                 typedef Alarm<Index> A; // makes transition table cleaner
                 // the initial state of the AlarmBeeps SM. Must be defined
                 typedef NoBeep initial_state;
@@ -62,16 +60,12 @@
> {};
             };
 
- // friend definition needed.
- friend class state_machine<AlarmBeeps>;
             // the initial state of the AlarmBeeps SM. Must be defined
             typedef mpl::vector<Alarm<1>,Alarm<2> > initial_state;
 
             // Transition table for AlarmBeeps. Can be empty as no transition defined
             struct transition_table : mpl::vector<> {};
         };
- // friend definition needed.
- friend class state_machine<Clock>;
         // the initial state of the Clock SM. Must be defined
         typedef Displays initial_state;
         // Transition table for Clock

Modified: sandbox/msm/libs/msm/doc/HarelWithoutEntryNoTemplateSM.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/HarelWithoutEntryNoTemplateSM.cpp (original)
+++ sandbox/msm/libs/msm/doc/HarelWithoutEntryNoTemplateSM.cpp 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -34,8 +34,6 @@
                 AlarmImpl(int index):Index(index){}
                 struct NoBeep : public state<> {};
                 struct Beeps : public state<> {};
- // friend definition needed.
- friend class state_machine<AlarmImpl>;
                 typedef AlarmImpl A; // makes transition table cleaner
                 // the initial state of the AlarmBeeps SM. Must be defined
                 typedef NoBeep initial_state;
@@ -67,16 +65,12 @@
                 Alarm2():AlarmImpl(2){}
             };
 
- // friend definition needed.
- friend class state_machine<AlarmBeeps>;
             // the initial state of the AlarmBeeps SM. Must be defined
             typedef mpl::vector<Alarm1,Alarm2 > initial_state;
 
             // Transition table for AlarmBeeps. Can be empty as no transition defined
             struct transition_table : mpl::vector<> {};
         };
- // friend definition needed.
- friend class state_machine<Clock>;
         // the initial state of the Clock SM. Must be defined
         typedef Displays initial_state;
         // Transition table for Clock

Modified: sandbox/msm/libs/msm/doc/History.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/History.cpp (original)
+++ sandbox/msm/libs/msm/doc/History.cpp 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -100,8 +100,6 @@
             void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
             // guard conditions
 
- // friend definition needed.
- friend class state_machine<Playing>;
             typedef Playing pl; // makes transition table cleaner
             // Transition table for Playing
             struct transition_table : mpl::vector4<
@@ -159,8 +157,6 @@
 #ifdef __MWERKS__
     private:
 #endif
- // friend definition needed.
- friend class state_machine<player>;
         typedef player p; // makes transition table cleaner
 
         // Transition table for player

Modified: sandbox/msm/libs/msm/doc/Orthogonal-deferred.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/Orthogonal-deferred.cpp (original)
+++ sandbox/msm/libs/msm/doc/Orthogonal-deferred.cpp 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -116,8 +116,6 @@
             void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
             // guard conditions
 
- // friend definition needed.
- friend class state_machine<Playing>;
             typedef Playing pl; // makes transition table cleaner
             // Transition table for Playing
             struct transition_table : mpl::vector4<
@@ -189,8 +187,6 @@
 #ifdef __MWERKS__
     private:
 #endif
- // friend definition needed.
- friend class state_machine<player>;
         typedef player p; // makes transition table cleaner
 
         // Transition table for player

Modified: sandbox/msm/libs/msm/doc/SC Composite.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/SC Composite.cpp (original)
+++ sandbox/msm/libs/msm/doc/SC Composite.cpp 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -202,8 +202,6 @@
             void start_prev_song(PreviousSong const&) { /*std::cout << "Playing::start_prev_song\n"; */}
             // guard conditions
 
- // friend definition needed.
- friend class state_machine<Playing>;
             typedef Playing pl; // makes transition table cleaner
             // Transition table for Playing
             struct transition_table : mpl::vector4<
@@ -255,8 +253,6 @@
 #ifdef __MWERKS__
     private:
 #endif
- // friend definition needed.
- friend class state_machine<player>;
         typedef player p; // makes transition table cleaner
 
         // Transition table for player

Modified: sandbox/msm/libs/msm/doc/SC Simple.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/SC Simple.cpp (original)
+++ sandbox/msm/libs/msm/doc/SC Simple.cpp 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -188,8 +188,6 @@
 #ifdef __MWERKS__
     private:
 #endif
- // friend definition needed.
- friend class state_machine<player>;
         typedef player p; // makes transition table cleaner
 
         // Transition table for player

Modified: sandbox/msm/libs/msm/doc/SM-0arg.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/SM-0arg.cpp (original)
+++ sandbox/msm/libs/msm/doc/SM-0arg.cpp 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -152,8 +152,6 @@
                 void turn_light_off(ThreeSec const&) { std::cout << "3s off::turn light off\n"; }
                 // guard conditions
 
- // friend definition needed.
- friend class state_machine<Song1>;
                 typedef Song1 s; // makes transition table cleaner
                 // Transition table for Song1
                 struct transition_table : mpl::vector1<
@@ -193,8 +191,6 @@
             void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
             // guard conditions
 
- // friend definition needed.
- friend class state_machine<Playing>;
             typedef Playing pl; // makes transition table cleaner
             // Transition table for Playing
             struct transition_table : mpl::vector4<
@@ -246,8 +242,6 @@
             void stop_blinking(TenSec const&) { std::cout << "Paused::stop_blinking\n"; }
             // guard conditions
 
- // friend definition needed.
- friend class state_machine<Paused>;
             typedef Paused pa; // makes transition table cleaner
             // Transition table
             struct transition_table : mpl::vector2<
@@ -315,8 +309,6 @@
 #ifdef __MWERKS__
     private:
 #endif
- // friend definition needed.
- friend class state_machine<player>;
         typedef player p; // makes transition table cleaner
 
         // Transition table for player

Modified: sandbox/msm/libs/msm/doc/SM-1arg.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/SM-1arg.cpp (original)
+++ sandbox/msm/libs/msm/doc/SM-1arg.cpp 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -161,8 +161,6 @@
                 void turn_light_off(ThreeSec const&) { std::cout << "3s off::turn light off\n"; }
                 // guard conditions
 
- // friend definition needed.
- friend class state_machine<Song1>;
                 typedef Song1 s; // makes transition table cleaner
                 // Transition table for Song1
                 struct transition_table : mpl::vector1<
@@ -202,8 +200,6 @@
             void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
             // guard conditions
 
- // friend definition needed.
- friend class state_machine<Playing>;
             typedef Playing pl; // makes transition table cleaner
             // Transition table for Playing
             struct transition_table : mpl::vector4<
@@ -255,8 +251,6 @@
             void stop_blinking(TenSec const&) { std::cout << "Paused::stop_blinking\n"; }
             // guard conditions
 
- // friend definition needed.
- friend class state_machine<Paused>;
             typedef Paused pa; // makes transition table cleaner
             // Transition table
             struct transition_table : mpl::vector2<
@@ -324,8 +318,6 @@
 #ifdef __MWERKS__
     private:
 #endif
- // friend definition needed.
- friend class state_machine<player>;
         typedef player p; // makes transition table cleaner
 
         // Transition table for player

Modified: sandbox/msm/libs/msm/doc/SM-3arg.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/SM-3arg.cpp (original)
+++ sandbox/msm/libs/msm/doc/SM-3arg.cpp 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -164,8 +164,6 @@
                 void turn_light_off(ThreeSec const&) { std::cout << "3s off::turn light off\n"; }
                 // guard conditions
 
- // friend definition needed.
- friend class state_machine<Song1>;
                 typedef Song1 s; // makes transition table cleaner
                 // Transition table for Song1
                 struct transition_table : mpl::vector1<
@@ -205,8 +203,6 @@
             void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
             // guard conditions
 
- // friend definition needed.
- friend class state_machine<Playing>;
             typedef Playing pl; // makes transition table cleaner
             // Transition table for Playing
             struct transition_table : mpl::vector4<
@@ -258,8 +254,6 @@
             void stop_blinking(TenSec const&) { std::cout << "Paused::stop_blinking\n"; }
             // guard conditions
 
- // friend definition needed.
- friend class state_machine<Paused>;
             typedef Paused pa; // makes transition table cleaner
             // Transition table
             struct transition_table : mpl::vector2<
@@ -327,8 +321,6 @@
 #ifdef __MWERKS__
     private:
 #endif
- // friend definition needed.
- friend class state_machine<player>;
         typedef player p; // makes transition table cleaner
 
         // Transition table for player

Modified: sandbox/msm/libs/msm/doc/SM.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/SM.cpp (original)
+++ sandbox/msm/libs/msm/doc/SM.cpp 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -152,8 +152,6 @@
                 void turn_light_off(ThreeSec const&) { std::cout << "3s off::turn light off\n"; }
                 // guard conditions
 
- // friend definition needed.
- friend class state_machine<Song1>;
                 typedef Song1 s; // makes transition table cleaner
                 // Transition table for Song1
                 struct transition_table : mpl::vector1<
@@ -193,8 +191,6 @@
             void start_prev_song(PreviousSong const&) { std::cout << "Playing::start_prev_song\n"; }
             // guard conditions
 
- // friend definition needed.
- friend class state_machine<Playing>;
             typedef Playing pl; // makes transition table cleaner
             // Transition table for Playing
             struct transition_table : mpl::vector4<
@@ -246,8 +242,6 @@
             void stop_blinking(TenSec const&) { std::cout << "Paused::stop_blinking\n"; }
             // guard conditions
 
- // friend definition needed.
- friend class state_machine<Paused>;
             typedef Paused pa; // makes transition table cleaner
             // Transition table
             struct transition_table : mpl::vector2<
@@ -315,8 +309,6 @@
 #ifdef __MWERKS__
     private:
 #endif
- // friend definition needed.
- friend class state_machine<player>;
         typedef player p; // makes transition table cleaner
 
         // Transition table for player
@@ -466,6 +458,31 @@
 
         std::cout << "Simulate error. Event play is not valid" << std::endl;
         p.process_event(play()); pstate(p);
+
+ // the states and events of the higher level FSM (player)
+ typedef player::transition_table stt;
+ typedef generate_state_set<stt>::type simple_states;
+
+ std::cout << "the state list:" << std::endl;
+ mpl::for_each<simple_states,boost::msm::wrap<mpl::placeholders::_1> >(display_type ());
+
+ std::cout << "the event list:" << std::endl;
+ typedef generate_event_set<stt>::type event_list;
+ mpl::for_each<event_list,boost::msm::wrap<mpl::placeholders::_1> >(display_type ());
+ std::cout << std::endl;
+
+ // the states and events recursively searched
+ typedef recursive_get_transition_table<player>::type recursive_stt;
+
+ std::cout << "the state list (including sub-SMs):" << std::endl;
+
+ typedef generate_state_set<recursive_stt>::type all_states;
+ mpl::for_each<all_states,boost::msm::wrap<mpl::placeholders::_1> >(display_type ());
+
+ std::cout << "the event list (including sub-SMs):" << std::endl;
+ typedef generate_event_set<recursive_stt>::type all_events;
+ mpl::for_each<all_events,boost::msm::wrap<mpl::placeholders::_1> >(display_type ());
+
     }
 }
 

Modified: sandbox/msm/libs/msm/doc/SimpleTutorial.cpp
==============================================================================
--- sandbox/msm/libs/msm/doc/SimpleTutorial.cpp (original)
+++ sandbox/msm/libs/msm/doc/SimpleTutorial.cpp 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -121,8 +121,6 @@
 #ifdef __MWERKS__
     private:
 #endif
- // friend definition needed.
- friend class state_machine<player>;
         typedef player p; // makes transition table cleaner
 
         // Transition table for player

Modified: sandbox/msm/libs/msm/doc/index.html
==============================================================================
--- sandbox/msm/libs/msm/doc/index.html (original)
+++ sandbox/msm/libs/msm/doc/index.html 2009-02-16 18:05:37 EST (Mon, 16 Feb 2009)
@@ -6,7 +6,7 @@
         <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.0 (Win32)">
         <META NAME="CREATED" CONTENT="20080922;21044300">
         <META NAME="CHANGEDBY" CONTENT="Christophe Henry">
- <META NAME="CHANGED" CONTENT="20090216;22481600">
+ <META NAME="CHANGED" CONTENT="20090217;12000">
         <META NAME="Info 1" CONTENT="">
         <META NAME="Info 2" CONTENT="">
         <META NAME="Info 3" CONTENT="">
@@ -16,6 +16,7 @@
         <META NAME="CHANGEDBY" CONTENT="Christophe Henry">
         <META NAME="CHANGEDBY" CONTENT="Christophe Henry">
         <META NAME="CHANGEDBY" CONTENT="Christophe Henry">
+ <META NAME="CHANGEDBY" CONTENT="Christophe Henry">
         <META NAME="CHANGEDBY" CONTENT="xtoff">
         <META NAME="CHANGEDBY" CONTENT="xtoff">
         <META NAME="CHANGEDBY" CONTENT="xtoff">
@@ -873,20 +874,6 @@
 </FONT></CODE><CODE><FONT COLOR="#c5000b"><FONT SIZE=2>good_disk_format</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>(</FONT></FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>cd_detected
 const&amp;</FONT></FONT></CODE><CODE><FONT COLOR="#000000"> </FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>evt)
 {...}</FONT></FONT></CODE></P>
-<P><BR><BR>
-</P>
-<P><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>A
-bit of syntactical noise is unfortunately unavoidable:</FONT></FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#008000"><FONT SIZE=2>//
-friend definition needed.</FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>friend</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>class</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>state_machine</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&lt;</FONT></FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>player</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>&gt;;</FONT></FONT></CODE></P>
-<P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#0000ff"><FONT SIZE=2>typedef</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>player</FONT></FONT></CODE><CODE><FONT COLOR="#000000">
-</FONT></CODE><CODE><FONT COLOR="#030003"><FONT SIZE=2>p</FONT></FONT></CODE><CODE><FONT COLOR="#000000"><FONT SIZE=2>;
-</FONT></FONT></CODE><CODE><FONT COLOR="#008000"><FONT SIZE=2>//
-makes transition table cleaner</FONT></FONT></CODE></P>
 <P STYLE="margin-bottom: 0cm"><BR>
 </P>
 <P STYLE="margin-bottom: 0cm"><CODE><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=3>By
@@ -979,8 +966,7 @@
 <P>And that's it! You can even define the Playing state machine in
 another file and compile separately. Inside, you just need to define
 a (public defined) transition table (the heart of the whole system)
-and the same action / guard / friend definitions, exactly like you
-did for player.</P>
+and the same action / guard, exactly like you did for player.</P>
 <P><BR><BR>
 </P>
 <P>And keep in mind: <U>no change to </U><CODE><U>player</U></CODE>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk