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

Method translate

src/db/db/dbArray.h:2347–2359  ·  view source on GitHub ↗

* @brief The translation operator * * This operator is required since shape reference arrays are put into db::Layer objects * * Hint this method is supposed to be used for shape arrays. Instance arrays to not support the translate method currently. * TODO: this functionality should be put into the Shapes translate method rather than into this class ... */

Source from the content-addressed store, hash-verified

2345 * TODO: this functionality should be put into the Shapes translate method rather than into this class ...
2346 */
2347 void translate (const array<Obj, Trans> &d, db::generic_repository<coord_type> &rep, db::ArrayRepository &array_rep)
2348 {
2349 m_obj.translate (d.m_obj, rep, array_rep);
2350 m_trans = d.m_trans;
2351 if (mp_base && ! mp_base->in_repository) {
2352 delete mp_base;
2353 }
2354 if (d.mp_base) {
2355 mp_base = d.mp_base->in_repository ? array_rep.insert (*d.mp_base) : d.mp_base->clone ();
2356 } else {
2357 mp_base = 0;
2358 }
2359 }
2360
2361 /**
2362 * @brief The translation operator with transformation

Callers 1

translate_fromMethod · 0.45

Calls 3

insertMethod · 0.45
cloneMethod · 0.45
transformMethod · 0.45

Tested by

no test coverage detected