by In software engineering, Structural Design Patterns deal with the relationship between object and classes i.e. how objects and classes interact or build a relationship in a manner suitable to the situation.

In this article of the Structural Design Patterns, we're going to take a look at Adapter Design Pattern in Modern C++ which used to convert the interface of an existing class into another interface that client/API-user expect.

To get the interface you want from the interface you have.You can also create a generic adapter by leveraging C++ template as follows: When to use the Adapter Design Pattern?

In this case of an incompatible situation, you can employ the Adapter Design Pattern.

Related Articles