Tuesday, November 24, 2020

Decorator design pattern demo in C++

The Decorator is a structural design pattern that allows the adding of new behaviors to an object dynamically by placing those behaviors inside a special wrapper object.

Using decorators you can wrap objects countless number of times since both target objects and decorators follow the same interface. The resulting object will get a stacking behavior of all the wrappers.





No comments:

The Strategy Design Pattern a Behavioral Pattern using C++

The Strategy Design Pattern is a behavioral design pattern that enables selecting an algorithm's implementation at runtime. Instead of i...