ChainedChildrenNodes

class ChainedChildrenNodes

Container that stores a vector of children nodes that may own feature chainings.

%3 ChainedChildrenNodes ChainedChildrenNodes syside.ChainedChildrenNodes ChildrenNodes ChildrenNodes syside.ChildrenNodes ChildrenNodes->ChainedChildrenNodes ChildrenNodesView ChildrenNodesView syside.ChildrenNodesView ChildrenNodesView->ChildrenNodes
Children
Members defined in ChainedChildrenNodes (3 members)

append_chain

Append a relationship with an owned chaining. Raises TypeError if the relationship type cannot have owned chaining in the textual syntax.

insert_chain

Insert a relationship with an owned chaining at the specified index. Raises TypeError if the relationship type cannot have owned chaining in the textual syntax.

replace_chain_at

Replace the relationship and its related element at the specified index with an owned chaining. The relationship may be reused if its type matches the current relationship at that index. Raises TypeError if the relationship type cannot have owned chaining in the textual syntax.

Members inherited from ChildrenNodes (11 members)

append

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.

clear

Clear all nodes from this container. Size is reset to 0 afterwards.

extract

Extracts and returns the element from this container at the specified index without clearing its subtree. The relationship may be reused internally when constructing a new relationship of the same type, while the related element will not.

extract_element

Extracts a related element from this container without clearing its subtree.

extract_with_relationship

Removes a relationship and extracts its related element from this container without clearing its subtree.

insert

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.

pop

Removes and returns a pair (relationship, element) from this container at the specified index. The relationship may be reused internally when constructing a new relationship of the same type, while the related element will only be reused if it was and owned related element. In this case, the related element may be assigned to a new owner in the same document. Note that removed owned related elements will have all the elements in the subtree removed as well.

remove_element

Removes a related element from this container. Returns True if the related element was removed, and False otherwise. Note that removed owned related elements will have all the elements in the subtree removed as well.

remove_relationship

Removes a relationship and its related element from this container. Returns True if the relationship was removed, and False otherwise. Note that removed owned related elements will have all the elements in the subtree removed as well.

replace

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.

reserve

Increase the capacity of the container. Size is not changed.

Members inherited from ChildrenNodesView (6 members)

elements

R

The related elements in this container.

relationships

R

The relationships in this container.

__bool__

__getitem__

__len__

at

Methods

append_chain(relationship: type[syside.R], features: Sequence[syside.Feature]) tuple[syside.R, syside.Feature]

Append a relationship with an owned chaining. Raises TypeError if the relationship type cannot have owned chaining in the textual syntax.

insert_chain(index: int, relationship: type[syside.R], features: Sequence[syside.Feature]) tuple[syside.R, syside.Feature]

Insert a relationship with an owned chaining at the specified index. Raises TypeError if the relationship type cannot have owned chaining in the textual syntax.

replace_chain_at(index: int, relationship: type[syside.R], features: Sequence[syside.Feature]) tuple[syside.R, syside.Feature]

Replace the relationship and its related element at the specified index with an owned chaining. The relationship may be reused if its type matches the current relationship at that index. Raises TypeError if the relationship type cannot have owned chaining in the textual syntax.