| 583 | //----------------------------------------------------------------------------- |
| 584 | |
| 585 | SimObject* SimSetIterator::operator++() |
| 586 | { |
| 587 | SimSet* set; |
| 588 | if ((set = dynamic_cast<SimSet*>(*stack.last().itr)) != 0) |
| 589 | { |
| 590 | if (!set->empty()) |
| 591 | { |
| 592 | stack.push_back(set); |
| 593 | return *stack.last().itr; |
| 594 | } |
| 595 | } |
| 596 | |
| 597 | while (++stack.last().itr == stack.last().set->end()) |
| 598 | { |
| 599 | stack.pop_back(); |
| 600 | if (stack.empty()) |
| 601 | return 0; |
| 602 | } |
| 603 | return *stack.last().itr; |
| 604 | } |
| 605 | |
| 606 | //============================================================================= |
| 607 | // SimGroup. |