AstraLog-HPC
Loading...
Searching...
No Matches
RulesFactory.cpp File Reference

Implementation of rule-configuration loading from a JSON file. More...

#include <RulesFactory/RulesFactory.hpp>
#include <common/io.hpp>
#include <fstream>
#include <json/json.h>
Include dependency graph for RulesFactory.cpp:

Functions

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

Detailed Description

Implementation of rule-configuration loading from a JSON file.

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: