Return an observable that emits connected, non-overlapping buffer, each containing at most count items from the source observable. If the skip parameter is set, return an observable that emits buffers every skip items containing at most count items from the source observable.
More...
Go to the source code of this file.
|
template<class... AN> |
auto | rxcpp::operators::buffer (AN &&...an) -> operator_factory< buffer_count_tag, AN... > |
| Return an observable that emits connected, non-overlapping buffer, each containing at most count items from the source observable. If the skip parameter is set, return an observable that emits buffers every skip items containing at most count items from the source observable. More...
|
|
Return an observable that emits connected, non-overlapping buffer, each containing at most count items from the source observable. If the skip parameter is set, return an observable that emits buffers every skip items containing at most count items from the source observable.
- Parameters
-
count | the maximum size of each buffers before it should be emitted. |
skip | how many items need to be skipped before starting a new buffers (optional). |
- Returns
- Observable that emits connected, non-overlapping buffers, each containing at most count items from the source observable. If the skip parameter is set, return an Observable that emits buffers every skip items containing at most count items from the source observable.
- Sample Code
values.
[](std::vector<int> v){
printf("OnNext:");
std::for_each(v.begin(), v.end(), [](int a){
printf(" %d", a);
});
printf("\n");
},
[](){printf("OnCompleted\n");});
OnNext: 1 2
OnNext: 3 4
OnNext: 5
OnCompleted
- Sample Code
values.
[](std::vector<int> v){
printf("OnNext:");
std::for_each(v.begin(), v.end(), [](int a){
printf(" %d", a);
});
printf("\n");
},
[](){printf("OnCompleted\n");});
OnNext: 1 2
OnNext: 4 5
OnNext: 7
OnCompleted
#define RXCPP_OPERATORS_RX_BUFFER_COUNT_HPP |