Using the Observer Pattern
This chapter will begin our quest to expand your C++ programming repertoire beyond OOP concepts, with the goal of enabling you to solve recurring types of coding problems by utilizing common design patterns. Design patterns will also enhance code maintenance and provide avenues for potential code reuse.
The goal of the fourth section of the book, beginning with this chapter, is to demonstrate and explain popular design patterns and idioms and learn how to implement them effectively in C++.
In this chapter, we will cover the following main topics:
- Understanding the advantage of utilizing design patterns
- Understanding the Observer pattern and how it contributes to OOP
- Understanding how to implement the Observer pattern in C++
By the end of this chapter, you will understand the utility of employing design patterns in your code, as well as understand the popular Observer pattern. We will see an example implementation of this pattern...