RxCpp
The Reactive Extensions for Native (RxCpp) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in both C and C++.
Classes | Namespaces | Macros | Functions
rx-concat.hpp File Reference

For each item from this observable subscribe to one at a time, in the order received. For each item from all of the given observables deliver from the new observable that is returned. More...

#include "../rx-includes.hpp"
Include dependency graph for rx-concat.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rxcpp::member_overload< concat_tag >
 

Namespaces

 rxcpp
 
 rxcpp::operators
 

Macros

#define RXCPP_OPERATORS_RX_CONCAT_HPP
 

Functions

template<class... AN>
auto rxcpp::operators::concat (AN &&...an) -> operator_factory< concat_tag, AN... >
 For each item from this observable subscribe to one at a time, in the order received. For each item from all of the given observables deliver from the new observable that is returned. More...
 

Detailed Description

For each item from this observable subscribe to one at a time, in the order received. For each item from all of the given observables deliver from the new observable that is returned.

There are 2 variants of the operator:

Template Parameters
Coordinationthe type of the scheduler (optional).
Value0... (optional).
ValueNtypes of source observables (optional).
Parameters
cnthe scheduler to synchronize sources from different contexts (optional).
v0... (optional).
vnsource observables (optional).
Returns
Observable that emits the items emitted by each of the Observables emitted by the source observable, one after the other, without interleaving them.
Sample Code
auto o1 = rxcpp::observable<>::range(1, 3);
auto o3 = rxcpp::observable<>::from(5, 6);
auto base = rxcpp::observable<>::from(o1.as_dynamic(), o2, o3);
auto values = base.concat();
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnNext: 4
OnNext: 5
OnNext: 6
OnCompleted
Sample Code
auto o1 = rxcpp::observable<>::range(1, 3);
auto o3 = rxcpp::observable<>::from(5, 6);
auto base = rxcpp::observable<>::from(o1.as_dynamic(), o2, o3);
auto values = base.concat(rxcpp::observe_on_new_thread());
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnNext: 4
OnNext: 5
OnNext: 6
OnCompleted
Sample Code
auto o1 = rxcpp::observable<>::range(1, 3);
auto o3 = rxcpp::observable<>::from(5, 6);
auto values = o1.concat(o2, o3);
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnNext: 4
OnNext: 5
OnNext: 6
OnCompleted
Sample Code
auto o1 = rxcpp::observable<>::range(1, 3);
auto o3 = rxcpp::observable<>::from(5, 6);
auto values = o1.concat(rxcpp::observe_on_new_thread(), o2, o3);
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnNext: 4
OnNext: 5
OnNext: 6
OnCompleted

Macro Definition Documentation

#define RXCPP_OPERATORS_RX_CONCAT_HPP