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

Method is_valid

src/laybasic/laybasic/layCellView.cc:45–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45bool
46CellView::is_valid () const
47{
48 if (m_layout_href.get () == 0 || mp_cell == 0) {
49 return false;
50 }
51
52 // check, if the path references valid cell indices.
53 for (unspecific_cell_path_type::const_iterator pp = m_unspecific_path.begin (); pp != m_unspecific_path.end (); ++pp) {
54 if (! m_layout_href.get ()->layout ().is_valid_cell_index (*pp)) {
55 return false;
56 }
57 }
58 for (specific_cell_path_type::const_iterator pp = m_specific_path.begin (); pp != m_specific_path.end (); ++pp) {
59 if (! pp->inst_ptr.instances () || ! pp->inst_ptr.instances ()->is_valid (pp->inst_ptr) || ! m_layout_href.get ()->layout ().is_valid_cell_index (pp->inst_ptr.cell_index ())) {
60 return false;
61 }
62 }
63
64 return true;
65}
66
67void
68CellView::set_unspecific_path (const unspecific_cell_path_type &p)

Callers 15

close_cellviewFunction · 0.45
cv_descendFunction · 0.45
cv_ascendFunction · 0.45
cv_is_cell_hiddenFunction · 0.45
cv_hide_cellFunction · 0.45
cv_show_cellFunction · 0.45
cv_show_all_cellsFunction · 0.45
find_internalMethod · 0.45
DisplayStateMethod · 0.45
png_textsFunction · 0.45

Calls 7

is_valid_cell_indexMethod · 0.80
getMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
layoutMethod · 0.45
instancesMethod · 0.45
cell_indexMethod · 0.45

Tested by

no test coverage detected