AstraLog-HPC
Loading...
Searching...
No Matches
RulesFactory.hpp File Reference
#include "GenericFactory.hpp"
#include <RulesFactory/Rules.hpp>
#include "RuleOrdering.hpp"
#include <functional>
#include <memory>
#include <mutex>
#include <string>
#include <vector>
#include <unordered_map>
#include <iostream>
Include dependency graph for RulesFactory.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  RulesFactory
 Instantiates rule objects from a JSON config and assembles them into an EvaluationPipeline. More...
 

Typedefs

using Identifier = std::string
 
using Builder = std::function< std::unique_ptr< RuleStrategy >(const RuleConfig &)>
 
using MyObjectFactory = GenericFactory::Factory< RuleStrategy, Identifier, Builder >
 

Functions

std::vector< RuleConfig > loadRules (const std::string &file_path)
 Loads rule configurations from a JSON file.
 

Typedef Documentation

◆ Builder

using Builder = std::function<std::unique_ptr<RuleStrategy>(const RuleConfig&)>

◆ Identifier

using Identifier = std::string

◆ MyObjectFactory

Function Documentation

◆ loadRules()

std::vector< RuleConfig > loadRules ( const std::string &  file_path)

Loads rule configurations from a JSON file.

Parameters
file_pathPath to the JSON file containing the rule definitions.
Returns
A vector of RuleConfig objects ready for factory instantiation.
Exceptions
astralog::IoErrorIf the file cannot be opened.
astralog::ParseErrorIf the JSON cannot be parsed.
Here is the call graph for this function:
Here is the caller graph for this function: