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

Method set_obj

src/laybasic/laybasic/layLayerProperties.cc:1156–1183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1154}
1155
1156void
1157LayerPropertiesConstIterator::set_obj () const
1158{
1159 if (is_null () || !m_list) {
1160
1161 mp_obj.reset (0);
1162
1163 } else {
1164
1165 tl_assert (m_list);
1166
1167 size_t uint = m_uint;
1168 LayerPropertiesList::const_iterator iter = m_list->begin_const ();
1169 size_t n = ((m_list->end_const () - m_list->begin_const ()) + 2);
1170
1171 while (uint > n) {
1172 size_t rem = uint % n;
1173 tl_assert (rem > 0);
1174 tl_assert (rem < n - 1);
1175 uint /= n;
1176 n = ((iter[rem - 1].end_children () - iter[rem - 1].begin_children ()) + 2);
1177 iter = iter[rem - 1].begin_children ();
1178 }
1179
1180 mp_obj.reset (const_cast<lay::LayerPropertiesNode *> (&iter[uint - 1]));
1181
1182 }
1183}
1184
1185void
1186LayerPropertiesConstIterator::inc (unsigned int d)

Callers

nothing calls this directly

Calls 6

begin_constMethod · 0.80
end_constMethod · 0.80
is_nullFunction · 0.70
resetMethod · 0.45
end_childrenMethod · 0.45
begin_childrenMethod · 0.45

Tested by

no test coverage detected