Decorator pattern from the Head First Patterns book, implemented in C++