mirror of
https://github.com/JakubVojvoda/design-patterns-cpp.git
synced 2025-12-17 12:54:36 +03:00
update READMEs
This commit is contained in:
11
decorator/README.md
Normal file
11
decorator/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
## 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
|
||||
Reference in New Issue
Block a user