Manage collection as stream. More...
#include <flux.hpp>
Public Member Functions | |
Flux ()=delete | |
Flux (std::function< void(const T &...)> consume) | |
virtual | ~Flux () |
void | push (const T &... object) |
void | handleError () |
Handle error. | |
Manage collection as stream.
T | the collection's type |
|
delete |
Forbids Flux default constructor
anch::Flux< T >::Flux | ( | std::function< void(const T &...)> | consume | ) |
Flux constructor
consume | the consume object function to use |
|
virtual |
Flux destructor
void anch::Flux< T >::handleError | ( | ) |
Handle error.
This method has to be implemented for each T
implementation when push
method can raise error.
Default implementation will only rethrow the error.
void anch::Flux< T >::push | ( | const T &... | object | ) |
Push object in stream
object | the object to push in stream |