Recently, I have learned some common design patterns. And did some tidying up, as a memo. What's wrong with the place welcome to point out:
Command mode
Encapsulates a request as an object so that you can parameterize the customer with different requests, queue requests or log requests, and support revocable operations.
For more information, please visit my personal blog:www.sheyushu.com
Bridging mode (bridge)
Separate the abstract part from its implementation so that they can vary independently.
For more information, please visit my personal blog:www.sheyushu.com
Adapter Mode (Adapter)
Adapter mode (Adapter), which transforms the interface of a class into another interface that the customer wants. The Adapter mode makes it possible for those classes to work together because the interfaces are incompatible and cannot work together.
For more information, please visit my personal blog:www.sheyushu.com
Factory approach (Factory method)
Defines an interface for creating objects, letting subclasses decide which class to instantiate. The Factory Method defers the instantiation of a class to its subclasses.
For more information, please visit my personal blog:www.sheyushu.com
Simple Factory mode (Factory)
For more information, please visit my personal blog:www.sheyushu.com
Status mode (state)
Allowing an object to change its internal state is to change its behavior. The object appears to have modified its class.
For more information, please visit my personal blog:www.sheyushu.com
Abstract Factory mode (Factory)
Abstract Factory provides an interface to create a series of related or interdependent objects without specifying their specific classes.
For more information, please visit my personal blog:www.sheyushu.com
More Design Patterns:www.sheyushu.com
Common design Patterns (c + + examples)