More C++ Idioms/Hierarchy Generation

= Hierarchy Generation =

Intent
To generate a concrete class composed to various behavioral policies

Motivation
When a solution calls for a number of different implementations that can be combine in a variety of ways, each sharing or not sharing various decorations, the traditional solution is multiple inheritance which produces a variety of problems. Hierarchy generation is a pattern by which a variety of base classes are successively inherited to avoid multiple inheritance.

Solution and Sample Code
In the above example the BozoTheClown declaration is a short hand of effectively the following: This is identical to:

The behavior policies must follow this concept: