MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / Skip

Method Skip

xmpsdk/src/XMPIterator.cpp:691–721  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689};
690
691void
692XMPIterator::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

Callers 1

WXMPIterator_Skip_1Function · 0.80

Calls 2

AdvanceIterPosFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected