Envelope Letter

I first read of this idiom in JimCoplien's now famous work AdvancedCeePlusPlusProgrammingStylesAndIdioms. Even before then, it was ubiquitous, though not well documented, in various reference counted classes such as C++ string classes. It is now the basic idiom used by almost all smart pointer classes with ExclusiveOwner? or SharedOwner? semantics. Later, this idiom was specialized by the GangOfFour into two StructuralPatterns, the AdapterPattern and the BridgePattern.

Envelope/Letter is an extension of the HandleBodyPattern, with multiple implementation (body/letter) classes derived from the interface (handle/envelope) class.


CategoryPattern


EditText of this page (last edited September 16, 2014) or FindPage with title or text search