MCPcopy Create free account
hub / github.com/AlexInLog/ReactivePlusPlus / main

Function main

src/examples/rpp/doxygen/readme.cpp:58–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56// ![simple_custom_map]
57
58int main() // NOLINT(bugprone-exception-escape)
59{
60 // ![readme]
61 rpp::source::from_callable(&::getchar)
62 | rpp::operators::repeat()
63 | rpp::operators::take_while([](char v) { return v != '0'; })
64 | rpp::operators::filter(std::not_fn(&::isdigit))
65 | rpp::operators::map(&::toupper)
66 | rpp::operators::subscribe([](char v) { std::cout << v; });
67 // ![readme]
68
69 rpp::source::just(1) | simple_map([](int v) { return std::to_string(v); }) | rpp::ops::subscribe();
70
71 return 0;
72}

Callers

nothing calls this directly

Calls 8

from_callableFunction · 0.85
repeatFunction · 0.85
take_whileFunction · 0.85
filterFunction · 0.85
mapFunction · 0.85
subscribeFunction · 0.85
justFunction · 0.85
simple_mapClass · 0.85

Tested by

no test coverage detected