class documentation

Data view class which handles conversion between portions of data sections and appropriate data types

A data view is given by its target data section, type converter, and indices within the target. Indices must be contiguous and forward-facing.

Data views are effectively pointers to the data sections they view, converting data in and out as specified. Note that data views cannot target other data views; this is done for implementation simplicity.

Data views can be declared by decorating methods:

@View(section[slice], Converter)
def data_view(self) -> _T:
    ...

An optional second parameter can be passed, wherein the method is used as a pre-converter before Converter.set.

Method __getitem__ Undocumented
Method __init__ Define a new data view given a data section to watch, a type converter, and the portion of the section to view
Property indices Undocumented
Property target Undocumented
Method __index__ Undocumented
Method __set__ Undocumented
Method _get_raw Undocumented
Instance Variable _indices Undocumented
Instance Variable _length Undocumented
Instance Variable _target Undocumented

Inherited from Section:

Method __copy__ Undocumented
Property length The length of this section
Property name The Raw class attribute name that this section stores to
Method __call__ Undocumented
Method __deepcopy__ Undocumented
Method __get__ Undocumented
Method __set_name__ Undocumented
Method _set_raw Undocumented
Instance Variable _converter Undocumented
Instance Variable _get Undocumented
Instance Variable _name Undocumented
Instance Variable _set Undocumented
def __getitem__(self, indices: slice) -> View: (source)

Undocumented

def __init__(self, target: Section, converter: type[Converter], indices: slice = slice(None)): (source)

Define a new data view given a data section to watch, a type converter, and the portion of the section to view

Parameters
target:SectionThe data section to view
converter:type[Converter]The type converter for the view (defaults to Bytes)
indices:sliceThe slice of the data section to view (defaults to the entire section)

Undocumented

Undocumented

def __index__(self) -> slice: (source)

Undocumented

def __set__(self, instance, value: _T): (source)

Undocumented

def _get_raw(self, instance) -> bytes: (source)

Undocumented

_indices = (source)

Undocumented

Undocumented

Undocumented