RelationshipBody
- class RelationshipBody
Container for relationship bodies. Works similarly to
ChildrenNodesexcept relationships are not needed and all elements are taken ownership off.TODO: add insert and replace methods.
Members defined in
RelationshipBody(5 members)
Members inherited from
ContainerView(11 members)
Methods
- append(element: type[syside.TElement]) syside.TElement
Append an owned related element. Returns newly constructed related element.
- append(element: syside.TElement) syside.TElement
Append an owned existing related element. Returns the same related element.
- append_annotation(element: type[syside.RelationshipBody.append_annotation.M]) tuple[syside.Annotation, syside.RelationshipBody.append_annotation.M]
Append an owned annotation to an annotating element. Returns a pair of newly constructed (annotation, annotating element).
- append_annotation(element: syside.RelationshipBody.append_annotation.M) tuple[syside.Annotation, syside.RelationshipBody.append_annotation.M]
Append an owned annotation to an existing annotating element. Returns a pair of (annotation, annotating element) where only the annotation is newly constructed.
- clear() None
Removes and releases all elements in this container. Afterwards,
lenis 0.
- pop(index: int = -1) syside.Element
Removes a related element at the specified index from the model tree and returns it.
- remove_element(arg: syside.Element, /) bool
Removes a related element from the model tree. Returns
Trueif the element was removed, otherwiseFalse.