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

Method parent_obj

src/laybasic/laybasic/layLayerProperties.cc:1118–1140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1116}
1117
1118std::pair <const LayerPropertiesNode *, size_t>
1119LayerPropertiesConstIterator::parent_obj () const
1120{
1121 tl_assert (m_list);
1122
1123 size_t uint = m_uint;
1124 LayerPropertiesList::const_iterator iter = m_list->begin_const ();
1125 size_t n = ((m_list->end_const () - m_list->begin_const ()) + 2);
1126 const LayerPropertiesNode *ret = 0;
1127
1128 while (uint > n) {
1129 size_t rem = uint % n;
1130 tl_assert (rem > 0);
1131 tl_assert (rem < n - 1);
1132 ret = &iter[rem - 1];
1133 uint /= n;
1134 n = ((ret->end_children () - ret->begin_children ()) + 2);
1135 iter = ret->begin_children ();
1136 }
1137
1138 tl_assert (uint > 0);
1139 return std::make_pair (ret, uint - 1);
1140}
1141
1142void
1143LayerPropertiesConstIterator::invalidate ()

Callers 1

eraseMethod · 0.80

Calls 4

begin_constMethod · 0.80
end_constMethod · 0.80
end_childrenMethod · 0.45
begin_childrenMethod · 0.45

Tested by

no test coverage detected