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... >
 

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\n
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\n
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\n
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\n
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

◆ RXCPP_OPERATORS_RX_CONCAT_HPP

#define RXCPP_OPERATORS_RX_CONCAT_HPP
rxcpp::sources::range
auto range(T first=0, T last=std::numeric_limits< T >::max(), std::ptrdiff_t step=1) -> observable< T, detail::range< T, identity_one_worker >>
Definition: rx-range.hpp:119
rxcpp::observe_on_new_thread
observe_on_one_worker observe_on_new_thread()
Definition: rx-observe_on.hpp:328
cpplinq::from
linq_driver< iter_cursor< typename util::container_traits< TContainer >::iterator > > from(TContainer &c)
Definition: linq.hpp:556
rxcpp::operators::as_blocking
auto as_blocking() -> detail::blocking_factory
Definition: rx-subscribe.hpp:144
rxcpp::operators::subscribe
auto subscribe(ArgN &&... an) -> detail::subscribe_factory< decltype(make_subscriber< T >(std::forward< ArgN >(an)...))>
Definition: rx-subscribe.hpp:87
rxcpp::sources::just
auto just(Value0 v0) -> typename std::enable_if<!is_coordination< Value0 >::value, decltype(iterate(*(std::array< Value0, 1 > *) nullptr, identity_immediate()))>::type
Definition: rx-iterate.hpp:267