| 41 | } |
| 42 | |
| 43 | bool |
| 44 | ObjectInstPath::is_valid (lay::LayoutViewBase *view) const |
| 45 | { |
| 46 | const lay::CellView &cv = view->cellview (cv_index ()); |
| 47 | if (! cv.is_valid ()) { |
| 48 | return false; |
| 49 | } |
| 50 | |
| 51 | const db::Layout &ly = cv->layout (); |
| 52 | db::cell_index_type ci = topcell (); |
| 53 | if (! ly.is_valid_cell_index (ci)) { |
| 54 | return false; |
| 55 | } |
| 56 | |
| 57 | for (auto p = begin (); p != end (); ++p) { |
| 58 | if (! ly.cell (ci).is_valid (p->inst_ptr)) { |
| 59 | return false; |
| 60 | } |
| 61 | ci = p->inst_ptr.cell_index (); |
| 62 | if (! ly.is_valid_cell_index (ci)) { |
| 63 | return false; |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | if (! is_cell_inst ()) { |
| 68 | if (! ly.is_valid_layer (layer ()) && layer () != ly.guiding_shape_layer ()) { |
| 69 | return false; |
| 70 | } |
| 71 | if (! ly.cell (ci).shapes (layer ()).is_valid (shape ())) { |
| 72 | return false; |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | return true; |
| 77 | } |
| 78 | |
| 79 | db::cell_index_type |
| 80 | ObjectInstPath::cell_index_tot () const |
nothing calls this directly
no test coverage detected