Public Member Functions | Private Attributes | List of all members
urcl::comm::MultiConsumer< T > Class Template Reference

Consumer, that allows one product to be consumed by multiple arbitrary conusmers. More...

#include <pipeline.h>

Inheritance diagram for urcl::comm::MultiConsumer< T >:
Inheritance graph
[legend]

Public Member Functions

bool consume (std::shared_ptr< T > product)
 Consumes a given product with all registered consumers. More...
 
 MultiConsumer (std::vector< IConsumer< T > * > consumers)
 Creates a new MultiConsumer object. More...
 
virtual void onTimeout ()
 Triggers timeout functionality for all registered consumers. More...
 
virtual void setupConsumer ()
 Sets up all registered consumers. More...
 
virtual void stopConsumer ()
 Stops all registered consumers. More...
 
virtual void teardownConsumer ()
 Tears down all registered consumers. More...
 

Private Attributes

std::vector< IConsumer< T > * > consumers_
 

Detailed Description

template<typename T>
class urcl::comm::MultiConsumer< T >

Consumer, that allows one product to be consumed by multiple arbitrary conusmers.

Template Parameters
TType of the consumed products

Definition at line 88 of file pipeline.h.

Constructor & Destructor Documentation

template<typename T >
urcl::comm::MultiConsumer< T >::MultiConsumer ( std::vector< IConsumer< T > * >  consumers)
inline

Creates a new MultiConsumer object.

Parameters
consumersThe list of consumers that should all consume given products

Definition at line 99 of file pipeline.h.

Member Function Documentation

template<typename T >
bool urcl::comm::MultiConsumer< T >::consume ( std::shared_ptr< T >  product)
inlinevirtual

Consumes a given product with all registered consumers.

Parameters
productShared pointer to the product to be consumed.
Returns
Success of the consumption.

Implements urcl::comm::IConsumer< T >.

Definition at line 151 of file pipeline.h.

template<typename T >
virtual void urcl::comm::MultiConsumer< T >::onTimeout ( )
inlinevirtual

Triggers timeout functionality for all registered consumers.

Reimplemented from urcl::comm::IConsumer< T >.

Definition at line 136 of file pipeline.h.

template<typename T >
virtual void urcl::comm::MultiConsumer< T >::setupConsumer ( )
inlinevirtual

Sets up all registered consumers.

Reimplemented from urcl::comm::IConsumer< T >.

Definition at line 106 of file pipeline.h.

template<typename T >
virtual void urcl::comm::MultiConsumer< T >::stopConsumer ( )
inlinevirtual

Stops all registered consumers.

Reimplemented from urcl::comm::IConsumer< T >.

Definition at line 126 of file pipeline.h.

template<typename T >
virtual void urcl::comm::MultiConsumer< T >::teardownConsumer ( )
inlinevirtual

Tears down all registered consumers.

Reimplemented from urcl::comm::IConsumer< T >.

Definition at line 116 of file pipeline.h.

Member Data Documentation

template<typename T >
std::vector<IConsumer<T>*> urcl::comm::MultiConsumer< T >::consumers_
private

Definition at line 91 of file pipeline.h.


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


ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Sun May 9 2021 02:16:26