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

Method do_realize

src/laybasic/laybasic/layLayerProperties.cc:600–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

598}
599
600void
601LayerProperties::do_realize (const LayoutViewBase *view) const
602{
603 m_layer_index = -1;
604 m_cellview_index = -1;
605 m_trans.clear ();
606 m_inv_prop_set = true;
607 m_prop_set.clear ();
608 m_hier_levels = m_source_real.hier_levels ();
609
610 if (view) {
611
612 if (m_source_real.cv_index () < 0) {
613 if (view->cellviews () > 0) {
614 m_cellview_index = 0;
615 }
616 } else if (m_source_real.cv_index () < int (view->cellviews ())) {
617 m_cellview_index = m_source_real.cv_index ();
618 }
619
620 if (m_cellview_index >= 0) {
621
622 const lay::CellView &cv = view->cellview (m_cellview_index);
623
624 // retrieve the property selector, if one is present
625 if (! m_source_real.property_selector ().is_null ()) {
626 m_inv_prop_set = m_source_real.property_selector ().matching (m_prop_set);
627 }
628
629 // compute the effective transformation in database units
630 m_trans = m_source_real.trans ();
631
632 if (m_source_real.special_purpose () == ParsedLayerSource::SP_None) {
633
634 m_layer_index = m_source_real.layer_index ();
635
636 // lookup the layer with the given name/layer/datatype
637 if (m_layer_index < 0 && ! m_source_real.is_wildcard_layer ()) {
638 m_layer_index = cv->layout ().get_layer_maybe (m_source_real.layer_props ());
639 }
640
641 }
642
643 }
644
645 }
646
647 if (m_trans.empty ()) {
648 m_trans.push_back (db::DCplxTrans ());
649 }
650}
651
652
653// -------------------------------------------------------------

Callers

nothing calls this directly

Calls 13

cellviewMethod · 0.80
matchingMethod · 0.80
layer_indexMethod · 0.80
is_wildcard_layerMethod · 0.80
get_layer_maybeMethod · 0.80
layer_propsMethod · 0.80
clearMethod · 0.45
cv_indexMethod · 0.45
is_nullMethod · 0.45
transMethod · 0.45
layoutMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected