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

Method renumber

src/laybasic/laybasic/layLineStyles.cc:508–526  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508void
509LineStyles::renumber ()
510{
511 // renumber the order indices
512 std::vector <lay::LineStyles::iterator> iters;
513 for (lay::LineStyles::iterator i = begin_custom (); i != end (); ++i) {
514 iters.push_back (i);
515 }
516 std::sort (iters.begin (), iters.end (), display_order ());
517
518 unsigned int oi = 1;
519 for (std::vector <lay::LineStyles::iterator>::const_iterator i = iters.begin (); i != iters.end (); ++i) {
520 if ((*i)->order_index () > 0) {
521 lay::LineStyleInfo p (**i);
522 p.set_order_index (oi++);
523 replace_style (std::distance (begin (), *i), p);
524 }
525 }
526}
527
528LineStyles::iterator
529LineStyles::begin_custom () const

Callers 4

delete_button_clickedMethod · 0.45
delete_button_clickedMethod · 0.45
remove_stippleFunction · 0.45
remove_line_styleFunction · 0.45

Calls 8

sortFunction · 0.85
endFunction · 0.70
display_orderClass · 0.70
beginFunction · 0.70
distanceFunction · 0.50
push_backMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected