scram::mef::FaultTree
Fault tree representation as a container of gates, basic and house events, and other information. More...
#include <fault_tree.h>
Inherits from scram::mef::Component, scram::mef::Element, scram::mef::Role, scram::mef::Composite< Container< Component, Component, true, false >, Container< Component, BasicEvent, false, false >, Container< Component, HouseEvent, false, false >, Container< Component, Gate, false, false >, Container< Component, Parameter, false, false >, Container< Component, CcfGroup, false, false > >, scram::mef::ContainerElement, boost::noncopyable
Public Functions
| Name | |
|---|---|
| FaultTree(const std::string & name)<br>The main constructor of the Fault Tree. | |
| const std::vector< const Gate * > & | top_events() const |
| void | CollectTopEvents()<br>Collects top event gates in this fault tree with components. |
Public Attributes
| Name | |
|---|---|
| constexpr const char * | kTypeString <br>Type identifier string for error messages. |
Additional inherited members
Public Functions inherited from scram::mef::Component
| Name | |
|---|---|
| auto | gates() const |
| auto | basic_events() const |
| auto | house_events() const |
| auto | parameters() const |
| auto | ccf_groups() const |
| auto | components() const |
| void | Add(Gate * element)<br>Adds MEF constructs into this component container. |
| void | Add(BasicEvent * element) |
| void | Add(HouseEvent * element) |
| void | Add(CcfGroup * element) |
| Component(std::string name, std::string base_path ="", RoleSpecifier role =RoleSpecifier::kPublic)<br>Constructs a component assuming that it exists within some fault tree. | |
| virtual | ~Component() =default |
Protected Functions inherited from scram::mef::Component
| Name | |
|---|---|
| void | GatherGates(std::unordered_set< Gate * > * gates)<br>Recursively traverses components to gather gates relevant to the whole component. |
Public Types inherited from scram::mef::Element
| Name | |
|---|---|
| using ext::linear_set< Attribute, AttributeKey > | AttributeMap <br>Unique attribute map keyed with the attribute names. |
Public Functions inherited from scram::mef::Element
| Name | |
|---|---|
| Element(std::string name)<br>Constructs an element with an original name. | |
| const std::string & | name() const |
| std::string_view | name_view() const |
| const std::string & | label() const |
| void | label(std::string label)<br>Sets the element label. |
| const AttributeMap & | attributes() const |
| void | AddAttribute(Attribute attr)<br>Adds an attribute to the attribute map of this element. |
| void | SetAttribute(Attribute attr)<br>Sets an attribute to the attribute map. |
| const Attribute * | GetAttribute(std::string_view name) const |
| std::optional< Attribute > | RemoveAttribute(std::string_view name)<br>Removes an attribute of this element. |
Protected Functions inherited from scram::mef::Element
| Name | |
|---|---|
| ~Element() =default | |
| void | name(std::string name)<br>Resets the element name. |
Public Functions inherited from scram::mef::Role
| Name | |
|---|---|
| Role(RoleSpecifier role =RoleSpecifier::kPublic, std::string base_path ="")<br>Sets the role of an element upon creation. | |
| RoleSpecifier | role() const |
| const std::string & | base_path() const |
Protected Functions inherited from scram::mef::Role
| Name | |
|---|---|
| ~Role() =default |
| Name | |
|---|---|
| template <class T > <br>auto | table() const |
| template <class T > <br>auto | table() |
| template <class T ,class ContainerType =typename detail::container_of<T, Ts...>::type> <br>const T & | Get(const typename ContainerType::key_type & id) const<br>Retrieves an element from the container. |
| template <class T ,class ContainerType =typename detail::container_of<T, Ts...>::type> <br>T & | Get(const typename ContainerType::key_type & id) |
Protected Functions inherited from scram::mef::Composite< Container< Component, Component, true, false >, Container< Component, BasicEvent, false, false >, Container< Component, HouseEvent, false, false >, Container< Component, Gate, false, false >, Container< Component, Parameter, false, false >, Container< Component, CcfGroup, false, false > >
| Name | |
|---|---|
| template <class T > <br>decltype(auto) | data() const |
Protected Functions inherited from scram::mef::ContainerElement
| Name | |
|---|---|
| const Element * | container() const |
Friends inherited from scram::mef::ContainerElement
| Name | |
|---|---|
| class | Container |
Detailed Description
class scram::mef::FaultTree;Fault tree representation as a container of gates, basic and house events, and other information.
Additional functionality of a fault tree includes detection of top events.
Public Functions Documentation
function FaultTree
explicit FaultTree(
const std::string & name
)The main constructor of the Fault Tree.
Parameters:
- name The name identifier of this fault tree.
Fault trees are assumed to be public and belong to the root model.
function top_events
inline const std::vector< const Gate * > & top_events() constReturn: The collected top events of this fault tree.
function CollectTopEvents
void CollectTopEvents()Collects top event gates in this fault tree with components.
Precondition: Gate marks are clear.
This function is essential to guess the analysis targets if the user does not supply any. If the structure of the fault tree changes, this function must be called again to update the top events.
Public Attributes Documentation
variable kTypeString
static constexpr const char * kTypeString = "fault tree";Type identifier string for error messages.
Updated on 2025-11-11 at 16:51:08 +0000
