Applying the Adapter Pattern
This chapter will extend our quest to expand your C++ programming skills beyond core OOP concepts, with the goal of enabling you to solve recurring types of coding problems utilizing common design patterns. Incorporating design patterns in coding solutions can not only provide elegant solutions but also enhance code maintenance and provide potential opportunities for code reuse.
The next core design pattern that we will learn how to implement effectively in C++ is the Adapter pattern.
In this chapter, we will cover the following main topics:
- Understanding the Adapter pattern and how it contributes to OOP
- Understanding how to implement the Adapter pattern in C++
By the end of this chapter, you will understand the essential Adapter pattern and how it can be used to either allow two incompatible classes to communicate or to upgrade unseemly code to well-designed OO code. Adding another key design pattern to your knowledge set will...