class documentation

class RegisterSliceSet:

View In Hierarchy

A set of non-overlapping RegisterSlice.

On insertion, slices that would overlap with the inserted value are merged with the inserted value.

Method __init__ Creates a new set.
Method __iter__ Iterates on the register slices in the set.
Method __len__ Returns the number of slices in the set.
Method add Adds the passed register slice to the set.
Method remove Removes the passed register slice from the set.
Instance Variable _map Undocumented
def __init__(self, items=()):

Creates a new set.

Information

Parameters
items:_Iterable[RegisterSlice]An iterator over the slices initially present in the set. Overlapping slices will be merged upon addition.
def __iter__(self):

Iterates on the register slices in the set.

Returns
_Iterator[RegisterSlice]Undocumented
def __len__(self):

Returns the number of slices in the set.

Returns
intUndocumented
def add(self, register_slice):

Adds the passed register slice to the set.

The passed slice can overlap with existing slices in the set. In that case, the slices will be merged.

Parameters
register_slice:_Union[_Register, RegisterSlice]Undocumented
def remove(self, register_slice):

Removes the passed register slice from the set.

This will remove the intersection between the passed slice and any slice that overlaps with it.

Parameters
register_slice:_Union[_Register, RegisterSlice]Undocumented
_map =

Undocumented