Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Meta State Machine (MSM)


Table of Contents

Preface
I. User' guide
1. Founding idea
2. UML Short Guide
What are state machines?
Concepts
State machine, state, transition, event
Submachines, orthogonal regions, pseudostates
History
Completion transitions / anonymous transitions
Internal transitions
Conflicting transitions
Added concepts
State machine glossary
3. Tutorial
Design
Basic front-end
A simple example
Transition table
Defining states with entry/exit actions
What do you actually do inside actions / guards?
Defining a simple state machine
Defining a submachine
Orthogonal regions, terminate state, event deferring
History
Completion (anonymous) transitions
Internal transitions
more row types
Explicit entry / entry and exit pseudo-state / fork
Flags
Event Hierarchy
Customizing a state machine / Getting more speed
Choosing the initial event
Containing state machine (deprecated)
Functor front-end
Transition table
Defining states with entry/exit actions
What do you actually do inside actions / guards (Part 2)?
Defining a simple state machine
Anonymous transitions
Internal transitions
Kleene (any) event
eUML
Transition table
A simple example: rewriting only our transition table
Defining events, actions and states with entry/exit actions
Wrapping up a simple state machine and first complete examples
Defining a submachine
Attributes / Function call
Orthogonal regions, flags, event deferring
Customizing a state machine / Getting more speed
Completion / Anonymous transitions
Internal transitions
Kleene(any) event)
Other state types
Helper functions
Phoenix-like STL support
Writing actions with Boost.Phoenix (in development)
Back-end
Creation
Starting and stopping a state machine
Event dispatching
Active state(s)
Serialization
Base state type
Visitor
Flags
Getting a state
State machine constructor with arguments
Trading run-time speed for better compile-time / multi-TU compilation
Compile-time state machine analysis
Enqueueing events for later processing
Customizing the message queues
Policy definition with Boost.Parameter
Choosing when to switch active states
4. Performance / Compilers
Speed
Executable size
Supported compilers
Limitations
Compilers corner
5. Questions & Answers, tips
6. Internals
Backend: Run To Completion
Frontend / Backend interface
Generated state ids
Metaprogramming tools
7. Acknowledgements
MSM v2
MSM v1
8. Version history
From V2.27 to V2.28 (Boost 1.57)
From V2.26 to V2.27 (Boost 1.56)
From V2.25 to V2.26 (Boost 1.55)
From V2.24 to V2.25 (Boost 1.54)
From V2.23 to V2.24 (Boost 1.51)
From V2.22 to V2.23 (Boost 1.50)
From V2.21 to V2.22 (Boost 1.48)
From V2.20 to V2.21 (Boost 1.47)
From V2.12 to V2.20 (Boost 1.46)
From V2.10 to V2.12 (Boost 1.45)
From V2.0 to V2.12 (Boost 1.44)
II. Reference
9. External references to MSM
10. eUML operators and basic helpers
11. Functional programming
Common headers — The common types used by front- and back-ends
Back-end — The back-end headers
Front-end — The front-end headers

List of Tables

10.1. Operators and state machine helpers
11.1. STL algorithms
11.2. STL algorithms
11.3. STL algorithms
11.4. STL container methods
11.5. STL list methods
11.6. STL associative container methods
11.7. STL pair
11.8. STL string