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

Method inc

src/laybasic/laybasic/layLayerProperties.cc:1185–1215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1183}
1184
1185void
1186LayerPropertiesConstIterator::inc (unsigned int d)
1187{
1188 if (d == 0) {
1189 return;
1190 } else if (d == 1) {
1191
1192 if (obj ()->has_children ()) {
1193 down_first_child ();
1194 } else {
1195 while (true) {
1196 std::pair <size_t, size_t> f = factor ();
1197 m_uint += f.first;
1198 mp_obj.reset (0);
1199 if (m_uint / f.first < f.second - 1) {
1200 break;
1201 } else if (at_top ()) {
1202 break;
1203 } else {
1204 up ();
1205 }
1206 }
1207 }
1208
1209 } else {
1210 // :KLUDGE: this is pretty slow ..
1211 while (d-- > 0) {
1212 inc (1);
1213 }
1214 }
1215}
1216
1217size_t
1218LayerPropertiesConstIterator::child_index () const

Callers

nothing calls this directly

Calls 4

objFunction · 0.70
incFunction · 0.50
has_childrenMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected