| 689 | }; |
| 690 | |
| 691 | void |
| 692 | XMPIterator::Skip ( XMP_OptionBits iterOptions ) |
| 693 | { |
| 694 | // if ( (info.currPos == kIter_NullPos) ) XMP_Throw ( "No prior postion to skip from", kXMPErr_BadIterPosition ); |
| 695 | if ( iterOptions == 0 ) XMP_Throw ( "Must specify what to skip", kXMPErr_BadOptions ); |
| 696 | if ( (iterOptions & ~kXMP_ValidIterSkipOptions) != 0 ) XMP_Throw ( "Undefined options", kXMPErr_BadOptions ); |
| 697 | |
| 698 | #if TraceIterators |
| 699 | printf ( "Skipping from %s, stage = %s, iterator @ %.8X", |
| 700 | info.currPos->fullPath.c_str(), sStageNames[info.currPos->visitStage], this ); |
| 701 | #endif |
| 702 | |
| 703 | if ( iterOptions & kXMP_IterSkipSubtree ) { |
| 704 | #if TraceIterators |
| 705 | printf ( ", mode = subtree\n" ); |
| 706 | #endif |
| 707 | info.currPos->visitStage = kIter_VisitChildren; |
| 708 | } else if ( iterOptions & kXMP_IterSkipSiblings ) { |
| 709 | #if TraceIterators |
| 710 | printf ( ", mode = siblings\n" ); |
| 711 | #endif |
| 712 | info.currPos = info.endPos; |
| 713 | AdvanceIterPos ( info ); |
| 714 | } |
| 715 | #if TraceIterators |
| 716 | printf ( " Skipped to %s, stage = %s\n", |
| 717 | info.currPos->fullPath.c_str(), sStageNames[info.currPos->visitStage] ); |
| 718 | #endif |
| 719 | |
| 720 | |
| 721 | } // Skip |
| 722 | |
| 723 | // ------------------------------------------------------------------------------------------------- |
| 724 | // UnlockIter |
no test coverage detected