Questions tagged [rxcpp]

Reactive Extensions for C++ (rxcpp) is a C++ library of algorithms that coordinate values distributed in time. rxcpp is like the STL algorithms that process values distributed in space, but for async values like network packets, IO and mouse events.

rxcpp is on github

40 questions
2
votes
2 answers

Creating custom operators in rxcpp

I am trying to learn how to create custom operators in rxcpp, and I was able to create operators as sited in here. But, I would like to learn how to create more generic operators implementing rxo::operator_base and using lift operator. Is there any…
2
votes
1 answer

How to handle a request/response stream in rxcpp

I need to implement a camera sampling system in rxcpp.. The way I imagined this is passing a requestStream as param and receiving a responseStream Every time requestSample is called, a new camera session is created and when on_complete() is called…
Ciprian
  • 1,125
  • 1
  • 9
  • 14
2
votes
1 answer

Construct Observer/Observable pattern using RxCpp

I am trying to implement an observer/observable pattern in Rx-cpp. These is a very interesting tutorial in Rx.Net on how someone can to this. In this C# example, there are specific interfaces that we have to override: public interface IObserver
Thoth
  • 993
  • 12
  • 36
2
votes
1 answer

Groups aggregate functions using rxcpp?

I'm trying to get a gist of RxCpp, the native cpp implementation of reactive extensions from Microsoft, to see if I could use it in a project, but I'm having trouble wrapping my head around the concepts. If I had an observable templated with the…
bpeikes
  • 3,495
  • 9
  • 42
  • 80
2
votes
1 answer

Compile rxcpp for Android

I download RxCpp from github, modify the CMakeLists.txt as follow (I use the CMake modified by Microsoft in order to build cross platform project with VS2015): cmake_minimum_required (VERSION 3.4) project(RxCppAndroid VERSION 2.2.4 LANGUAGES C…
1
vote
1 answer

rxcpp: Automatically unsubscribe when out of scope

Although rxcpp::composite_subscription has a method unsubscribe but it doesn't call it on destruction. Does rxcpp library contains a class that automatically calls unsubscribe when the object goes out of scope?
asmbaty
  • 436
  • 2
  • 11
1
vote
2 answers

How to use RxCpp operators on a list of observables?

I want to use zip operator on a list / array of RxCpp observables, but RxCpp operators only accept variadic arguments, and the size of my list is dynamic (known at runtime). Is there a way to use these operators on a list of observables? Thanks in…
S.Zarei
  • 163
  • 1
  • 6
1
vote
1 answer

How to create a ReplaySubject with RxCpp?

In my c++ project, I need to create Subjects having an initial value, that may be updated. On each subscription/update, subscribers may trigger then data processing... In a previous Angular (RxJS) project, this kind of behavior was handled with…
Cthurier
  • 28
  • 1
  • 1
  • 4
1
vote
1 answer

compile error in reactive extensions for cpp

I encounter a strange question about rxcpp. When capturing a rxcpp::connectable_observable variable and call it's connect method, I got a compile error as follow. 1>------ Build started: Project: LearnRx, Configuration: Debug x64…
zichao liu
  • 311
  • 1
  • 6
1
vote
1 answer

How to connect two functions returning observables?

I wrote one function that return a pair of QDateTime as observable, like this one: rxcpp::observable> experimentOne(const QDateTimeAxis * const axis { return rxcpp::observable<>::create
kindoblue
  • 151
  • 1
  • 7
1
vote
1 answer

Add RxCpp to C++ Bazel project

I'm currently trying to compile a trivial c++ example project before including rxcpp to my main project, however, I'm running into difficulties where rxcpp library is not found. All files are within the same directory. Workstation specs: Bazel…
Darragh
  • 19
  • 1
  • 6
1
vote
1 answer

RxCPP behave different than Rx.Net

I am using RxCPP and have difficulties to understand its behavior. Here are two programs, one in Rx.Net and the other one in RxCPP. They suppose to output the same prints, but they don't. the program take points from a mouse stream, and calculate a…
ShaulF
  • 841
  • 10
  • 17
1
vote
1 answer

RXCPP: Make an extension that doesn't care about the input type of the observable

I wish to make an extension function that doesn't care about the type of observable it receives. For example: template inline auto makeones() -> function(observable)> { return [=](observable s) { return s |…
jc211
  • 397
  • 2
  • 9
1
vote
1 answer

Null pointer passed to lambda function is not null anymore

I try to pass a null pointer as reference to a lambda function, but it will receive a memory address instead of staying null. function doTheThing(){ ... pointer = nullptr; return [&](json object) { if(pointer != nullptr) { …
user3605225
  • 285
  • 1
  • 3
  • 7
1
vote
2 answers

RXcpp stream data from function continuously

I'm learning reactive for c++ and I'm looking for some guidance. I've created a function to wait for an event then return it. I want to catch all the events that occur with reactive async and handle them as they come. Here's what I have so far: int…
shady
  • 1,076
  • 2
  • 13
  • 33