1What's In This Directory 2======================== 3 4* player1.cpp - this is exactly what's covered in C++ Template 5 Metaprogramming (http://www.boost-consulting.com/mplbook); in fact, 6 it was auto-extracted from the examples as shown in the book. The 7 state machine framework and its use are together in one .cpp file; 8 normally they would be separated. You can think of the framework as 9 ending with the definition of the generate_dispatcher class 10 template. 11 12 You can ignore the typedef called "dummy;" that was included in order to 13 test an intermediate example that appears in the book. 14 15* player2.cpp - this example demonstrates that the abstraction of the 16 framework is complete by replacing its implementation with one that 17 dispatches using O(1) table lookups, while still using the same code 18 to describe the particular FSM. Look at this one if you want to see 19 how to generate a static lookup table that's initialized at dynamic 20 initialization time. 21 22* player.cpp, state_machine.hpp - This example predates the book, and 23 is more sophisticated in some ways than what we cover in the other 24 examples. In particular, it supports state invariants, and it 25 maintains an internal event queue, which requires an additional 26 layer of runtime dispatching to sort out the next event to be 27 processed. 28 29