This structure may grow in the future, indicated by the 83 * size field.
size
ICU data must be at least 8-aligned, and should be 16-aligned. 86 * The UDataInfo struct begins 4 bytes after the start of the data item, 87 * so it is 4-aligned. 88 * 89 *
The platform data property fields help determine if a data 90 * file can be efficiently used on a given machine. 91 * The particular fields are of importance only if the data 92 * is affected by the properties - if there is integer data 93 * with word sizes > 1 byte, char* text, or UChar* text.
The implementation for the udata_open[Choice]() 96 * functions may reject data based on the value in isBigEndian. 97 * No other field is used by the udata API implementation.
udata_open[Choice]()
isBigEndian
udata
The dataFormat may be used to identify 100 * the kind of data, e.g. a converter table.
dataFormat
The formatVersion field should be used to 103 * make sure that the format can be interpreted. 104 * It may be a good idea to check only for the one or two highest 105 * of the version elements to allow the data memory to 106 * get more or somewhat rearranged contents, for as long 107 * as the using code can still interpret the older contents.
formatVersion
The dataVersion field is intended to be a 110 * common place to store the source version of the data; 111 * for data from the Unicode character database, this could 112 * reflect the Unicode version.
dataVersion
udata_openChoice()
NULL
UDataInfo
true
udata_openChoice
udata_getMemory()
The implementation depends on platform properties and user preferences 215 * and may involve loading shared libraries (DLLs), mapping 216 * files into memory, or fopen()/fread() files. 217 * It may also involve using static memory or database queries etc. 218 * Several or all data items may be combined into one entity 219 * (DLL, memory-mappable file).
The data is always preceded by a header that includes 222 * a UDataInfo structure. 223 * The caller's isAcceptable() function is called to make 224 * sure that the data is useful. It may be called several times if it 225 * rejects the data and there is more than one location with data 226 * matching the type and name.
isAcceptable()
If path==NULL, then ICU data is loaded. 229 * Otherwise, it is separated into a basename and a basename-less directory string. 230 * The basename is used as the data package name, and the directory is 231 * logically prepended to the ICU data directory string.
path==NULL
For details about ICU data loading see the User Guide 234 * Data Management chapter. (https://unicode-org.github.io/icu/userguide/icu_data/)
sizeof(UDataInfo)
*pInfo
pInfo->size
U_USING_DEFAULT_WARNING, U_UNSUPPORTED_ERROR