class static */
| 742 | // Return "structName/ns:fieldName". |
| 743 | |
| 744 | /* class static */ void |
| 745 | XMPUtils::ComposeStructFieldPath ( XMP_StringPtr schemaNS, |
| 746 | XMP_StringPtr structName, |
| 747 | XMP_StringPtr fieldNS, |
| 748 | XMP_StringPtr fieldName, |
| 749 | XMP_StringPtr * fullPath, |
| 750 | XMP_StringLen * pathSize ) |
| 751 | { |
| 752 | XMP_Assert ( (schemaNS != 0) && (fieldNS != 0) ); // Enforced by wrapper. |
| 753 | XMP_Assert ( (*structName != 0) && (*fieldName != 0) ); // Enforced by wrapper. |
| 754 | XMP_Assert ( (fullPath != 0) && (pathSize != 0) ); // Enforced by wrapper. |
| 755 | |
| 756 | XMP_ExpandedXPath expPath; // Just for side effects to check namespace and basic path. |
| 757 | ExpandXPath ( schemaNS, structName, &expPath ); |
| 758 | |
| 759 | XMP_ExpandedXPath fieldPath; |
| 760 | ExpandXPath ( fieldNS, fieldName, &fieldPath ); |
| 761 | if ( fieldPath.size() != 2 ) XMP_Throw ( "The fieldName must be simple", kXMPErr_BadXPath ); |
| 762 | |
| 763 | XMP_StringLen reserveLen = strlen(structName) + fieldPath[kRootPropStep].step.size() + 1; |
| 764 | |
| 765 | sComposedPath->erase(); |
| 766 | sComposedPath->reserve ( reserveLen ); |
| 767 | *sComposedPath = structName; |
| 768 | *sComposedPath += '/'; |
| 769 | *sComposedPath += fieldPath[kRootPropStep].step; |
| 770 | |
| 771 | *fullPath = sComposedPath->c_str(); |
| 772 | *pathSize = sComposedPath->size(); |
| 773 | |
| 774 | } // ComposeStructFieldPath |
| 775 | |
| 776 | |
| 777 | // ------------------------------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected