Template Class MultiConsumer

Inheritance Relationships

Base Type

Class Documentation

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

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

Template Parameters:

T – Type of the consumed products

Public Functions

inline MultiConsumer(std::vector<IConsumer<T>*> consumers)

Creates a new MultiConsumer object.

Parameters:

consumers – The list of consumers that should all consume given products

inline virtual void setupConsumer()

Sets up all registered consumers.

inline virtual void teardownConsumer()

Tears down all registered consumers.

inline virtual void stopConsumer()

Stops all registered consumers.

inline virtual void onTimeout()

Triggers timeout functionality for all registered consumers.

inline virtual bool consume(std::shared_ptr<T> product)

Consumes a given product with all registered consumers.

Parameters:

product – Shared pointer to the product to be consumed.

Returns:

Success of the consumption.