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

Method set_cell

src/laybasic/laybasic/layCellView.cc:123–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void
124CellView::set_cell (cell_index_type index)
125{
126 tl_assert (m_layout_href.get () != 0);
127
128 db::Layout &layout = m_layout_href->layout ();
129
130 if (! layout.is_valid_cell_index (index)) {
131
132 reset_cell ();
133
134 } else {
135
136 m_cell_index = index;
137 mp_cell = &layout.cell (m_cell_index);
138
139 m_unspecific_path.clear ();
140 m_specific_path.clear ();
141 m_unspecific_path.push_back (index);
142
143 while (! layout.cell (index).is_top ()) {
144 index = *layout.cell (index).begin_parent_cells ();
145 m_unspecific_path.push_back (index);
146 }
147
148 std::reverse (m_unspecific_path.begin (), m_unspecific_path.end ());
149
150 mp_ctx_cell = mp_cell;
151 m_ctx_cell_index = m_cell_index;
152
153 }
154}
155
156void
157CellView::set_cell (const std::string &name)

Callers 11

commit_cvMethod · 0.45
apply_clickedMethod · 0.45
configureMethod · 0.45
change_cellMethod · 0.45
path_from_indexMethod · 0.45
updateMethod · 0.45
cm_new_layoutMethod · 0.45
set_cellFunction · 0.45
cellviewMethod · 0.45
select_cell_fitMethod · 0.45
select_cellMethod · 0.45

Calls 15

reverseFunction · 0.85
set_cellFunction · 0.85
is_valid_cell_indexMethod · 0.80
is_topMethod · 0.80
begin_parent_cellsMethod · 0.80
select_cellviewMethod · 0.80
index_of_cellviewMethod · 0.80
is_validFunction · 0.70
getMethod · 0.45
layoutMethod · 0.45
cellMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected