Skip to Content
C++ Reactive Programming
book

C++ Reactive Programming

by Praseed Pai, Peter Abraham
June 2018
Intermediate to advanced
348 pages
8h 45m
English
Packt Publishing
Content preview from C++ Reactive Programming

Reversing the gaze for Observables!

We have already learned that we can transform a composite to a list and traverse them through an Iterator. The Iterator pattern pulls data from the data source and manipulates the result at the consumer level. The most important problem we face is that we are coupling our EventSource and event sink. The GoF Observer pattern also does not help here.

Let's write a class that can act as an event hub, which the sinks will subscribe to. By having an event hub, we will now have an object that will act as an intermediary between the EventSource and event sink. One advantage of this indirection is readily obvious from the fact that our class can aggregate, transform, and filter out events before they reach the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Functional Programming in C++

Functional Programming in C++

Ivan Cukic

Publisher Resources

ISBN: 9781788629775Supplemental Content