diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/boost/libs/mpl/example/fsm/README.txt | |
parent | Initial commit. (diff) | |
download | ceph-upstream.tar.xz ceph-upstream.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/mpl/example/fsm/README.txt')
-rw-r--r-- | src/boost/libs/mpl/example/fsm/README.txt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/boost/libs/mpl/example/fsm/README.txt b/src/boost/libs/mpl/example/fsm/README.txt new file mode 100644 index 000000000..0f4863fe2 --- /dev/null +++ b/src/boost/libs/mpl/example/fsm/README.txt @@ -0,0 +1,28 @@ +What's In This Directory +======================== + +* player1.cpp - this is exactly what's covered in C++ Template + Metaprogramming (http://www.boost-consulting.com/mplbook); in fact, + it was auto-extracted from the examples as shown in the book. The + state machine framework and its use are together in one .cpp file; + normally they would be separated. You can think of the framework as + ending with the definition of the generate_dispatcher class + template. + + You can ignore the typedef called "dummy;" that was included in order to + test an intermediate example that appears in the book. + +* player2.cpp - this example demonstrates that the abstraction of the + framework is complete by replacing its implementation with one that + dispatches using O(1) table lookups, while still using the same code + to describe the particular FSM. Look at this one if you want to see + how to generate a static lookup table that's initialized at dynamic + initialization time. + +* player.cpp, state_machine.hpp - This example predates the book, and + is more sophisticated in some ways than what we cover in the other + examples. In particular, it supports state invariants, and it + maintains an internal event queue, which requires an additional + layer of runtime dispatching to sort out the next event to be + processed. + |