* @brief Invert an array reference */
| 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 |