Package genlayer.py.storage._internal.core#

Warning

This is an internal module

class genlayer.py.storage._internal.core.ComplexCopyAction[source]#
__init__(*args, **kwargs)#
class genlayer.py.storage._internal.core.Indirection[source]#

This class provides ability to save data at its own slot. Occupies 1 byte to prevent collision.

__init__()[source]#
slot() Slot[source]#
Returns:

Slot at which data resides

Return type:

Slot

class genlayer.py.storage._internal.core.IndirectionTypeDesc[source]#
__init__(item_desc: TypeDesc)[source]#
set(slot: Slot, off: int, val: Indirection) None[source]#

Method that writes value to slot and offset pair

class genlayer.py.storage._internal.core.InmemManager[source]#
__init__()[source]#
class genlayer.py.storage._internal.core.InmemSlot[source]#

In-memory storage slot which can be used to create storage entities without “Host”

__init__(addr: bytes, manager: Manager)[source]#
class genlayer.py.storage._internal.core.Manager[source]#
__init__(*args, **kwargs)#
class genlayer.py.storage._internal.core.PseudoSequence[source]#

Class that supports indexing elements but not slicing

__init__(*args, **kwargs)#
class genlayer.py.storage._internal.core.SpecialTypeDesc[source]#
__eq__(r)[source]#

Return self==value.

__hash__() int[source]#

Return hash(self).

Return type:

int

__init__(item_desc: TypeDesc, view_ctor: Callable[[], _WithStorageSlotAndTD])[source]#
get(slot: Slot, off: int) Any[source]#

Method that reads value from slot and offset pair

Return type:

Any

class genlayer.py.storage._internal.core.TypeDesc[source]#

Basic type description

__init__(size: int, copy_actions: list[CopyAction])[source]#
__repr__()[source]#

Return repr(self).

copy_actions: list[CopyAction]#

actions that must be executed for copying this data

int represents memcpy

abstract get(slot: Slot, off: int) T[source]#

Method that reads value from slot and offset pair

Return type:

T

abstract set(slot: Slot, off: int, val: T) None[source]#

Method that writes value to slot and offset pair

size: int#

size that value takes in current slot

class genlayer.py.storage._internal.core.VLA[source]#

Variable Length Array. Can be used in pair with Indirection to save length at the same place as data. Can also be used in C language way. Occupies at least 4 bytes (for length)

class genlayer.py.storage._internal.core.VLATypeDesc[source]#
__init__(item_desc: TypeDesc)[source]#
set(slot: Slot, off: int, val: VLA) None[source]#

Method that writes value to slot and offset pair