LayerMap#

class pyedb.grpc.database.utility.layer_map.LayerMap(edb_object)#

Overview#

create

Create a layer map.

clear

Clear the layer map.

get_mapping_backward

Get the backward mapping for a given layer ID.

get_mapping_forward

Get the forward mapping for a given layer ID.

set_mapping

Set the mapping from one layer ID to another.

id

Get the layer map ID.

is_null

Check if the layer map is null.

Import detail#

from pyedb.grpc.database.utility.layer_map import LayerMap

Property detail#

property LayerMap.id#

Get the layer map ID.

Returns:
int

Layer map ID.

property LayerMap.is_null: bool#

Check if the layer map is null.

Returns:
bool

True if the layer map is null, False otherwise.

Attribute detail#

LayerMap.core#

Method detail#

classmethod LayerMap.create(direction: str = 'two_way') LayerMap#

Create a layer map.

Parameters:
directionstr, optional

Direction of the layer map. Options are “two_way”, “forward”, and “backward”. Default is “two_way”.

Returns:
LayerMap

Layer map object.

LayerMap.clear()#

Clear the layer map.

LayerMap.get_mapping_backward(layer_id: int) int#

Get the backward mapping for a given layer ID.

Parameters:
layer_idint

Layer ID to get the backward mapping for.

Returns:
int

Mapped layer ID.

LayerMap.get_mapping_forward(layer_id: int) int#

Get the forward mapping for a given layer ID.

Parameters:
layer_idint

Layer ID to get the forward mapping for.

Returns:
int

Mapped layer ID.

LayerMap.set_mapping(layer_id_from: int, layer_id_to: int)#

Set the mapping from one layer ID to another.

Parameters:
layer_id_fromint

Layer ID to map from.

layer_id_toint

Layer ID to map to.