Connects a Bookkeeper to another ITask using one or more IRule(s).
More...
#include <htgs/core/rules/RuleManager.hpp>
template<class T, class U>
class htgs::RuleManager< T, U >
Connects a Bookkeeper to another ITask using one or more IRule(s).
When data is forwarded to the RuleManager from the Bookkeeper, the data is passed to an IRule that is associated with the RuleManager. Each IRule is responsible for determining when/if data is ready to be sent to the ITask the RuleManager is bound to.
The input and output types of each IRule added to a RuleManager must match the input and output types of the RuleManager.
Example Usage:
DataRule *rule = new DataRule();
Data2ProcessingTask *data2Task = new Data2ProcessingTask();
- Template Parameters
-
◆ RuleManager()
template<class T, class U>
Creates a rule manager with a rule.
- Parameters
-
- Note
- This function should only be called by the HTGS API
◆ copy()
template<class T, class U>
Creates a copy of the RuleManager.
The original and all copies share the same rule and access them synchronously.
- Returns
- the RuleManager copy
- Note
- This function should only be called by the HTGS API
Implements htgs::AnyRuleManager.
◆ debug()
template<class T, class U>
◆ executeTask()
template<class T, class U>
Processes the input data, which is forwarded to the IRule synchronously.
It is possible the data received is nullptr, at which it will first check for rule termination before processing the null data.
- Parameters
-
- Note
- This function should only be called by the HTGS API
Implements htgs::AnyRuleManagerInOnly< T >.
◆ getConnector()
template<class T, class U>
Gets the output connector associated with the RuleManager.
- Returns
- the output connector
- Note
- This function should only be called by the HTGS API
Implements htgs::AnyRuleManager.
◆ getName()
template<class T, class U>
◆ initialize()
template<class T, class U>
void htgs::RuleManager< T, U >::initialize |
( |
size_t |
pipelineId, |
|
|
size_t |
numPipelines, |
|
|
std::string |
address |
|
) |
| |
|
inlineoverridevirtual |
Initializes the RuleManager.
- Parameters
-
pipelineId | the pipelineID |
numPipelines | the number of pipelines |
address | the address for the bookkeeper task |
- Note
- This function should only be called by the HTGS API
Implements htgs::AnyRuleManager.
◆ isTerminated()
template<class T, class U>
◆ setOutputConnector()
template<class T, class U>
Sets the output connector that the RuleManager is attached to.
- Parameters
-
connector | the output connector |
- Note
- This function should only be called by the HTGS API
Implements htgs::AnyRuleManager.
◆ shutdown()
template<class T, class U>
Shuts down the RuleManager.
Will also shutdown the rule associated with the RuleManager Only called if the bookkeeper associated with the RuleManager is shutting down (all rules managers are closed and input is no longer producing data)
- Note
- This function should only be called by the HTGS API
Implements htgs::AnyRuleManager.
The documentation for this class was generated from the following file: