Closed amtopel closed 1 year ago
The template parameter, class tStringObj, must have the following member functions (which match those for std::string):
tStringObj& assign ( const char * str, size_t len ) size_t size() const const char * c_str() const
The string class must be suitable for at least UTF-8. This is the encoding used for all general values, and is the default encoding for serialized XMP. The string type must also be suitable for UTF-16 or UTF-32 if those serialization encodings are used. This mainly means tolerating embedded 0 bytes, which std::string does.
Reference: https://github.com/adobe/XMP-Toolkit-SDK/blob/e0955b272ab6035b2921fa2c649aca5ecfe5ab81/public/include/XMP.hpp#L27-L47 for more
I've only seen
TXMP_STRING_TYPE
defined asstd::string
. Are there any other options, likechar*
or std::wstring? When I try those, everything fails to compile. Thanks for your help.