1 #ifndef __TXMPUtils_hpp__ 2 #define __TXMPUtils_hpp__ 1 5 #error "Do not directly include, use XMP.hpp" 49 template <
class tStringObj>
class TXMPUtils {
113 tStringObj * fullPath );
138 tStringObj * fullPath );
164 tStringObj * fullPath );
194 tStringObj * fullPath );
223 const tStringObj & langName,
224 tStringObj * fullPath );
266 tStringObj * fullPath );
307 const tStringObj & fieldValue,
308 tStringObj * fullPath );
336 tStringObj * strValue );
349 tStringObj * strValue );
361 tStringObj * strValue );
374 tStringObj * strValue );
411 tStringObj * strValue );
457 static long ConvertToInt (
const tStringObj & strValue );
642 tStringObj * encodedStr );
655 tStringObj * encodedStr );
668 tStringObj * rawStr );
681 tStringObj * rawStr );
716 tStringObj * standardXMP,
717 tStringObj * extendedXMP,
718 tStringObj * extendedDigest );
779 tStringObj * catedStr );
817 const tStringObj & catedStr );
967 #endif // __TXMPUtils_hpp__ XMP_Uns32 XMP_StringLen
The type for string length parameters. A 32-bit unsigned integer, as big as will be practically neede...
XMP_Int32 XMP_Index
The type for offsets and indices. A 32-bit signed integer. It is signed to allow -1 for loop terminat...
static void ApplyTemplate(TXMPMeta< tStringObj > *workingXMP, const TXMPMeta< tStringObj > &templateXMP, XMP_OptionBits actions)
ApplyTemplate() modifies a working XMP object according to a template object.
const char * XMP_StringPtr
The type for input string parameters. A const char *, a null-terminated UTF-8 string.
static void ComposeArrayItemPath(XMP_StringPtr schemaNS, XMP_StringPtr arrayName, XMP_Index itemIndex, tStringObj *fullPath)
ComposeArrayItemPath() composes the path expression for an item in an array.
static void RemoveProperties(TXMPMeta< tStringObj > *xmpObj, XMP_StringPtr schemaNS=0, XMP_StringPtr propName=0, XMP_OptionBits options=0)
RemoveProperties() removes multiple properties from an XMP object.
static void ConvertFromInt(long binValue, XMP_StringPtr format, tStringObj *strValue)
ConvertFromInt() converts a 32-bit integer value to a string.
static void PackageForJPEG(const TXMPMeta< tStringObj > &xmpObj, tStringObj *standardXMP, tStringObj *extendedXMP, tStringObj *extendedDigest)
PackageForJPEG() creates XMP serializations appropriate for a JPEG file.
static void SetClientString(void *clientPtr, XMP_StringPtr valuePtr, XMP_StringLen valueLen)
static void ConvertToDate(XMP_StringPtr strValue, XMP_DateTime *binValue)
ConvertToDate() converts a string to a date/time value.
static void EncodeToBase64(XMP_StringPtr rawStr, XMP_StringLen rawLen, tStringObj *encodedStr)
These functions convert between raw data values and Base64-encoded strings.
static double ConvertToFloat(XMP_StringPtr strValue)
ConvertToFloat() converts a string to a floating-point value.
static long long ConvertToInt64(XMP_StringPtr strValue)
ConvertToInt64() converts a string to a 64-bit integer value.
static void MergeFromJPEG(TXMPMeta< tStringObj > *fullXMP, const TXMPMeta< tStringObj > &extendedXMP)
MergeFromJPEG() merges standard and extended XMP retrieved from a JPEG file.
The expanded type for a date and time.
XMP_Uns32 XMP_OptionBits
The type for a collection of 32 flag bits.
static long ConvertToInt(XMP_StringPtr strValue)
ConvertToInt() converts a string to a 32-bit integer value.
static void SeparateArrayItems(TXMPMeta< tStringObj > *xmpObj, XMP_StringPtr schemaNS, XMP_StringPtr arrayName, XMP_OptionBits options, XMP_StringPtr catedStr)
SeparateArrayItems() updates an array from a concatenated edit string of values.
static void ComposeQualifierPath(XMP_StringPtr schemaNS, XMP_StringPtr propName, XMP_StringPtr qualNS, XMP_StringPtr qualName, tStringObj *fullPath)
ComposeQualifierPath() composes the path expression for a qualifier.
static void CatenateArrayItems(const TXMPMeta< tStringObj > &xmpObj, XMP_StringPtr schemaNS, XMP_StringPtr arrayName, XMP_StringPtr separator, XMP_StringPtr quotes, XMP_OptionBits options, tStringObj *catedStr)
CatenateArrayItems() creates a single edit string from a set of array item values.
static void ConvertFromBool(bool binValue, tStringObj *strValue)
ConvertFromBool() converts a Boolean value to a string.
static void ComposeStructFieldPath(XMP_StringPtr schemaNS, XMP_StringPtr structName, XMP_StringPtr fieldNS, XMP_StringPtr fieldName, tStringObj *fullPath)
ComposeStructFieldPath() composes the path expression for a field in a struct.
static void ConvertFromInt64(long long binValue, XMP_StringPtr format, tStringObj *strValue)
ConvertFromInt64() converts a 64-bit integer value to a string.
API for access to the XMP Toolkit utility services.
static void SetTimeZone(XMP_DateTime *time)
SetTimeZone() sets the time zone in a date/time value to the local time zone.
static void ComposeLangSelector(XMP_StringPtr schemaNS, XMP_StringPtr arrayName, XMP_StringPtr langName, tStringObj *fullPath)
ComposeLangSelector() composes the path expression to select an alternate item by language...
static void ConvertToLocalTime(XMP_DateTime *time)
ConvertToLocalTime() ensures that a time is local.
static void CurrentDateTime(XMP_DateTime *time)
CurrentDateTime() obtains the current date and time.
static bool ConvertToBool(XMP_StringPtr strValue)
ConvertToBool() converts a string to a Boolean value.
static void ConvertFromDate(const XMP_DateTime &binValue, tStringObj *strValue)
ConvertFromDate() converts a date/time value to a string.
static void DuplicateSubtree(const TXMPMeta< tStringObj > &source, TXMPMeta< tStringObj > *dest, XMP_StringPtr sourceNS, XMP_StringPtr sourceRoot, XMP_StringPtr destNS=0, XMP_StringPtr destRoot=0, XMP_OptionBits options=0)
DuplicateSubtree() replicates a subtree from one XMP object into another.
static void ConvertToUTCTime(XMP_DateTime *time)
ConvertToUTCTime() ensures that a time is UTC.
static void ComposeFieldSelector(XMP_StringPtr schemaNS, XMP_StringPtr arrayName, XMP_StringPtr fieldNS, XMP_StringPtr fieldName, XMP_StringPtr fieldValue, tStringObj *fullPath)
ComposeFieldSelector() composes a path expression to select an alternate item by a field's value...
static void DecodeFromBase64(XMP_StringPtr encodedStr, XMP_StringLen encodedLen, tStringObj *rawStr)
DecodeFromBase64() Decodes a Base64-encoded string to raw data.
static void ConvertFromFloat(double binValue, XMP_StringPtr format, tStringObj *strValue)
ConvertFromFloat() converts a floating-point value to a string.
static int CompareDateTime(const XMP_DateTime &left, const XMP_DateTime &right)
CompareDateTime() compares the order of two date/time values.