| 1331 | } |
| 1332 | |
| 1333 | void |
| 1334 | Layout::insert_cell (cell_index_type ci, const std::string &name, db::Cell *cell) |
| 1335 | { |
| 1336 | // this method is supposed to restore a cell deleted before |
| 1337 | tl_assert (m_cell_names.size () > ci); |
| 1338 | tl_assert (m_cell_names [ci] == 0); |
| 1339 | |
| 1340 | char *cp = new char [name.size () + 1]; |
| 1341 | m_cell_names [ci] = cp; |
| 1342 | strcpy (cp, name.c_str ()); |
| 1343 | |
| 1344 | invalidate_hier (); |
| 1345 | |
| 1346 | m_cells.push_back_ptr (cell); |
| 1347 | m_cell_ptrs [ci] = cell; |
| 1348 | m_cell_map.insert (std::make_pair (cp, ci)); |
| 1349 | |
| 1350 | cell->reregister (); |
| 1351 | ++m_cells_size; |
| 1352 | } |
| 1353 | |
| 1354 | db::Cell * |
| 1355 | Layout::take_cell (cell_index_type ci) |
no test coverage detected