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

Method invert

src/db/db/dbArray.h:2090–2106  ·  view source on GitHub ↗

* @brief Invert an array reference */

Source from the content-addressed store, hash-verified

2088 * @brief Invert an array reference
2089 */
2090 void invert ()
2091 {
2092 if (mp_base) {
2093 // Hint: detach from repository so we can invert
2094 if (mp_base->in_repository) {
2095 mp_base = mp_base->clone ();
2096 }
2097 // Hint: this assumes that the delegate does not carry a "superior" transformation over trans_type -
2098 // i.e. no complex trans inside arrays stating a unit_trans type for example. The assertion checks that.
2099 simple_trans_type t (m_trans);
2100 mp_base->invert (t);
2101 m_trans = trans_type (t);
2102 tl_assert (simple_trans_type (m_trans) == t);
2103 } else {
2104 m_trans.invert ();
2105 }
2106 }
2107
2108 /**
2109 * @brief Compare operator for inequality

Callers 15

test_6_LayoutMethod · 0.45
test_6_Layout_propsMethod · 0.45
test_2_TransMethod · 0.45
test_6_LayoutMethod · 0.45
test_6_Layout_propsMethod · 0.45
test_2_TransMethod · 0.45
test_0_CellInstArrayMethod · 0.45
test_0_DCellInstArrayMethod · 0.45
dbMatrixTests.ccFile · 0.45
dbArrayTests.ccFile · 0.45
dbTransTests.ccFile · 0.45
invertMethod · 0.45

Calls 1

cloneMethod · 0.45

Tested by 8

test_6_LayoutMethod · 0.36
test_6_Layout_propsMethod · 0.36
test_2_TransMethod · 0.36
test_6_LayoutMethod · 0.36
test_6_Layout_propsMethod · 0.36
test_2_TransMethod · 0.36
test_0_CellInstArrayMethod · 0.36
test_0_DCellInstArrayMethod · 0.36