mirror of
https://github.com/JakubVojvoda/design-patterns-cpp.git
synced 2025-12-17 12:54:36 +03:00
add Command pattern
This commit is contained in:
13
command/README.md
Normal file
13
command/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
## Command
|
||||
|
||||
Command pattern encapsulates a request as an object, thereby letting you parameterize
|
||||
clients with different requests, queue or log requests, and supports undoable
|
||||
operations. The pattern has a behavioral purpose and deals with relationships between objects.
|
||||
|
||||
### When to use
|
||||
|
||||
* want to parameterize objects by an action to perform
|
||||
* want to specify, queue, and execute requests at different times
|
||||
* support undo
|
||||
* support logging changes so that they can be reapplied in case of a system crash
|
||||
* structure a system around high-level operations built on primitives operations
|
||||
Reference in New Issue
Block a user