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-start_with.hpp File Reference

Start with the supplied values, then concatenate this observable. More...

#include "../rx-includes.hpp"
#include "./rx-concat.hpp"
Include dependency graph for rx-start_with.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< start_with_tag >
 

Namespaces

 rxcpp
 
 rxcpp::operators
 

Macros

#define RXCPP_OPERATORS_RX_START_WITH_HPP
 

Functions

template<class... AN>
auto rxcpp::operators::start_with (AN &&...an) -> operator_factory< start_with_tag, AN... >
 Start with the supplied values, then concatenate this observable. More...
 

Detailed Description

Start with the supplied values, then concatenate this observable.

Template Parameters
Value0...
ValueNthe type of sending values
Parameters
v0...
vnvalues to send
Returns
Observable that emits the specified items and then emits the items emitted by the source observable.
Sample Code
auto values = rxcpp::observable<>::range(10, 12).
start_with(1, 2, 3);
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnNext: 10
OnNext: 11
OnNext: 12
OnCompleted
Another form of this operator, rxcpp::observable<void, void>::start_with, gets the source observable as a parameter:
auto observable = rxcpp::observable<>::range(10, 12);
auto values = rxcpp::observable<>::start_with(observable, 1, 2, 3);
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnNext: 10
OnNext: 11
OnNext: 12
OnCompleted

Macro Definition Documentation

#define RXCPP_OPERATORS_RX_START_WITH_HPP