19#ifndef HEDGEHOG_CORE_SWITCH_H_
20#define HEDGEHOG_CORE_SWITCH_H_
22#include "../../behavior/switch/multi_switch_rules.h"
24#include "../abstractions/base/node/node_abstraction.h"
25#include "../abstractions/node/task_outputs_management_abstraction.h"
34template<
class ...Inputs>
46 template<
class Switch>
50 multiSwitchRules_(static_cast<behavior::MultiSwitchRules<Inputs...> *const>(multiSwitchRules)) {}
67 [[nodiscard]] std::vector<std::pair<std::string const, std::string const>>
ids()
const override {
68 return {{this->
id(), this->
id()}};
75 throw std::runtime_error(
"Try to get a node out of a core switch while there is none.");
Behavior abstraction for the base node.
Switch rules behavior abstraction for different types of input.
Switch rule behavior abstraction for a type of input.
Base core node abstraction.
virtual std::string id() const
Core's id ('x' + address of abstraction) as string.
NodeAbstraction(std::string name)
Core node constructor using the core's name.
virtual size_t graphId() const
Get the graph identifier (got from belonging graph)
Output management abstraction for the task.
CoreSwitch(Switch *const multiSwitchRules)
Construct a CoreSwitch with a user-defined abstraction with switch rules.
~CoreSwitch() override=default
Default destructor.
std::vector< std::pair< std::string const, std::string const > > ids() const override
Node ids [nodeId, nodeGroupId] accessor.
bool callSendToGraph(std::shared_ptr< Input > &data, size_t const &graphId)
Interface to user-defined switch rules.
behavior::MultiSwitchRules< Inputs... > *const multiSwitchRules_
User-defined abstraction with switch rules.
behavior::Node * node() const override
Getter to the node counterpart.
Concept verifying that a type is in a variadic.