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

Method SetArrayItem

xmpsdk/src/XMPMeta-GetSet.cpp:474–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472// ------------
473
474void
475XMPMeta::SetArrayItem ( XMP_StringPtr schemaNS,
476 XMP_StringPtr arrayName,
477 XMP_Index itemIndex,
478 XMP_StringPtr itemValue,
479 XMP_OptionBits options )
480{
481 XMP_Assert ( (schemaNS != 0) && (arrayName != 0) ); // Enforced by wrapper.
482
483 XMP_ExpandedXPath arrayPath;
484 ExpandXPath ( schemaNS, arrayName, &arrayPath );
485 XMP_Node * arrayNode = FindNode ( &tree, arrayPath, kXMP_ExistingOnly ); // Just lookup, don't try to create.
486 if ( arrayNode == 0 ) XMP_Throw ( "Specified array does not exist", kXMPErr_BadXPath );
487
488 DoSetArrayItem ( arrayNode, itemIndex, itemValue, options );
489
490} // SetArrayItem
491
492
493// -------------------------------------------------------------------------------------------------

Callers 1

WXMPMeta_SetArrayItem_1Function · 0.80

Calls 3

ExpandXPathFunction · 0.85
FindNodeFunction · 0.85
DoSetArrayItemFunction · 0.85

Tested by

no test coverage detected