In the last three chapters, we learned about the RxCpp library and its programming model. We also applied what we learned, in the context of GUI programming. From a mental model perspective, any developer who wants to write programs in a reactive manner has to understand Observable, Observer, and the operators that work between them. Of course, Schedulers and Subjects are important as well. The bulk of the logic of reactive programs resides in operators. The RxCpp library provides a lot of built-in (stock) operators as part of its implementation. We have already used some of them in our programs. In this chapter, we will learn how we can implement custom operators. To write custom operators, we need to delve deep into some advanced topics related to the RxCpp library. The topics covered in this chapter are the following:
- Philosophy of Rx operators
- Chaining stock operators
- Writing basic RxCpp operators
- Writing different genres of custom operators...