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

Method set_specific_path

src/laybasic/laybasic/layCellView.cc:86–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86void
87CellView::set_specific_path (const specific_cell_path_type &p)
88{
89 tl_assert (m_layout_href.get () != 0);
90
91 m_specific_path = p;
92 for (specific_cell_path_type::iterator pp = m_specific_path.begin (); pp != m_specific_path.end (); ++pp) {
93 // fix elements of the path not associated with a certain array instance (this may happen if
94 // unspecific selections are put into the path)
95 if (pp->array_inst.at_end ()) {
96 pp->array_inst = pp->inst_ptr.begin ();
97 }
98 }
99
100 if (p.empty ()) {
101 m_cell_index = m_ctx_cell_index;
102 mp_cell = mp_ctx_cell;
103 } else if (m_layout_href.get () && p.back ().inst_ptr.cell_index () < m_layout_href->layout ().cells ()) {
104 m_cell_index = p.back ().inst_ptr.cell_index ();
105 mp_cell = &m_layout_href->layout ().cell (m_cell_index);
106 } else {
107 reset_cell ();
108 }
109}
110
111CellView::unspecific_cell_path_type
112CellView::combined_unspecific_path () const

Callers 6

cellviewMethod · 0.80
select_cell_fitMethod · 0.80
select_cellMethod · 0.80
ascendMethod · 0.80
descendMethod · 0.80
deep_copyMethod · 0.80

Calls 12

select_cellviewMethod · 0.80
index_of_cellviewMethod · 0.80
is_validFunction · 0.70
getMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
at_endMethod · 0.45
emptyMethod · 0.45
cell_indexMethod · 0.45
backMethod · 0.45
layoutMethod · 0.45
cellMethod · 0.45

Tested by

no test coverage detected