syside.Heritage
- class Heritage
Bases:
syside.ChainedChildrenNodes
[syside.Conjugation | Specialization
,Type
]- append(relationship: type[syside.Heritage.append.R], element: syside.Heritage.append.M, name: syside.NameID = ...) tuple[syside.Heritage.append.R, syside.Heritage.append.M]
Append a new owned or referenced element, inferred from the relationship type and this container. Returns a pair of (relationship, element), only the relationship is newly constructed.
- replace(index: int, relationship: type[syside.Heritage.replace.R], element: syside.Heritage.replace.M, name: syside.NameID = ...) tuple[syside.Heritage.replace.R, syside.Heritage.replace.M]
Replace the relationship and its related element at the specified index. The relationship may be reused if its type matches the current relationship at that index. The related element may be owned or referenced depending on the relationship type and this container, see
append
for more details.
- insert(index: int, relationship: type[syside.Heritage.insert.R], element: syside.Heritage.insert.M, name: syside.NameID = ...) tuple[syside.Heritage.insert.R, syside.Heritage.insert.M]
Insert a relationship and a related element at the specified index. The related element may be owned or referenced depending on the relationship type and this container, see
append
for more details.
- append_chain(relationship: type[syside.Heritage.append_chain.R], features: Sequence[syside.Feature]) tuple[syside.Heritage.append_chain.R, syside.Feature]
Append a relationship with an owned chaining. Raises
TypeError
if the relationship type cannot have owned chaining in the textual syntax.