MT Showcase SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Showcase::ValueStream< T > Class Template Referenceabstract

Interface for value streams that produces values of type T. More...

#include <ValueStream.hpp>

Inheritance diagram for Showcase::ValueStream< T >:
Showcase::ValueStreamChannel< T > Showcase::ValueStreamSplitter< T >

Public Member Functions

int forEachSync (const std::function< void(const T &)> &f, int N, const std::function< bool(const T &)> &endCond=nullptr)
 Executes f for each next N values in the Stream as long as values are being generated. More...
 

Detailed Description

template<typename T>
class Showcase::ValueStream< T >

Interface for value streams that produces values of type T.

Member Function Documentation

template<typename T>
int Showcase::ValueStream< T >::forEachSync ( const std::function< void(const T &)> &  f,
int  N,
const std::function< bool(const T &)> &  endCond = nullptr 
)

Executes f for each next N values in the Stream as long as values are being generated.

Next function is not executed until the execution of the previous one is completed. Will block until N values are executed or for the first value which fulfills end condition.