Previous section   Next section

Imperfect C++ Practical Solutions for Real-Life Programming
By Matthew Wilson
Table of Contents
Chapter 21.  Veneers


21.4. Veneers: Coda

The idea of veneers came about through a desire to fine polish existing classes, but has evolved into a concept that finds wide application. Veneers can be used to inject behavior into a hierarchy of classes, to round off encapsulation, to adapt types, to manage conversion. They might add new methods, perform additional processing during construction and/or destruction, or might specify new member types. Veneers do all these things in a lightweight manner, according to a set of rules that many of their applications rely upon. In the next chapter, we look at more substantial type adaptation, in the form of bolt-ins.


      Previous section   Next section