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

Function do_delete

src/db/db/dbLayoutQuery.cc:1762–1789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1760 unsigned int m_count;
1761
1762 void do_delete ()
1763 {
1764 tl::Variant v;
1765 if (FilterStateBase::get_property (m_pids.shape, v)) {
1766
1767 db::Shape *shape = &v.to_user<db::Shape> ();
1768 if (shape->shapes ()) {
1769 shape->shapes ()->erase_shape (*shape);
1770 *shape = db::Shape ();
1771 }
1772
1773 } else if (FilterStateBase::get_property (m_pids.inst, v)) {
1774
1775 db::Instance *instance = &v.to_user<db::Instance> ();
1776 if (instance->instances ()) {
1777 instance->instances ()->erase (*instance);
1778 *instance = db::Instance ();
1779 }
1780
1781 } else if (FilterStateBase::get_property (m_pids.cell_index, v)) {
1782
1783 db::cell_index_type cid = db::cell_index_type (v.to_ulong ());
1784 if (layout ()->is_valid_cell_index (cid)) {
1785 layout ()->delete_cell (cid);
1786 }
1787
1788 }
1789 }
1790
1791};
1792

Callers 2

resetFunction · 0.70
nextFunction · 0.70

Calls 10

InstanceClass · 0.85
erase_shapeMethod · 0.80
to_ulongMethod · 0.80
is_valid_cell_indexMethod · 0.80
delete_cellMethod · 0.80
get_propertyFunction · 0.70
ShapeFunction · 0.70
layoutFunction · 0.70
instancesMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected