MCPcopy Create free account
hub / github.com/KLayout/klayout / init_layer

Function init_layer

src/db/db/dbDeepShapeStore.cc:555–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553static size_t s_instance_count = 0;
554
555static unsigned int init_layer (db::Layout &layout, const db::RecursiveShapeIterator &si)
556{
557 unsigned int layer_index = layout.insert_layer ();
558
559 if (si.layout ()) {
560 // try to preserve the layer properties
561 if (! si.multiple_layers ()) {
562 if (si.layer () < si.layout ()->layers ()) {
563 layout.set_properties (layer_index, si.layout ()->get_properties (si.layer ()));
564 }
565 } else if (! si.layers ().empty ()) {
566 layout.set_properties (layer_index, si.layout ()->get_properties (si.layers ().front ()));
567 }
568 }
569
570 return layer_index;
571}
572
573DeepShapeStore::DeepShapeStore ()
574 : m_keep_layouts (true), m_wants_all_cells (false), m_sparse_array_limit (-1.0)

Callers 3

create_from_flatMethod · 0.85
create_polygon_layerMethod · 0.85
create_custom_layerMethod · 0.85

Calls 8

get_propertiesMethod · 0.80
insert_layerMethod · 0.45
layoutMethod · 0.45
layerMethod · 0.45
layersMethod · 0.45
set_propertiesMethod · 0.45
emptyMethod · 0.45
frontMethod · 0.45

Tested by

no test coverage detected