Tool Libs
UMIT-TIROL Institute of Automation and Control Engineering library collection
 
Loading...
Searching...
No Matches
Sink< T > Struct Template Referenceabstract

generic object sink, i.e. More...

#include <streams.h>

Inherited by Queue< Transaction >, Queue< Operation >, Queue< Message >, Queue< struct can_frame >, Queue< CAN::Open::SDO >, Queue< I2C::Request >, Queue< Buffer< uint8_t > >, Queue< Frame >, Queue< REQ >, Queue< SPI::Request >, Queue< Schedule::Schedulable * >, DevNull< T >, and Queue< T >.

Public Member Functions

virtual bool full ()=0
 check if sink is full
 
virtual void push (const T &t)
 copy semantics does not check for space. guard by using 'if (!full) { ... }'
 
virtual void push (T &&)=0
 move semantics does not check for space. guard by using 'if (!full) { ... }'
 
void trypush (T &&t)
 use this if you don't care if it's going to be successful. data gets discarded if sink is full.
 

Detailed Description

template<typename T>
struct Sink< T >

generic object sink, i.e.

consumer of objects

can often be implemented nicely by stashing them in a queue and handling them at a later time


The documentation for this struct was generated from the following file: