scram::mef::Gate
A representation of a gate in a fault tree.
#include <event.h>
Inherits from scram::mef::Event, scram::mef::NodeMark, scram::mef::Id, scram::mef::Usage, scram::mef::Element, scram::mef::Role, scram::mef::ContainerElement, boost::noncopyable
Public Functions
| Name | |
|---|---|
| const Formula & | formula() const |
| Formula & | formula() |
| bool | HasFormula() const |
| std::unique_ptr< Formula > | formula(std::unique_ptr< Formula > formula)<br>Sets the formula of this gate. |
Public Attributes
| Name | |
|---|---|
| constexpr const char * | kTypeString <br>Type for errors only. |
Additional inherited members
Public Functions inherited from scram::mef::Event
| Name | |
|---|---|
| virtual | ~Event() =0<br>Abstract class. |
| Id(std::string name, std::string base_path ="", RoleSpecifier role =RoleSpecifier::kPublic)<br>Constructs an element with an original name. |
Public Types inherited from scram::mef::NodeMark
| Name | |
|---|---|
| enum std::uint8_t | Mark { kClear, kTemporary, kPermanent}<br>Possible marks for the node. |
Public Functions inherited from scram::mef::NodeMark
| Name | |
|---|---|
| Mark | mark() const |
| void | mark(Mark label)<br>Sets the mark for this node. |
Protected Functions inherited from scram::mef::NodeMark
| Name | |
|---|---|
| ~NodeMark() =default |
Public Functions inherited from scram::mef::Id
| Name | |
|---|---|
| const std::string & | unique_name(const Element & element)<br>Produces unique name for the model element within the same type. |
| const std::string & | unique_name(const Id & element) |
| Id(std::string name, std::string base_path ="", RoleSpecifier role =RoleSpecifier::kPublic)<br>Constructs an element with an original name. | |
| const std::string & | id() const |
| std::string_view | id_view() const |
| std::string_view | full_path() const |
| void | id(std::string name)<br>Resets the element ID. |
Protected Functions inherited from scram::mef::Id
| Name | |
|---|---|
| ~Id() =default |
Public Functions inherited from scram::mef::Usage
| Name | |
|---|---|
| bool | usage() const |
| void | usage(bool usage) |
Protected Functions inherited from scram::mef::Usage
| Name | |
|---|---|
| ~Usage() =default |
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 |
Protected Functions inherited from scram::mef::ContainerElement
| Name | |
|---|---|
| const Element * | container() const |
Friends inherited from scram::mef::ContainerElement
| Name | |
|---|---|
| class | Container |
Public Functions Documentation
function formula
inline const Formula & formula() constReturn: The formula of this gate.
Precondition: The gate has its formula initialized.
function formula
inline Formula & formula()function HasFormula
inline bool HasFormula() constReturn: true if the gate formula has been set.
function formula
inline std::unique_ptr< Formula > formula(
std::unique_ptr< Formula > formula
)Sets the formula of this gate.
Parameters:
- formula The new Boolean formula of this gate.
Return: The old formula.
Public Attributes Documentation
variable kTypeString
static constexpr const char * kTypeString = "gate";Type for errors only.
Updated on 2025-11-11 at 16:51:08 +0000
