scram::mef::Initializer
This class operates on input files to initialize analysis constructs like models, fault trees, and events. More...
#include <initializer.h>
Inherits from boost::noncopyable
Public Classes
| Name | |
|---|---|
| struct | Extractor |
| struct | Extractor< T, -1 > <br>Specialization of Extractor to extract all expressions into arg vector. |
Public Functions
| Name | |
|---|---|
| Gate * | Register(const xml::Element & gate_node, const std::string & base_path, RoleSpecifier container_role)<br>Specializations for element registrations. |
| BasicEvent * | Register(const xml::Element & event_node, const std::string & base_path, RoleSpecifier container_role) |
| HouseEvent * | Register(const xml::Element & event_node, const std::string & base_path, RoleSpecifier container_role) |
| Parameter * | Register(const xml::Element & param_node, const std::string & base_path, RoleSpecifier container_role) |
| CcfGroup * | Register(const xml::Element & ccf_node, const std::string & base_path, RoleSpecifier container_role) |
| Sequence * | Register(const xml::Element & xml_node, const std::string & , RoleSpecifier ) |
| void | Define(const xml::Element & gate_node, Gate * gate)<br>Specializations for elements defined after registration. |
| void | Define(const xml::Element & event_node, BasicEvent * basic_event) |
| void | Define(const xml::Element & param_node, Parameter * parameter) |
| void | Define(const xml::Element & ccf_node, CcfGroup * ccf_group) |
| void | Define(const xml::Element & xml_node, Sequence * sequence) |
| void | Define(const xml::Element & et_node, EventTree * event_tree) |
| void | Define(const xml::Element & xml_node, InitiatingEvent * initiating_event) |
| void | Define(const xml::Element & rule_node, Rule * rule) |
| void | Define(const xml::Element & xml_node, Alignment * alignment) |
| void | Define(const xml::Element & xml_node, Substitution * substitution) |
| Initializer(const std::vector< std::string > & xml_files, core::Settings settings, bool allow_extern =false, xml::Validator * extra_validator =nullptr)<br>Reads input files with the structure of analysis constructs. | |
| std::unique_ptr< Model > | model() |
Detailed Description
class scram::mef::Initializer;This class operates on input files to initialize analysis constructs like models, fault trees, and events.
The initialization phase includes validation and proper setup of the constructs for future use or analysis.
Public Functions Documentation
function Register
Gate * Register(
const xml::Element & gate_node,
const std::string & base_path,
RoleSpecifier container_role
)Specializations for element registrations.
function Register
BasicEvent * Register(
const xml::Element & event_node,
const std::string & base_path,
RoleSpecifier container_role
)function Register
HouseEvent * Register(
const xml::Element & event_node,
const std::string & base_path,
RoleSpecifier container_role
)function Register
Parameter * Register(
const xml::Element & param_node,
const std::string & base_path,
RoleSpecifier container_role
)function Register
CcfGroup * Register(
const xml::Element & ccf_node,
const std::string & base_path,
RoleSpecifier container_role
)function Register
Sequence * Register(
const xml::Element & xml_node,
const std::string & ,
RoleSpecifier
)function Define
void Define(
const xml::Element & gate_node,
Gate * gate
)Specializations for elements defined after registration.
function Define
void Define(
const xml::Element & event_node,
BasicEvent * basic_event
)function Define
void Define(
const xml::Element & param_node,
Parameter * parameter
)function Define
void Define(
const xml::Element & ccf_node,
CcfGroup * ccf_group
)function Define
void Define(
const xml::Element & xml_node,
Sequence * sequence
)function Define
void Define(
const xml::Element & et_node,
EventTree * event_tree
)function Define
void Define(
const xml::Element & xml_node,
InitiatingEvent * initiating_event
)function Define
void Define(
const xml::Element & rule_node,
Rule * rule
)function Define
void Define(
const xml::Element & xml_node,
Alignment * alignment
)function Define
void Define(
const xml::Element & xml_node,
Substitution * substitution
)function Initializer
Initializer(
const std::vector< std::string > & xml_files,
core::Settings settings,
bool allow_extern =false,
xml::Validator * extra_validator =nullptr
)Reads input files with the structure of analysis constructs.
Parameters:
- xml_files The MEF XML input files.
- settings Analysis settings.
- allow_extern Allow external libraries in the input.
- extra_validator Additional XML validator to be run after the MEF validator.
Exceptions:
- IOError Input contains duplicate files.
- IOError One of the input files is not accessible.
- xml::Error The xml files contain errors or malformed.
- xml::ValidityError The xml files are not valid for schema.
- mef::ValidityError The input model contains errors.
Warning: Processing external libraries from XML input is UNSAFE. It allows loading and executing arbitrary code during analysis. Enable this feature for trusted input files and libraries only.
Initializes the analysis model from the given input files. Puts all events into their appropriate containers in the model.
function model
inline std::unique_ptr< Model > model()Return: The model built from the input files.
Updated on 2025-11-11 at 16:51:08 +0000
