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

Method insert

src/db/db/dbCellMapping.cc:200–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198 bool m_repr_set;
199
200 void insert (const db::Layout &layout, db::cell_index_type current_cell, db::cell_index_type cell, const std::set<db::cell_index_type> &cone, trans_set_t &trans, const db::ICplxTrans &current_trans)
201 {
202 if (current_cell == cell) {
203 trans.insert (current_trans);
204 } else {
205
206 const db::Cell &cc = layout.cell (current_cell);
207 size_t instances = cc.cell_instances ();
208 SortedCellIndexIterator begin (cc, 0);
209 SortedCellIndexIterator end (cc, instances);
210
211 SortedCellIndexIterator i = begin;
212 for (std::set<db::cell_index_type>::const_iterator c = cone.begin (); c != cone.end () && i != end; ++c) {
213 if (*i <= *c) {
214 for (i = std::lower_bound (i, end, *c); i != end && *i == *c; ++i) {
215 for (db::CellInstArray::iterator arr = i.instance ().begin (); ! arr.at_end (); ++arr) {
216 insert (layout, *c, cell, cone, trans, current_trans * i.instance ().complex_trans (*arr));
217 }
218 }
219 }
220 }
221
222 }
223 }
224
225 bool compare (const db::Layout &layout, db::cell_index_type current_cell, db::cell_index_type cell, const std::set<db::cell_index_type> &cone, trans_set_t &trans, const db::ICplxTrans &current_trans, const db::ICplxTrans &local_trans)
226 {

Callers 7

compareMethod · 0.45
make_endpointMethod · 0.45
create_from_geometryMethod · 0.45
extract_uniqueMethod · 0.45

Calls 8

cell_instancesMethod · 0.80
insertFunction · 0.70
cellMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
instanceMethod · 0.45
at_endMethod · 0.45
complex_transMethod · 0.45

Tested by

no test coverage detected