syside.ConnectorEndsAccessor

class ConnectorEndsAccessor

Bases: syside.ChildrenNodesView[syside.ConnectorEndsAccessor.R, syside.ConnectorEndsAccessor.M]

property modifiable: bool

Returns True if the contents of this accessor can be modified. In such a case, try_ methods will return values, and corresponding modification methods will not raise ValueErrors.

False is returned when the corresponding textual syntax position is already occupied by other elements, e.g. FlowConnectionUsage declared_messages and declared_ends share the same position.

try_append(arg0: syside.M, /) tuple[syside.R, syside.M] | None

Try appending a new Feature. Ownership constraints apply.

Returns a pair of (membership, feature) where feature is the argument passed in if the contents can be modified. Note that generally empty Features are not syntactically correct, and the correct syntax depends on the owner type.

try_append() tuple[syside.R, syside.M] | None

Try appending a new default constructed Feature with type inferred from the corresponding member type in the textual syntax dependent on the owner of this accessor.

Returns a pair of (membership, feature) if the contents can be modified. Note that generally empty Features are not syntactically correct, and the correct syntax depends on the owner type.

try_insert(arg0: int, arg1: syside.M, /) tuple[syside.R, syside.M] | None

Try inserting a new Feature at the specified index. Ownership constraints apply.

Returns a pair of (membership, feature) where feature is the argument passed in if the contents can be modified. Note that generally empty Features are not syntactically correct, and the correct syntax depends on the owner type.

try_insert(arg0: int, /) tuple[syside.R, syside.M] | None

Try inserting a new default constructed Feature at the index specified with type inferred from the corresponding member type in the textual syntax dependent on the owner of this accessor.

Returns a pair of (membership, feature) if the contents can be modified. Note that generally empty Features are not syntactically correct, and the correct syntax depends on the owner type.

append(arg0: syside.M, /) tuple[syside.R, syside.M]

Same as try_append but will raise ValueError if the contents cannot be modified.

append(/) tuple[syside.R, syside.M]
insert(arg0: int, arg1: syside.M, /) tuple[syside.R, syside.M]

Same as insert but will raise ValueError if the contents cannot be modified.

insert(arg0: int, /) tuple[syside.R, syside.M]
clear() None

Clear the contents accessed by this accessor. Does nothing if the contents cannot be modified.

erase(arg: int, /) None

Erase Feature at the specified index. Raises ValueError if the index is out of bounds.

property relationships: syside.ContainerView[syside.R]

The relationships in this container.

property elements: syside.ContainerView[syside.M]

The related elements in this container.

__len__() int
__bool__() bool
__getitem__(arg: int, /) Tuple[syside.R, syside.M]
at(arg: int, /) Tuple[syside.R, syside.M] | None
classmethod __class_getitem__(item)