Instantiates rule objects from a JSON config and assembles them into an EvaluationPipeline.
More...
#include <RulesFactory.hpp>
|
| | RulesFactory (const std::string &rules_path) |
| | Builds the rule map and evaluation pipeline from a rules JSON file.
|
| |
| EvaluationPipeline & | getPipeline () |
| | Returns the evaluation pipeline (primary rules per sensor plus correlation rules).
|
| |
| const std::unordered_map< std::string, std::shared_ptr< RuleStrategy > > & | getRuleMap () const |
| | Returns the map of rule ID to its instantiated rule strategy.
|
| |
Instantiates rule objects from a JSON config and assembles them into an EvaluationPipeline.
Registers the rule builders once, creates one RuleStrategy per config entry via the GenericFactory, and groups/sorts them with buildPipeline(). Entries that fail to instantiate are logged and skipped.
◆ RulesFactory()
| RulesFactory::RulesFactory |
( |
const std::string & |
rules_path | ) |
|
|
inlineexplicit |
Builds the rule map and evaluation pipeline from a rules JSON file.
- Parameters
-
| rules_path | Path to the rules JSON file. |
◆ getPipeline()
Returns the evaluation pipeline (primary rules per sensor plus correlation rules).
- Returns
- Reference to the assembled EvaluationPipeline.
◆ getRuleMap()
| const std::unordered_map< std::string, std::shared_ptr< RuleStrategy > > & RulesFactory::getRuleMap |
( |
| ) |
const |
|
inline |
Returns the map of rule ID to its instantiated rule strategy.
- Returns
- Const reference to the rule map.
◆ loadFactory()
| static void RulesFactory::loadFactory |
( |
| ) |
|
|
inlinestaticprivate |
◆ pipeline
◆ ruleMap
| std::unordered_map<std::string, std::shared_ptr<RuleStrategy> > RulesFactory::ruleMap |
|
private |
The documentation for this class was generated from the following file: