C++ Decorator Pattern

Wikipedia Link