Consciousness Videos

The Observer Design Pattern in C++ – Part 4 of n – Notify Specific System



Mike Shah

►Software Design and Design Patterns Playlist: https://www.youtube.com/playlist?list=PLvv0ScY6vfd9wBflF0f6ynlDQuaeKYzyc
►Find full courses on: https://courses.mshah.io/
►Join as Member to Support the channel: https://www.youtube.com/channel/UCA64pZbN5Mz5NxC3SO4qpDg/join

►Lesson Description: In this lesson we are going to refactor our code yet again, this time to more safely register (add/subscribe) and unregister (unsubscribe/remove) observers to their subjects. Note that this lesson builds off of the previous two in this series.

00:00 Introduction
00:30 Review of Previous Lesson
01:53 Design of our next Observer Implementation
07:10 Modifying our Subject with ‘Message Types’ and map data structure
10:39 Implementation of ‘AddObserver’ with different ‘Message Types’
15:08 Modifying our ‘IObserver’ to register with as a specific ‘Message Type’
19:45 Modifying our ‘NotifyAll’ to iterate through entire map
21:10 Modifying our Observer to store ‘Message Type’
24:06 Modifying our ‘RemoveObserver’
27:48 Review and Design decision to consider on Add/Remove Observer
29:28 Implementing Notify for specific ‘Message Type’
31:10 Example demo of our system
33:15 Review on Pros and Cons on our system
36:10 Conclusion

►YouTube Channel: https://www.youtube.com/c/MikeShah
►Please like and subscribe to help the channel!
►Join our free community: https://courses.mshah.io/communities/Q29tbXVuaXR5LTI3MzAz

Source

Similar Posts

5 thoughts on “The Observer Design Pattern in C++ – Part 4 of n – Notify Specific System
  1. Mike, this whole series has been incredibly relevant to me for a project I'm currently working on, and your explanation has dramatically enhanced my understanding. I find your explanations to be some of the best on YouTube and I don't understand how you're not getting more views. I'll certainly continue to watch!

Comments are closed.

WP2Social Auto Publish Powered By : XYZScripts.com