Skip to content

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
structExtractor
structExtractor< 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 )
voidDefine(const xml::Element & gate_node, Gate * gate)<br>Specializations for elements defined after registration.
voidDefine(const xml::Element & event_node, BasicEvent * basic_event)
voidDefine(const xml::Element & param_node, Parameter * parameter)
voidDefine(const xml::Element & ccf_node, CcfGroup * ccf_group)
voidDefine(const xml::Element & xml_node, Sequence * sequence)
voidDefine(const xml::Element & et_node, EventTree * event_tree)
voidDefine(const xml::Element & xml_node, InitiatingEvent * initiating_event)
voidDefine(const xml::Element & rule_node, Rule * rule)
voidDefine(const xml::Element & xml_node, Alignment * alignment)
voidDefine(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 ​

cpp
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 ​

cpp
Gate * Register(
    const xml::Element & gate_node,
    const std::string & base_path,
    RoleSpecifier container_role
)

Specializations for element registrations.

function Register ​

cpp
BasicEvent * Register(
    const xml::Element & event_node,
    const std::string & base_path,
    RoleSpecifier container_role
)

function Register ​

cpp
HouseEvent * Register(
    const xml::Element & event_node,
    const std::string & base_path,
    RoleSpecifier container_role
)

function Register ​

cpp
Parameter * Register(
    const xml::Element & param_node,
    const std::string & base_path,
    RoleSpecifier container_role
)

function Register ​

cpp
CcfGroup * Register(
    const xml::Element & ccf_node,
    const std::string & base_path,
    RoleSpecifier container_role
)

function Register ​

cpp
Sequence * Register(
    const xml::Element & xml_node,
    const std::string & ,
    RoleSpecifier 
)

function Define ​

cpp
void Define(
    const xml::Element & gate_node,
    Gate * gate
)

Specializations for elements defined after registration.

function Define ​

cpp
void Define(
    const xml::Element & event_node,
    BasicEvent * basic_event
)

function Define ​

cpp
void Define(
    const xml::Element & param_node,
    Parameter * parameter
)

function Define ​

cpp
void Define(
    const xml::Element & ccf_node,
    CcfGroup * ccf_group
)

function Define ​

cpp
void Define(
    const xml::Element & xml_node,
    Sequence * sequence
)

function Define ​

cpp
void Define(
    const xml::Element & et_node,
    EventTree * event_tree
)

function Define ​

cpp
void Define(
    const xml::Element & xml_node,
    InitiatingEvent * initiating_event
)

function Define ​

cpp
void Define(
    const xml::Element & rule_node,
    Rule * rule
)

function Define ​

cpp
void Define(
    const xml::Element & xml_node,
    Alignment * alignment
)

function Define ​

cpp
void Define(
    const xml::Element & xml_node,
    Substitution * substitution
)

function Initializer ​

cpp
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:

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 ​

cpp
inline std::unique_ptr< Model > model()

Return: The model built from the input files.


Updated on 2025-12-19 at 21:56:46 +0000