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