Files
design-patterns-cpp/decorator/README.md
Jakub Vojvoda c7712573a0 update READMEs
2016-09-15 21:14:18 +02:00

11 lines
449 B
Markdown

## Decorator
Attach additional responsibilities to an object dynamically. Decorators
provide a flexible alternative to subclassing for extending functionality.
The pattern has structural purpose and applies to objects.
### When to use
* to add responsibilities to individual objects dynamically and transparently, that is, without affecting other objects
* for responsibilities that can be withdrawn
* when extension by subclassing is impractical