14 #ifndef HTGS_RULEEDGE_HPP 15 #define HTGS_RULEEDGE_HPP 43 template<
class T,
class U,
class W>
54 bookkeeper(bookkeeper),
rule(
rule), consumer(consumer) {}
64 bool newConnector =
false;
66 if (connector ==
nullptr) {
70 connector = std::shared_ptr<Connector<U>>(
new Connector<U>());
76 connector->incrementInputTaskCount();
83 std::shared_ptr<ProfileData> producerData(
new CreateNodeProfile(
bookkeeper, graph,
"Bookkeeper"));
85 std::shared_ptr<ProfileData> connectorData(
new CreateConnectorProfile(connector.get(), graph, connector->getProducerCount(),
""));
87 graph->sendProfileData(producerData);
88 graph->sendProfileData(consumerData);
89 graph->sendProfileData(connectorData);
91 std::shared_ptr<ProfileData> producerConnectorData(
new CreateEdgeProfile(
bookkeeper, connector.get(),
rule->getName(), ruleManager));
92 graph->sendProfileData(producerConnectorData);
95 std::shared_ptr<ProfileData> connectorConsumerData(
new CreateEdgeProfile(connector.get(),
consumer,
"",
nullptr));
96 graph->sendProfileData(connectorConsumerData);
111 std::shared_ptr<IRule<T, U>>
rule;
115 #endif //HTGS_RULEEDGE_HPP std::shared_ptr< AnyConnector > getInputConnector() override
Gets the input Connector.
Definition: TaskManager.hpp:119
ITask< U, W > * consumer
the consumer task
Definition: RuleEdge.hpp:112
ITask< T, U > * getCopy(ITask< T, U > *orig)
Gets the copy for an ITask based on some original ITask reference.
Definition: AnyTaskGraphConf.hpp:327
RuleEdge(Bookkeeper< T > *bookkeeper, std::shared_ptr< IRule< T, U >> rule, ITask< U, W > *consumer)
Creates a rule edge.
Definition: RuleEdge.hpp:53
std::shared_ptr< IRule< T, U > > rule
the rule
Definition: RuleEdge.hpp:111
Implements the rule edge that is added to the graph.
Definition: RuleEdge.hpp:44
Bookkeeper< T > * bookkeeper
The bookkeeper task.
Definition: RuleEdge.hpp:110
Manages the input/output of IData between Tasks.
Definition: Connector.hpp:62
Provides an interface to send data along RuleManager edges for processing state and dependencies...
Definition: ExecutionPipeline.hpp:34
Implements the Bookkeeper class.
TaskManager< T, U > * getTaskManager(ITask< T, U > *task)
Gets the task manager that is responsible for a particular ITask.
Definition: AnyTaskGraphConf.hpp:362
void setOutputConnector(std::shared_ptr< AnyConnector > connector) override
Sets the output connector that the RuleManager is attached to.
Definition: RuleManager.hpp:157
Implements the base class used by the TaskGraphConf, which removes the template arguments and impleme...
void applyEdge(AnyTaskGraphConf *graph) override
Applies an edge to a task graph.
Definition: RuleEdge.hpp:58
Connects a Bookkeeper to another ITask using one or more IRule(s).
Definition: RuleManager.hpp:57
EdgeDescriptor * copy(AnyTaskGraphConf *graph) override
Creates a copy of the edge descriptor to be added to other graphs, such as those within execution pip...
Definition: RuleEdge.hpp:105
Implements the base class for the TaskGraphConf class, removing the template arguments and providing ...
Definition: AnyTaskGraphConf.hpp:66
void setInputConnector(std::shared_ptr< AnyConnector > connector) override
Sets the input BaseConnector.
Definition: TaskManager.hpp:318
The edge descriptor is an interface used to describe how an edge is applied and copied to a task grap...
Definition: EdgeDescriptor.hpp:39
Implements the edge descriptor interface to build edges for a task graph.
An interface to process input data and forward results within a TaskGraph.
Definition: Bookkeeper.hpp:23
virtual std::string getName() override
Virtual function to get the name of an ITask.
Definition: ITask.hpp:236
Special task used to manage rules.
Definition: Bookkeeper.hpp:60