OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
BlockHandler.h
Go to the documentation of this file.
1#pragma once
2#include <list>
3#include "OTCore/Variable.h"
5#include "GraphNode.h"
6#include "EntityBlock.h"
7#include "PipelineData.h"
8
10{
11public:
12 using HandlerMap = std::map<std::shared_ptr<GraphNode>, std::shared_ptr<BlockHandler>>;
13
14 BlockHandler(EntityBlock* blockEntity, const HandlerMap& allHandler);
15 virtual ~BlockHandler();
16 void executeOwnNode(std::shared_ptr<GraphNode> ownNode);
17 virtual void setData(PipelineData& data, const std::string& targetPort);
18
19protected:
20 std::string _blockName;
21 virtual bool executeSpecialized() = 0;
22 std::map<std::string, PipelineData> _dataPerPort;
23
24 const std::string _errorMessageBase = "Block execution failed due to incompatible input data dimension. ";
25
26private:
27 const HandlerMap& _allHandler;
28
29};
Common methods for all central service handler classes.
Definition BlockHandler.h:10
virtual ~BlockHandler()
Definition BlockHandler.cpp:9
virtual void setData(PipelineData &data, const std::string &targetPort)
Definition BlockHandler.cpp:53
std::string _blockName
Definition BlockHandler.h:20
std::map< std::string, PipelineData > _dataPerPort
Definition BlockHandler.h:22
const std::string _errorMessageBase
Definition BlockHandler.h:24
void executeOwnNode(std::shared_ptr< GraphNode > ownNode)
Definition BlockHandler.cpp:25
virtual bool executeSpecialized()=0
BlockHandler(EntityBlock *blockEntity, const HandlerMap &allHandler)
Definition BlockHandler.cpp:3
std::map< std::shared_ptr< GraphNode >, std::shared_ptr< BlockHandler > > HandlerMap
Definition BlockHandler.h:12
Definition BusinessLogicHandler.h:16
Definition PipelineData.h:14