Chapter 4. Hierarchical Event Processor Implementation
… the cost of adding a feature isn't just the time it takes to code it. The cost also includes the addition of an obstacle to future expansion. … The trick is to pick the features that don't fight each other.
— John Carmack
Chapter 2 introduced UML statecharts as a very effective way of getting around the state-explosion problem that plagues the traditional “flat” state machines. The particularly valuable innovation of UML state machines in this respect is the concept of state nesting, because it allows reusing behavior across many states instead of repeating the same actions and transitions over and over again. Hierarchical nesting of states lets you get new behavior almost for free by inheriting ...
Get Practical UML Statecharts in C/C++, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.