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++.
Namespaces | Macros | Functions
rx-empty.hpp File Reference

Returns an observable that sends no items to observer and immediately completes, on the specified scheduler. More...

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

Go to the source code of this file.

Namespaces

 rxcpp
 
 rxcpp::sources
 

Macros

#define RXCPP_SOURCES_RX_EMPTY_HPP
 

Functions

template<class T >
auto rxcpp::sources::empty () -> decltype(from< T >())
 Returns an observable that sends no items to observer and immediately completes, on the specified scheduler. More...
 
template<class T , class Coordination >
auto rxcpp::sources::empty (Coordination cn) -> decltype(from< T >(std::move(cn)))
 Returns an observable that sends no items to observer and immediately completes, on the specified scheduler. More...
 

Detailed Description

Returns an observable that sends no items to observer and immediately completes, on the specified scheduler.

Template Parameters
Tthe type of (not) emitted items
Coordinationthe type of the scheduler (optional)
Parameters
cnthe scheduler to use for scheduling the items (optional)
Returns
Observable that sends no items to observer and immediately completes.
Sample Code
auto values = rxcpp::observable<>::empty<int>();
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnCompleted
Sample Code
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnCompleted

Macro Definition Documentation

#define RXCPP_SOURCES_RX_EMPTY_HPP