This mini eBook provides a step by step guide on using Boost::statechart (part of the boost C++ library @ www.boost.org) for creating state machines based software.
A large amount of code can potentially be written in the form of state machines. Sometimes even basic switch-case statements are a representation of miniature states. Many a time programmers create multiple states in the code without being explicitly aware of the fact that they are trying to emulate state machines.
Why should one use existing state machine framework instead of creating its own?
Creating a proper state machine require lots of code and should behave as expected in most of the unpredictable scenarios. One may try it out, but it will take a hell lot of development and testing time, which instead could be used for coding the functionality.
Boost::statechart is a generic state machine which fulfills most of the basic requirements one can find in a state machines. It's my sincere opinion that one should at least explore this before deciding to write its own state machine.
This eBook is a work in progress as of now
How to use this eBook ?
This eBook recommends to follow "Chapter a Day" method. Each chapter is small enough to be digested in a day with sufficient practice.
- Foreword (Looking for people : Let me know if you like the content and want to write the foreword for this mini eBook)
- Preface
- Chapter - 1: Creating Basic State Machine using boost::statechart
- Chapter - 2: Creating Events and Event Handlers
- Chapter - 3: The life cycle of a STATE
- Chapter - 4: Working with Meta States
- Chapter - 5: Deferred Event
- Chapter - 6: Forwarding Events
- Chapter - 7: Error Handling
- Chapter - 8: Orthogonal States
- Chapter - 9: State Machine Contexts
The materials herein are all (c) 2016 by www.codesbay.com.
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 4.0 Unported License.
I intent to publish this mini eBook as soon as it completes.