In this recipe, we will learn how to implement the observer pattern. The observer pattern provides the ability for a class to register with another class to receive notifications when an event occurs. The Qt language provides this feature through the use of its singles and slots mechanism while requiring a MOC compiler to make it work. This recipe is important as we will learn how to implement the observer pattern without the need for Qt, using standard C++.
Adding communication with the observer pattern
Getting ready
Before beginning, please ensure that all of the technical requirements are met, including installing Ubuntu 18.04 or higher and running the following in a Terminal window:
> sudo apt-get install build-essential...