21#ifndef HEDGEHOG_TASK_MULTI_SENDERS_H
22#define HEDGEHOG_TASK_MULTI_SENDERS_H
25#include "../../tools/concepts.h"
26#include "../../core/abstractions/node/task_outputs_management_abstraction.h"
34template<
class ...Outputs>
45 template<tool::MultiSendersAndNotifierAbstractionConcept MultiSendersAndNotifier>
47 if (abstraction ==
nullptr) {
48 throw std::runtime_error(
"A sender needs to have the abstraction initialized before used.");
64 if (
tom_ ==
nullptr) {
65 throw std::runtime_error(
"A sender needs to have the abstraction initialized before used.");
67 tom_->sendAndNotify(data);
Behavior abstraction for nodes that send multiple types of data.
Behavior abstraction for tasks that send multiple types of data.
void addResult(std::shared_ptr< DataType > data)
Add result and send it to the task successors.
virtual ~TaskMultiSenders()=default
Default destructor.
std::shared_ptr< core::abstraction::TaskOutputsManagementAbstraction< Outputs... > > tom_
Link to the task's core TaskOutputsManagementAbstraction.
TaskMultiSenders(std::shared_ptr< MultiSendersAndNotifier > abstraction)
Default constructor.
Output management abstraction for the task.
Test if an output type is in the list of output types (variadic)