| 43 | } |
| 44 | |
| 45 | bool |
| 46 | CellView::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 | |
| 67 | void |
| 68 | CellView::set_unspecific_path (const unspecific_cell_path_type &p) |
no test coverage detected