scram::mef::Phase
Phases of alignments the models spends its time fraction.
#include <alignment.h>
Inherits from scram::mef::Element, scram::mef::ContainerElement, boost::noncopyable
Public Functions
| Name | |
|---|---|
| Phase(std::string name, double time_fraction)<br>Constructs an element with an original name. | |
| double | time_fraction() const |
| const std::vector< SetHouseEvent * > & | instructions() const |
| void | instructions(std::vector< SetHouseEvent * > instructions) |
Public Attributes
| Name | |
|---|---|
| constexpr const char * | kTypeString <br>For error messages. |
| double | time_fraction_ <br>The positive fraction of the mission time. |
| std::vector< SetHouseEvent * > | instructions_ <br>The phase modifiers. |
Additional inherited members
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. |
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 Phase
Phase(
std::string name,
double time_fraction
)Constructs an element with an original name.
Parameters:
- name The local identifier name.
- time_fraction The fraction of mission-time spent in the phase.
Exceptions:
- LogicError The name is required and empty.
- ValidityError The name is malformed.
- DomainError The fraction is not a valid value in (0, 1].
The name is expected to conform to identifier requirements described in the MEF documentation and additions.
function time_fraction
inline double time_fraction() constReturn: The positive fraction of mission-time spent in this phase.
function instructions
inline const std::vector< SetHouseEvent * > & instructions() constReturn: The instructions applied in this phase.
function instructions
inline void instructions(
std::vector< SetHouseEvent * > instructions
)Parameters:
- instructions Zero or more instructions for this phase.
Public Attributes Documentation
variable kTypeString
static constexpr const char * kTypeString = "phase";For error messages.
variable time_fraction_
double time_fraction_;The positive fraction of the mission time.
variable instructions_
std::vector< SetHouseEvent * > instructions_;The phase modifiers.
Updated on 2025-11-11 at 16:51:08 +0000
