scram::mef::Alignment
Alignment configuration for the whole model per analysis.
#include <alignment.h>
Inherits from scram::mef::Element, scram::mef::Container< Alignment, Phase >, scram::mef::ContainerElement, boost::noncopyable
Public Functions
| Name | |
|---|---|
| auto | phases() const |
| void | Validate()<br>Ensures that all phases add up to be valid for the alignment. |
| Element(std::string name)<br>Constructs an element with an original name. |
Public Attributes
| Name | |
|---|---|
| constexpr const char * | kTypeString <br>Type string for error messages. |
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 | |
|---|---|
| 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 Types inherited from scram::mef::Container< Alignment, Phase >
| Name | |
|---|---|
| using T | ElementType <br>The MEF Element type. |
| using std::conditional_t< Ownership, std::unique_ptr< T >, T * > | Pointer <br>The pointer type (owning or not) to store in the table. |
| using std::conditional_t< ById, IdTable< Pointer >, ElementTable< Pointer > > | TableType <br>The table indexed by id or name. |
| using typename TableType::key_type | key_type <br>The key type of the table. |
Public Functions inherited from scram::mef::Container< Alignment, Phase >
| Name | |
|---|---|
| auto | table() const |
| auto | table() |
| const T & | Get(const key_type & id) const<br>Retrieves an element from the container. |
| T & | Get(const key_type & id) |
| void | Add(Pointer element)<br>Adds a unique element into the container, ensuring no duplicated entries. |
| Pointer | Remove(T * element)<br>Removes MEF elements from the container. |
Protected Functions inherited from scram::mef::Container< Alignment, Phase >
| Name | |
|---|---|
| const TableType & | data() const |
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 phases
inline auto phases() constReturn: The table range of phases in the alignment.
function Validate
void Validate()Ensures that all phases add up to be valid for the alignment.
Exceptions:
- ValidityError Phases are incomplete (e.g., don't sum to 1).
function Element
explicit Element(
std::string name
)Constructs an element with an original name.
Parameters:
- name The local identifier name.
Exceptions:
- LogicError The name is required and empty.
- ValidityError The name is malformed.
The name is expected to conform to identifier requirements described in the MEF documentation and additions.
Public Attributes Documentation
variable kTypeString
static constexpr const char * kTypeString = "alignment";Type string for error messages.
Updated on 2025-11-11 at 16:51:08 +0000
