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

Returns an Observable that emits true if every item emitted by the source Observable satisfies a specified condition, otherwise false. Emits true if the source Observable terminates without emitting any item. More...

#include "../rx-includes.hpp"
Include dependency graph for rx-all.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< all_tag >
 
struct  rxcpp::member_overload< is_empty_tag >
 

Namespaces

 rxcpp
 
 rxcpp::operators
 

Macros

#define RXCPP_OPERATORS_RX_ALL_HPP
 

Functions

template<class... AN>
auto rxcpp::operators::all (AN &&...an) -> operator_factory< all_tag, AN... >
 Returns an Observable that emits true if every item emitted by the source Observable satisfies a specified condition, otherwise false. Emits true if the source Observable terminates without emitting any item. More...
 
template<class... AN>
auto rxcpp::operators::is_empty (AN &&...an) -> operator_factory< is_empty_tag, AN... >
 Returns an Observable that emits true if the source Observable is empty, otherwise false. More...
 

Detailed Description

Returns an Observable that emits true if every item emitted by the source Observable satisfies a specified condition, otherwise false. Emits true if the source Observable terminates without emitting any item.

Template Parameters
Predicatethe type of the test function.
Parameters
pthe test function to test items emitted by the source Observable.
Returns
Observable that emits true if every item emitted by the source observable satisfies a specified condition, otherwise false.
Sample Code
auto values = rxcpp::observable<>::from(1, 2, 3, 4, 5).all([](int n) { return n < 6; });
values.
[](bool v) { printf("OnNext: %s\n", v ? "true" : "false"); },
[]() { printf("OnCompleted\n"); });
OnNext: true
OnCompleted

Macro Definition Documentation

#define RXCPP_OPERATORS_RX_ALL_HPP